Properly center display name, sip address & avatar on incoming/outgoing call views
This commit is contained in:
parent
1831ad9677
commit
d5a8e0f42a
2 changed files with 43 additions and 48 deletions
|
@ -72,24 +72,27 @@
|
||||||
style="@style/sip_uri_font"
|
style="@style/sip_uri_font"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical|center_horizontal"
|
android:layout_gravity="center"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:paddingBottom="10dp" />
|
android:paddingBottom="10dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:visibility="@{viewModel.earlyMediaVideoEnabled ? View.GONE : View.VISIBLE}"
|
android:visibility="@{viewModel.earlyMediaVideoEnabled ? View.GONE : View.VISIBLE, default=visible}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/top_bar"
|
android:layout_below="@id/top_bar"
|
||||||
android:layout_above="@id/buttons"
|
android:layout_above="@id/buttons"
|
||||||
android:layout_centerHorizontal="true">
|
android:layout_centerHorizontal="true">
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true">
|
android:layout_centerInParent="true"
|
||||||
|
android:paddingBottom="@dimen/status_fragment_size"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/contact_name"
|
android:id="@+id/contact_name"
|
||||||
|
@ -97,9 +100,7 @@
|
||||||
style="@style/big_contact_name_font"
|
style="@style/big_contact_name_font"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:gravity="center" />
|
||||||
android:gravity="center_vertical|center_horizontal"
|
|
||||||
android:paddingTop="10dp" />
|
|
||||||
|
|
||||||
<org.linphone.views.MarqueeTextView
|
<org.linphone.views.MarqueeTextView
|
||||||
android:id="@+id/contact_number"
|
android:id="@+id/contact_number"
|
||||||
|
@ -107,24 +108,17 @@
|
||||||
style="@style/sip_uri_font"
|
style="@style/sip_uri_font"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/contact_name"
|
android:singleLine="true" />
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_gravity="center_vertical|center_horizontal"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:paddingBottom="10dp" />
|
|
||||||
|
|
||||||
<org.linphone.contact.BigContactAvatarView
|
<org.linphone.contact.BigContactAvatarView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
android:layout_margin="5dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_below="@id/contact_number"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:gravity="center"
|
|
||||||
tools:layout="@layout/contact_avatar_big"
|
tools:layout="@layout/contact_avatar_big"
|
||||||
app:viewModel="@{viewModel}"/>
|
app:viewModel="@{viewModel}"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
|
@ -48,40 +48,41 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/top_bar"
|
android:layout_below="@id/top_bar"
|
||||||
android:layout_above="@id/buttons"
|
android:layout_above="@id/buttons"
|
||||||
android:layout_centerInParent="true">
|
android:layout_centerHorizontal="true">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/contact_name"
|
android:layout_width="match_parent"
|
||||||
android:text="@{viewModel.contact.fullName ?? viewModel.displayName}"
|
|
||||||
style="@style/big_contact_name_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerInParent="true"
|
||||||
android:gravity="center_vertical|center_horizontal"
|
android:paddingBottom="@dimen/status_fragment_size"
|
||||||
android:paddingTop="10dp" />
|
|
||||||
|
|
||||||
<org.linphone.views.MarqueeTextView
|
|
||||||
android:id="@+id/contact_number"
|
|
||||||
android:text="@{viewModel.address}"
|
|
||||||
style="@style/sip_uri_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/contact_name"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_gravity="center_vertical|center_horizontal"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:paddingBottom="10dp" />
|
|
||||||
|
|
||||||
<org.linphone.contact.BigContactAvatarView
|
|
||||||
android:id="@+id/avatar"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="200dp"
|
|
||||||
android:layout_margin="5dp"
|
|
||||||
android:layout_below="@id/contact_number"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
tools:layout="@layout/contact_avatar_big"
|
android:orientation="vertical">
|
||||||
app:viewModel="@{viewModel}"/>
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/contact_name"
|
||||||
|
android:text="@{viewModel.contact.fullName ?? viewModel.displayName}"
|
||||||
|
style="@style/big_contact_name_font"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center" />
|
||||||
|
|
||||||
|
<org.linphone.views.MarqueeTextView
|
||||||
|
android:id="@+id/contact_number"
|
||||||
|
android:text="@{viewModel.address}"
|
||||||
|
style="@style/sip_uri_font"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
<org.linphone.contact.BigContactAvatarView
|
||||||
|
android:id="@+id/avatar"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
tools:layout="@layout/contact_avatar_big"
|
||||||
|
app:viewModel="@{viewModel}"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue