Bladeren bron

Merge remote-tracking branch 'origin/master'

cooperku_kdanmobile 6 jaren geleden
bovenliggende
commit
4ee6276f82
1 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  1. 7 0
      src/main/java/com/bomostory/sceneeditmodule/utils/Utils.kt

+ 7 - 0
src/main/java/com/bomostory/sceneeditmodule/utils/Utils.kt

@@ -9,6 +9,13 @@ import com.example.tfat.myapplication.R
 import java.io.File
 
 object Utils {
+
+    fun generateSceneName(index: Int): String {
+        val book = ('A'.toInt() + ((index + 1) / 22)).toChar()
+        val num = (index + 1) % 22
+        return "$book$num"
+    }
+
     fun showExportPdfCompleteThenViewDialog(context: Context, authority: String, file: File) {
         AlertDialog.Builder(context)
                 .setMessage(R.string.export_pdf_complete_dialog_msg)