Tablet: Add new dialer and fix edit in chat list
This commit is contained in:
parent
794a39f075
commit
30b25c32e8
7 changed files with 188 additions and 87 deletions
BIN
res/drawable-xhdpi/dialer_background.png
Normal file
BIN
res/drawable-xhdpi/dialer_background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
|
@ -9,7 +9,7 @@
|
|||
android:background="@drawable/list_selector">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete"
|
||||
android:id="@+id/delete_chatroom"
|
||||
android:button="@drawable/checkbox"
|
||||
android:contentDescription="@string/content_description_delete"
|
||||
android:paddingRight="5dp"
|
||||
|
@ -24,7 +24,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@id/draft"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
android:background="@drawable/list_selector">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete"
|
||||
android:id="@+id/delete_chatroom"
|
||||
android:button="@drawable/checkbox"
|
||||
android:contentDescription="@string/content_description_delete"
|
||||
android:paddingRight="5dp"
|
||||
|
@ -24,7 +24,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@id/draft"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -1,86 +1,101 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/dialer_background"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="300dp"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
<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="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">
|
||||
android:id="@+id/dialer"
|
||||
android:background="@color/colorH"
|
||||
android:layout_marginRight="50dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="460dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:focusable="true"
|
||||
android:id="@+id/address_bar"
|
||||
android:background="@color/colorF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true">
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add_contact"
|
||||
android:src="@drawable/contact_add_button"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:layout_width="match_parent"
|
||||
<org.linphone.ui.EraseButton
|
||||
android:id="@+id/erase"
|
||||
android:src="@drawable/backspace"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
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.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"/>
|
||||
<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>
|
||||
<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>
|
||||
|
|
100
res/layout-sw533dp/dialer.xml
Normal file
100
res/layout-sw533dp/dialer.xml
Normal 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>
|
|
@ -20,22 +20,10 @@
|
|||
android:layout_centerVertical="true"
|
||||
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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@id/draft"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -122,7 +122,7 @@ public class DialerFragment extends Fragment {
|
|||
mAddress.setPictureUri(Uri.parse(photo));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ public class DialerFragment extends Fragment {
|
|||
}
|
||||
|
||||
boolean isOrientationLandscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
|
||||
if(isOrientationLandscape) {
|
||||
if(isOrientationLandscape && !getResources().getBoolean(R.bool.isTablet)) {
|
||||
((LinearLayout) numpad).setVisibility(View.GONE);
|
||||
} else {
|
||||
((LinearLayout) numpad).setVisibility(View.VISIBLE);
|
||||
|
|
Loading…
Reference in a new issue