#15046: implement placeCall / hangUp buttons
diff --git a/res/drawable-hdpi/ic_call.png b/res/drawable-hdpi/ic_call.png
new file mode 100644
index 0000000..2643786
--- /dev/null
+++ b/res/drawable-hdpi/ic_call.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hangup.png b/res/drawable-hdpi/ic_hangup.png
new file mode 100644
index 0000000..38cd2a1
--- /dev/null
+++ b/res/drawable-hdpi/ic_hangup.png
Binary files differ
diff --git a/res/drawable-ldpi/ic_call.png b/res/drawable-ldpi/ic_call.png
new file mode 100644
index 0000000..8e9edb0
--- /dev/null
+++ b/res/drawable-ldpi/ic_call.png
Binary files differ
diff --git a/res/drawable-ldpi/ic_hangup.png b/res/drawable-ldpi/ic_hangup.png
new file mode 100644
index 0000000..7c1695d
--- /dev/null
+++ b/res/drawable-ldpi/ic_hangup.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_call.png b/res/drawable-mdpi/ic_call.png
new file mode 100644
index 0000000..07223ac
--- /dev/null
+++ b/res/drawable-mdpi/ic_call.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hangup.png b/res/drawable-mdpi/ic_hangup.png
new file mode 100644
index 0000000..dbc41ca
--- /dev/null
+++ b/res/drawable-mdpi/ic_hangup.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call.png b/res/drawable-xhdpi/ic_call.png
new file mode 100644
index 0000000..9036df9
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hangup.png b/res/drawable-xhdpi/ic_hangup.png
new file mode 100644
index 0000000..8abe1c4
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hangup.png
Binary files differ
diff --git a/res/drawable/custom_button.xml b/res/drawable/call_button.xml
similarity index 61%
rename from res/drawable/custom_button.xml
rename to res/drawable/call_button.xml
index 46f7017..206caf6 100644
--- a/res/drawable/custom_button.xml
+++ b/res/drawable/call_button.xml
@@ -2,17 +2,18 @@
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" >
+ <item android:state_pressed="true"
+ android:state_enabled="true" >
<shape>
<gradient
- android:startColor="#ff8800"
- android:endColor="#ff8800"
+ android:startColor="#ccff00"
+ android:endColor="#99cc00"
android:angle="270" />
<stroke
android:width="3dp"
- android:color="#888888" />
-<!-- <corners -->
-<!-- android:radius="3dp" /> -->
+ android:color="#99cc00" />
+ <corners
+ android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
@@ -21,17 +22,17 @@
</shape>
</item>
- <item android:state_focused="true" >
+ <item android:state_enabled="false" >
<shape>
<gradient
- android:endColor="#882200"
- android:startColor="#882200"
+ android:startColor="#cccccc"
+ android:endColor="#669900"
android:angle="270" />
<stroke
android:width="3dp"
- android:color="#888888" />
-<!-- <corners -->
-<!-- android:radius="3dp" /> -->
+ android:color="#669900" />
+ <corners
+ android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
@@ -39,18 +40,18 @@
android:bottom="10dp" />
</shape>
</item>
-
+
<item>
<shape>
<gradient
- android:endColor="#44aa00"
- android:startColor="#44aa00"
+ android:startColor="#99cc00"
+ android:endColor="#669900"
android:angle="270" />
<stroke
android:width="3dp"
- android:color="#888888" />
-<!-- <corners -->
-<!-- android:radius="3dp" /> -->
+ android:color="#669900" />
+ <corners
+ android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
diff --git a/res/drawable/custom_button.xml b/res/drawable/hangup_button.xml
similarity index 61%
copy from res/drawable/custom_button.xml
copy to res/drawable/hangup_button.xml
index 46f7017..ae5b9e0 100644
--- a/res/drawable/custom_button.xml
+++ b/res/drawable/hangup_button.xml
@@ -2,17 +2,18 @@
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" >
+ <item android:state_pressed="true"
+ android:state_enabled="true" >
<shape>
<gradient
- android:startColor="#ff8800"
- android:endColor="#ff8800"
+ android:startColor="#ff8888"
+ android:endColor="#cc0000"
android:angle="270" />
<stroke
android:width="3dp"
- android:color="#888888" />
-<!-- <corners -->
-<!-- android:radius="3dp" /> -->
+ android:color="#ff8888" />
+ <corners
+ android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
@@ -21,17 +22,17 @@
</shape>
</item>
- <item android:state_focused="true" >
+ <item android:state_enabled="false" >
<shape>
<gradient
- android:endColor="#882200"
- android:startColor="#882200"
+ android:startColor="#cccccc"
+ android:endColor="#cc0000"
android:angle="270" />
<stroke
android:width="3dp"
- android:color="#888888" />
-<!-- <corners -->
-<!-- android:radius="3dp" /> -->
+ android:color="#cc0000" />
+ <corners
+ android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
@@ -43,14 +44,14 @@
<item>
<shape>
<gradient
- android:endColor="#44aa00"
- android:startColor="#44aa00"
+ android:startColor="#ff4444"
+ android:endColor="#cc0000"
android:angle="270" />
<stroke
android:width="3dp"
- android:color="#888888" />
-<!-- <corners -->
-<!-- android:radius="3dp" /> -->
+ android:color="#cc0000" />
+ <corners
+ android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
diff --git a/res/layout/test_layout.xml b/res/layout/test_layout.xml
index 531ed04..47411bb 100644
--- a/res/layout/test_layout.xml
+++ b/res/layout/test_layout.xml
@@ -86,26 +86,34 @@
android:layout_below="@+id/editAccountID"
android:ems="10" />
- <Button
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:gravity = "center_horizontal"
+ android:layout_below="@+id/editTo"
+ android:id="@+id/callButtonLayout"
+ android:weightSum="1.0">
+ <ImageButton
android:id="@+id/buttonCall"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_below="@+id/editTo"
+ android:gravity="center_vertical"
+ android:layout_weight=".5"
android:onClick="onClick"
- android:text="placeCall"
- android:background="@drawable/custom_button" />
+ android:src="@drawable/ic_call"
+ android:background="@drawable/call_button" />
- <Button
+ <ImageButton
android:id="@+id/buttonHangUp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@+id/buttonCall"
- android:layout_alignBottom="@+id/buttonCall"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/editTo"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="0.50"
+ android:background="@drawable/hangup_button"
+ android:gravity="center_vertical"
android:onClick="onClick"
- android:text="hangUp" />
+ android:src="@drawable/ic_hangup" />
+
+ </LinearLayout>
<!-- android:background="@drawable/custom_button" -->
@@ -113,7 +121,7 @@
android:id="@+id/callVoid_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@+id/buttonCall"
+ android:layout_below="@+id/callButtonLayout"
android:text="callVoidText" />
<Button