diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/DialpadActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/DialpadActivity.kt index 8b950be5..0c5ad59a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/DialpadActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/DialpadActivity.kt @@ -9,22 +9,27 @@ class DialpadActivity : SimpleActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_dialpad) - dialpad_0.setOnClickListener { } - dialpad_1.setOnClickListener { } - dialpad_2.setOnClickListener { } - dialpad_3.setOnClickListener { } - dialpad_4.setOnClickListener { } - dialpad_5.setOnClickListener { } - dialpad_6.setOnClickListener { } - dialpad_7.setOnClickListener { } - dialpad_8.setOnClickListener { } - dialpad_9.setOnClickListener { } - dialpad_asterisk.setOnClickListener { } - dialpad_hashtag.setOnClickListener { } + + dialpad_0.setOnClickListener { dialpadPressed("0") } + dialpad_1.setOnClickListener { dialpadPressed("1") } + dialpad_2.setOnClickListener { dialpadPressed("2") } + dialpad_3.setOnClickListener { dialpadPressed("3") } + dialpad_4.setOnClickListener { dialpadPressed("4") } + dialpad_5.setOnClickListener { dialpadPressed("5") } + dialpad_6.setOnClickListener { dialpadPressed("6") } + dialpad_7.setOnClickListener { dialpadPressed("7") } + dialpad_8.setOnClickListener { dialpadPressed("8") } + dialpad_9.setOnClickListener { dialpadPressed("9") } + dialpad_asterisk.setOnClickListener { dialpadPressed("*") } + dialpad_hashtag.setOnClickListener { dialpadPressed("#") } } override fun onResume() { super.onResume() updateTextColors(dialpad_wrapper) } + + private fun dialpadPressed(char: String) { + dialpad_input.append(char) + } } diff --git a/app/src/main/res/drawable-hdpi/ic_clear_char.png b/app/src/main/res/drawable-hdpi/ic_clear_char.png new file mode 100644 index 00000000..3fd9c535 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_clear_char.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_clear_char.png b/app/src/main/res/drawable-xhdpi/ic_clear_char.png new file mode 100644 index 00000000..b51790d1 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_clear_char.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_clear_char.png b/app/src/main/res/drawable-xxhdpi/ic_clear_char.png new file mode 100644 index 00000000..e049a108 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_clear_char.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_clear_char.png b/app/src/main/res/drawable-xxxhdpi/ic_clear_char.png new file mode 100644 index 00000000..ea552fd3 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_clear_char.png differ diff --git a/app/src/main/res/layout/activity_dialpad.xml b/app/src/main/res/layout/activity_dialpad.xml index 0b653a7e..80e2955e 100644 --- a/app/src/main/res/layout/activity_dialpad.xml +++ b/app/src/main/res/layout/activity_dialpad.xml @@ -16,6 +16,16 @@ android:layout_marginLeft="@dimen/activity_margin" android:layout_marginRight="@dimen/activity_margin"> + + 52dp 60dp 44sp + 40sp