add a dialpad input for showing dialed chars
This commit is contained in:
parent
9ab4f3ea7f
commit
96c6e8cd5a
|
@ -9,22 +9,27 @@ class DialpadActivity : SimpleActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_dialpad)
|
setContentView(R.layout.activity_dialpad)
|
||||||
dialpad_0.setOnClickListener { }
|
|
||||||
dialpad_1.setOnClickListener { }
|
dialpad_0.setOnClickListener { dialpadPressed("0") }
|
||||||
dialpad_2.setOnClickListener { }
|
dialpad_1.setOnClickListener { dialpadPressed("1") }
|
||||||
dialpad_3.setOnClickListener { }
|
dialpad_2.setOnClickListener { dialpadPressed("2") }
|
||||||
dialpad_4.setOnClickListener { }
|
dialpad_3.setOnClickListener { dialpadPressed("3") }
|
||||||
dialpad_5.setOnClickListener { }
|
dialpad_4.setOnClickListener { dialpadPressed("4") }
|
||||||
dialpad_6.setOnClickListener { }
|
dialpad_5.setOnClickListener { dialpadPressed("5") }
|
||||||
dialpad_7.setOnClickListener { }
|
dialpad_6.setOnClickListener { dialpadPressed("6") }
|
||||||
dialpad_8.setOnClickListener { }
|
dialpad_7.setOnClickListener { dialpadPressed("7") }
|
||||||
dialpad_9.setOnClickListener { }
|
dialpad_8.setOnClickListener { dialpadPressed("8") }
|
||||||
dialpad_asterisk.setOnClickListener { }
|
dialpad_9.setOnClickListener { dialpadPressed("9") }
|
||||||
dialpad_hashtag.setOnClickListener { }
|
dialpad_asterisk.setOnClickListener { dialpadPressed("*") }
|
||||||
|
dialpad_hashtag.setOnClickListener { dialpadPressed("#") }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
updateTextColors(dialpad_wrapper)
|
updateTextColors(dialpad_wrapper)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun dialpadPressed(char: String) {
|
||||||
|
dialpad_input.append(char)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 437 B |
Binary file not shown.
After Width: | Height: | Size: 524 B |
Binary file not shown.
After Width: | Height: | Size: 732 B |
Binary file not shown.
After Width: | Height: | Size: 919 B |
|
@ -16,6 +16,16 @@
|
||||||
android:layout_marginLeft="@dimen/activity_margin"
|
android:layout_marginLeft="@dimen/activity_margin"
|
||||||
android:layout_marginRight="@dimen/activity_margin">
|
android:layout_marginRight="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyEditText
|
||||||
|
android:id="@+id/dialpad_input"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:textCursorDrawable="@null"
|
||||||
|
android:textSize="@dimen/dialpad_input_text_size"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/dialpad_2"/>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/dialpad_1"
|
android:id="@+id/dialpad_1"
|
||||||
style="@style/DialpadNumberStyle"
|
style="@style/DialpadNumberStyle"
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
<dimen name="contact_item_height">52dp</dimen>
|
<dimen name="contact_item_height">52dp</dimen>
|
||||||
<dimen name="dialpad_button_size">60dp</dimen>
|
<dimen name="dialpad_button_size">60dp</dimen>
|
||||||
<dimen name="dialpad_text_size">44sp</dimen>
|
<dimen name="dialpad_text_size">44sp</dimen>
|
||||||
|
<dimen name="dialpad_input_text_size">40sp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue