Tablet: Add new dialer and fix edit in chat list

This commit is contained in:
Margaux Clerc 2016-02-12 17:43:35 +01:00
parent 794a39f075
commit 30b25c32e8
7 changed files with 188 additions and 87 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View file

@ -9,7 +9,7 @@
android:background="@drawable/list_selector"> android:background="@drawable/list_selector">
<CheckBox <CheckBox
android:id="@+id/delete" android:id="@+id/delete_chatroom"
android:button="@drawable/checkbox" android:button="@drawable/checkbox"
android:contentDescription="@string/content_description_delete" android:contentDescription="@string/content_description_delete"
android:paddingRight="5dp" android:paddingRight="5dp"
@ -24,7 +24,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toLeftOf="@id/draft"
android:orientation="horizontal"> android:orientation="horizontal">
<RelativeLayout <RelativeLayout

View file

@ -9,7 +9,7 @@
android:background="@drawable/list_selector"> android:background="@drawable/list_selector">
<CheckBox <CheckBox
android:id="@+id/delete" android:id="@+id/delete_chatroom"
android:button="@drawable/checkbox" android:button="@drawable/checkbox"
android:contentDescription="@string/content_description_delete" android:contentDescription="@string/content_description_delete"
android:paddingRight="5dp" android:paddingRight="5dp"
@ -24,7 +24,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toLeftOf="@id/draft"
android:orientation="horizontal"> android:orientation="horizontal">
<RelativeLayout <RelativeLayout

View file

@ -1,86 +1,101 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorH" android:background="@color/colorD"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ImageView
android:src="@drawable/dialer_background"
android:layout_width="wrap_content"
android:layout_height="300dp"
android:layout_centerVertical="true"/>
<RelativeLayout <RelativeLayout
android:id="@+id/address_bar" android:id="@+id/dialer"
android:background="@color/colorF" android:background="@color/colorH"
android:layout_width="match_parent" android:layout_marginRight="50dp"
android:layout_height="60dp" android:layout_centerVertical="true"
android:layout_marginBottom="10dp" android:layout_alignParentRight="true"
android:layout_alignParentTop="true"> android:layout_width="300dp"
android:layout_height="460dp">
<org.linphone.ui.EraseButton
android:id="@+id/erase"
android:src="@drawable/backspace"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp" />
<org.linphone.ui.AddressText
android:id="@+id/address"
android:background="@color/colorF"
android:textColorHint="@color/colorE"
style="@style/font5"
android:ellipsize="start"
android:inputType="textEmailAddress"
android:hint="@string/address_bar_hint"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="20dp"
android:paddingRight="5dp"
android:layout_toLeftOf="@id/erase"
android:layout_centerVertical="true"/>
</RelativeLayout>
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:layout_above="@id/controls"
android:layout_below="@id/address_bar"
android:layout_centerInParent="true"/>
<LinearLayout
android:id="@+id/controls"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="60dp">
<RelativeLayout <RelativeLayout
android:focusable="true" android:id="@+id/address_bar"
android:background="@color/colorF"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="60dp"
android:layout_weight="1" android:layout_marginBottom="10dp"
android:adjustViewBounds="true"> android:layout_alignParentTop="true">
<ImageView <org.linphone.ui.EraseButton
android:id="@+id/add_contact" android:id="@+id/erase"
android:src="@drawable/contact_add_button" android:src="@drawable/backspace"
android:background="@drawable/toolbar_button" android:layout_width="40dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="15dp" android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"/> android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp" />
<org.linphone.ui.AddressText
android:id="@+id/address"
android:background="@color/colorF"
android:textColorHint="@color/colorE"
style="@style/font5"
android:ellipsize="start"
android:inputType="textEmailAddress"
android:hint="@string/address_bar_hint"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="20dp"
android:paddingRight="5dp"
android:layout_toLeftOf="@id/erase"
android:layout_centerVertical="true"/>
</RelativeLayout> </RelativeLayout>
<org.linphone.ui.CallButton <org.linphone.ui.Numpad
android:id="@+id/call" android:id="@+id/numpad"
android:src="@drawable/call_audio_start" android:layout_width="match_parent"
android:background="@drawable/call" android:layout_height="wrap_content"
android:layout_width="match_parent" android:padding="10dp"
android:layout_height="wrap_content" android:layout_above="@id/controls"
android:padding="12dp" android:layout_below="@id/address_bar"
android:layout_weight="0.5"/> android:layout_centerInParent="true"/>
</LinearLayout> <LinearLayout
android:id="@+id/controls"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="60dp">
<RelativeLayout
android:focusable="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true">
<ImageView
android:id="@+id/add_contact"
android:src="@drawable/contact_add_button"
android:background="@drawable/toolbar_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
<org.linphone.ui.CallButton
android:id="@+id/call"
android:src="@drawable/call_audio_start"
android:background="@drawable/call"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:layout_weight="0.5"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorD"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:src="@drawable/dialer_background"
android:layout_centerHorizontal="true"
android:layout_width="400dp"
android:layout_height="wrap_content"/>
<RelativeLayout
android:background="@color/colorH"
android:layout_marginBottom="50dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_width="300dp"
android:layout_height="460dp">
<RelativeLayout
android:id="@+id/address_bar"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginBottom="10dp"
android:layout_alignParentTop="true">
<org.linphone.ui.EraseButton
android:id="@+id/erase"
android:src="@drawable/backspace"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp" />
<org.linphone.ui.AddressText
android:id="@+id/address"
android:background="@color/colorF"
android:textColorHint="@color/colorE"
style="@style/font5"
android:ellipsize="start"
android:inputType="textEmailAddress"
android:hint="@string/address_bar_hint"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="20dp"
android:paddingRight="5dp"
android:layout_toLeftOf="@id/erase"
android:layout_centerVertical="true"/>
</RelativeLayout>
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_above="@id/controls"
android:layout_below="@id/address_bar"
android:layout_centerInParent="true"/>
<LinearLayout
android:id="@+id/controls"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="60dp">
<RelativeLayout
android:focusable="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true">
<ImageView
android:id="@+id/add_contact"
android:src="@drawable/contact_add_button"
android:background="@drawable/toolbar_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
<org.linphone.ui.CallButton
android:id="@+id/call"
android:src="@drawable/call_audio_start"
android:background="@drawable/call"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:layout_weight="0.5"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View file

@ -20,22 +20,10 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:visibility="invisible" /> android:visibility="invisible" />
<TextView
android:id="@+id/draft"
android:visibility="gone"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/colorB"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toLeftOf="@id/draft"
android:orientation="horizontal"> android:orientation="horizontal">
<RelativeLayout <RelativeLayout

View file

@ -122,7 +122,7 @@ public class DialerFragment extends Fragment {
mAddress.setPictureUri(Uri.parse(photo)); mAddress.setPictureUri(Uri.parse(photo));
} }
} }
return view; return view;
} }
@ -145,7 +145,7 @@ public class DialerFragment extends Fragment {
} }
boolean isOrientationLandscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; boolean isOrientationLandscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
if(isOrientationLandscape) { if(isOrientationLandscape && !getResources().getBoolean(R.bool.isTablet)) {
((LinearLayout) numpad).setVisibility(View.GONE); ((LinearLayout) numpad).setVisibility(View.GONE);
} else { } else {
((LinearLayout) numpad).setVisibility(View.VISIBLE); ((LinearLayout) numpad).setVisibility(View.VISIBLE);