Browse Source

Add hint how to edit sound button

pull/1/head
Malte Schmitz 7 years ago
parent
commit
26cb074129
3 changed files with 16 additions and 6 deletions
  1. +0
    -6
      README.md
  2. +7
    -0
      app/src/main/java/de/mlte/soundboard/EditActivity.kt
  3. +9
    -0
      app/src/main/res/layout/activity_edit.xml

+ 0
- 6
README.md View File

@@ -1,8 +1,2 @@
# Android Soundboard

# TODO
- add hint to use long click for settings
- handle new button properly
- do not create button before Done in dialog was clicked
- hide delete in create dialog
- release

+ 7
- 0
app/src/main/java/de/mlte/soundboard/EditActivity.kt View File

@@ -53,6 +53,13 @@ class EditActivity : AppCompatActivity() {

startActivityForResult(intent, 123)
}

val hintTextView = findViewById<TextView>(R.id.hintTextView)
if (isCreate()) {
hintTextView.text = "Touch and hold on the newly created sound button to edit any of these settings later."
} else {
hintTextView.text = "Use the menu if you want to delete this sound button."
}
}

private fun isCreate() = intent.getIntExtra("index", -1) < 0


+ 9
- 0
app/src/main/res/layout/activity_edit.xml View File

@@ -51,4 +51,13 @@
android:layout_marginLeft="16dp"
android:layout_toLeftOf="@id/selectButton"/>

<TextView
android:id="@+id/hintTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/selectButton"
android:layout_alignStart="@+id/fileTextView"
android:layout_below="@+id/selectButton"
android:layout_marginTop="23dp"/>

</RelativeLayout>

Loading…
Cancel
Save