CallActivity using fragments to change between calling/in call states
diff --git a/res/layout/activity_call_layout.xml b/res/layout/activity_call_layout.xml
index 5caf67b..44b54da 100644
--- a/res/layout/activity_call_layout.xml
+++ b/res/layout/activity_call_layout.xml
@@ -30,37 +30,42 @@
as that of the covered work.
-->
-<LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/CallActivityLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
- android:orientation="vertical">
+ android:orientation="vertical" >
+
<Button
android:id="@+id/buttonanswer"
- android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:text="Answer Up"/>
+ android:layout_height="wrap_content"
+ android:text="Answer Up" />
+
<Button
android:id="@+id/buttonhangup"
- android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:text="Hang Up"/>
+ android:layout_height="wrap_content"
+ android:text="Hang Up" />
+
<Button
android:id="@+id/buttonhold"
- android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:text="Hold"/>
+ android:layout_height="wrap_content"
+ android:text="Hold" />
+
<Button
android:id="@+id/buttonunhold"
- android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:text="Unhold"/>
- <TextView
- android:id="@+id/callstate"
- android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Unhold" />
+
+ <LinearLayout
+ android:id="@+id/fragment_layout"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:gravity="center_vertical|center_horizontal"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="Call State"/>
-</LinearLayout>
+ android:orientation="vertical" >
+ </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/frag_call_incoming.xml b/res/layout/frag_call_incoming.xml
new file mode 100644
index 0000000..4625371
--- /dev/null
+++ b/res/layout/frag_call_incoming.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/textView1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="10dp"
+ android:text="Incoming call"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <TextView
+ android:id="@+id/contact_name_txt"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_below="@+id/textView1"
+ android:layout_margin="10dp"
+ android:layout_marginTop="76dp"
+ android:text="Caller Name"
+ android:textAppearance="?android:attr/textAppearanceLarge" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/decline_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="120dp"
+ android:layout_weight="1"
+ android:background="#FF4444"
+ android:text="Decline" />
+
+ <Button
+ android:id="@+id/accept_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="120dp"
+ android:layout_weight="1"
+ android:background="#99CC00"
+ android:text="Accept" />
+ </LinearLayout>
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/frag_call_ongoing.xml b/res/layout/frag_call_ongoing.xml
new file mode 100644
index 0000000..0124ed1
--- /dev/null
+++ b/res/layout/frag_call_ongoing.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/calllength_txt"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="10dp"
+ android:text="0:00"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <TextView
+ android:id="@+id/contact_name_txt"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_below="@+id/textView1"
+ android:layout_margin="10dp"
+ android:layout_marginTop="76dp"
+ android:text="Caller Name"
+ android:textAppearance="?android:attr/textAppearanceLarge" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/end_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="120dp"
+ android:layout_weight="1"
+ android:background="#FF4444"
+ android:text="End" />
+
+ <Button
+ android:id="@+id/suspend_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="120dp"
+ android:layout_weight="1"
+ android:background="#FFBB33"
+ android:text="Suspend" />
+ </LinearLayout>
+
+</RelativeLayout>
\ No newline at end of file