Improved layouts + pause fix
This commit is contained in:
parent
d2c387ac42
commit
572bcb8cf4
7 changed files with 52 additions and 35 deletions
|
@ -14,29 +14,29 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/contactNameOrNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|left"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="10dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="22dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/callStatus"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/pause_default" />
|
||||
|
||||
<Chronometer
|
||||
android:id="@+id/callTimer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="20dp"
|
||||
android:gravity="center_vertical|right"
|
||||
android:textColor="@android:color/white"
|
||||
|
|
|
@ -8,11 +8,10 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_weight="0.4"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -35,9 +34,9 @@
|
|||
<ScrollView
|
||||
android:id="@+id/chatScrollView"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2" >
|
||||
android:layout_height="0dip">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/messages"
|
||||
|
@ -52,8 +51,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.45"
|
||||
android:layout_height="80dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -61,19 +59,19 @@
|
|||
android:id="@+id/message"
|
||||
android:inputType="textMultiLine"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.21"
|
||||
android:background="@drawable/chat_message_background"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_send_message"
|
||||
android:id="@+id/sendMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.79"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/chat_send_message" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.87"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
|
@ -17,6 +16,8 @@
|
|||
android:src="@drawable/chat_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -25,6 +26,8 @@
|
|||
android:src="@drawable/chat_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -34,6 +37,8 @@
|
|||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -43,7 +48,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:color/darker_gray"
|
||||
android:dividerHeight="1dp"
|
||||
android:layout_weight="0.13" />
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.87"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
|
@ -17,6 +16,8 @@
|
|||
android:src="@drawable/all_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -25,6 +26,8 @@
|
|||
android:src="@drawable/linphone_contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -33,14 +36,15 @@
|
|||
android:src="@drawable/new_contact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.13">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/contactsList"
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.87"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
|
@ -17,6 +16,8 @@
|
|||
android:src="@drawable/history_all"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -25,6 +26,8 @@
|
|||
android:src="@drawable/history_missed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -33,6 +36,8 @@
|
|||
android:src="@drawable/history_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
|
@ -42,6 +47,8 @@
|
|||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -51,7 +58,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:color/darker_gray"
|
||||
android:dividerHeight="1dp"
|
||||
android:layout_weight="0.13" />
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -226,9 +226,14 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
|||
throw new IllegalArgumentException("Unknown state " + state);
|
||||
}
|
||||
|
||||
String userName = LinphoneManager.getLc().getCurrentCall().getRemoteAddress().getUserName();
|
||||
String domain = LinphoneManager.getLc().getCurrentCall().getRemoteAddress().getDomain();
|
||||
String displayName = LinphoneManager.getLc().getCurrentCall().getRemoteAddress().getDisplayName();
|
||||
if (LinphoneManager.getLc().getCallsNb() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
||||
String userName = call.getRemoteAddress().getUserName();
|
||||
String domain = call.getRemoteAddress().getDomain();
|
||||
String displayName = call.getRemoteAddress().getDisplayName();
|
||||
LinphoneAddress address = LinphoneCoreFactoryImpl.instance().createLinphoneAddress("sip:" + userName + "@" + domain);
|
||||
address.setDisplayName(displayName);
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c4bf7958ab6272155547c1f12e06189e1f84275c
|
||||
Subproject commit 46a38951859ad9401d652ca8793b4b12dd4cf6e3
|
Loading…
Reference in a new issue