ソースを参照

Add hint how to edit sound button

pull/1/head
Malte Schmitz 7年前
コミット
26cb074129
3個のファイルの変更16行の追加6行の削除
  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 ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

@@ -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>

読み込み中…
キャンセル
保存