Update Emergency Dialer to match Dialer (6/7).
Emergency dialer style updated to match style in Dialer and
InCallUI.
Moved all dialpad resources to PhoneCommon.
Change-Id: Id68e48c63fade3138c3fd5ede9c4e55b5f5b9da1
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index 772cce9..8d4521f 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -44,6 +44,7 @@
import android.widget.EditText;
import com.android.phone.common.HapticFeedback;
+import com.android.phone.common.util.ViewUtil;
/**
@@ -192,7 +193,7 @@
mDelete.setOnClickListener(this);
mDelete.setOnLongClickListener(this);
- mDialButton = findViewById(R.id.dialButton);
+ mDialButton = findViewById(R.id.floating_action_button);
// Check whether we should show the onscreen "Dial" button and co.
Resources res = getResources();
@@ -201,6 +202,8 @@
} else {
mDialButton.setVisibility(View.GONE);
}
+ View floatingActionButtonContainer = findViewById(R.id.floating_action_button_container);
+ ViewUtil.setupFloatingActionButton(floatingActionButtonContainer, getResources());
if (icicle != null) {
super.onRestoreInstanceState(icicle);
@@ -405,7 +408,7 @@
keyPressed(KeyEvent.KEYCODE_DEL);
return;
}
- case R.id.dialButton: {
+ case R.id.floating_action_button: {
mHaptic.vibrate(); // Vibrate here too, just like we do for the regular keys
placeCall();
return;
@@ -632,7 +635,6 @@
private void updateDialAndDeleteButtonStateEnabledAttr() {
final boolean notEmpty = mDigits.length() != 0;
- mDialButton.setEnabled(notEmpty);
mDelete.setEnabled(notEmpty);
}
}