Fixed incall numpad button state when numpad is visible
This commit is contained in:
parent
8975920035
commit
679014fa8d
3 changed files with 16 additions and 6 deletions
|
@ -306,13 +306,13 @@ public class CallActivity extends LinphoneGenericActivity
|
||||||
new View.OnClickListener() {
|
new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
findViewById(R.id.numpad)
|
View numpad = findViewById(R.id.numpad);
|
||||||
.setVisibility(
|
boolean isNumpadVisible = numpad.getVisibility() == View.VISIBLE;
|
||||||
findViewById(R.id.numpad).getVisibility() == View.VISIBLE
|
numpad.setVisibility(isNumpadVisible ? View.GONE : View.VISIBLE);
|
||||||
? View.GONE
|
v.setSelected(!isNumpadVisible);
|
||||||
: View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
numpadButton.setSelected(false);
|
||||||
|
|
||||||
ImageView hangUp = findViewById(R.id.hang_up);
|
ImageView hangUp = findViewById(R.id.hang_up);
|
||||||
hangUp.setOnClickListener(
|
hangUp.setOnClickListener(
|
||||||
|
|
10
app/src/main/res/drawable/call_numpad.xml
Normal file
10
app/src/main/res/drawable/call_numpad.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true">
|
||||||
|
<bitmap android:src="@drawable/dialer_alt_back" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<bitmap android:src="@drawable/footer_dialer" />
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
android:background="@drawable/button_background_dark"
|
android:background="@drawable/button_background_dark"
|
||||||
android:contentDescription="@string/content_description_numpad"
|
android:contentDescription="@string/content_description_numpad"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
android:src="@drawable/footer_dialer" />
|
android:src="@drawable/call_numpad" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue