This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select(entry) = First(entry)\ε U Follow(entry) = {TYPE_INT, TYPE_DOUBLE, PRINT, #} | |
Select(stmtLst) = First(stmtLst)\ε U Follow(stmtLst) = {TYPE_INT, TYPE_DOUBLE, PRINT, #} | |
Select(stmt) = First(stmt) = {TYPE_INT, TYPE_DOUBLE, PRINT} | |
Select(declStmt) = First(declStmt) = {TYPE_INT, TYPE_DOUBLE} | |
Select(additiveExpr) = First(additiveExpr) = {INT_LIT, DOUBLE_LIT, IDENTIFIER, LPAREN} | |
Select(multiplicativeExpr) = First(multiplicativeExpr) = {INT_LIT, DOUBLE_LIT, IDENTIFIER, LPAREN} | |
Select(atomicExpr) = First(atomicExpr) = {INT_LIT, DOUBLE_LIT, IDENTIFIER, LPAREN} | |
Select(constant) = First(constant) = {INT_LIT, DOUBLE_LIT} | |
Select(printCall) = First(printCall) = {PRINT} | |
Select(dataType) = First(dataType) = {TYPE_INT, TYPE_DOUBLE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Follow(entry) = {#} | |
Follow(stmtLst) = {#} | |
Follow(stmt) = {TYPE_INT, TYPE_DOUBLE, PRINT} | |
Follow(declStmt) = {SEMICOLON} | |
Follow(additiveExpr) = {SEMICOLON, RPAREN} | |
Follow(multiplicativeExpr) = {PLUS, MINUS, SEMICOLON, RPAREN} | |
Follow(atomicExpr) = {MUL, DIV, PLUS, MINUS, SEMICOLON, RPAREN} | |
Follow(printCall) = {SEMICOLON} | |
Follow(dataType) = {IDENTIFIER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First(entry) = {TYPE_INT, TYPE_DOUBLE, PRINT, ε} | |
First(stmtLst) = {TYPE_INT, TYPE_DOUBLE, PRINT, ε} | |
First(stmt) = {TYPE_INT, TYPE_DOUBLE, PRINT} | |
First(declStmt) = {TYPE_INT, TYPE_DOUBLE} | |
First(additiveExpr) = {INT_LIT, DOUBLE_LIT, IDENTIFIER, LPAREN} | |
First(multiplicativeExpr) = {INT_LIT, DOUBLE_LIT, IDENTIFIER, LPAREN} | |
First(atomicExpr) = {INT_LIT, DOUBLE_LIT, IDENTIFIER, LPAREN} | |
First(constant) = {INT_LIT, DOUBLE_LIT} | |
First(printCall) = {PRINT} | |
First(dataType) = {TYPE_INT, TYPE_DOUBLE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allprojects { | |
repositories { | |
... | |
maven { url "https://jitpack.io" } // Required due to internal dependencies | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SimpleSettings(this).show { | |
Section { | |
TextPref { | |
title = "Dialog" | |
summary = "Tap to show alert dialog" | |
onClick = DialogClickListener("Test", "This is a test", DialogClickListener.Type.OK) | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun showPreferences() { | |
val config = SimpleSettingsConfig().apply { | |
showResetOption = true | |
preferenceCallback = this@MainActivity | |
} | |
SimpleSettings(this@MainActivity, config).show(R.xml.preferences) | |
} | |
override fun onPreferenceClick(context: Context, key: String): Preference.OnPreferenceClickListener? { | |
return when(key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SimpleSettings(this@MainActivity).show(R.xml.preferences) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PreferenceScreen | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<PreferenceCategory | |
app:key="preference_category" | |
app:title="Preference category"> | |
<Preference | |
app:key="preference_test" | |
app:title="Test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity | |
android:name="com.chillibits.simplesettings.ui.SimpleSettingsActivity" | |
android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation 'com.chillibits:simplesettings:1.3.4' | |
// Required dependencies | |
implementation 'com.google.android.material:material:<latest-version>' | |
implementation 'androidx.preference:preference:<latest-version>' |
NewerOlder