make use of different dimensions for different screen sizes

This commit is contained in:
Daniel Gultsch 2015-01-13 11:52:41 +01:00
parent 1262a7cba7
commit 7d2a9624b5
15 changed files with 56 additions and 114 deletions

View file

@ -1,30 +0,0 @@
<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content_view_spl"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300dp"
android:layout_height="match_parent"
android:background="@color/primarybackground"
android:orientation="vertical" >
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/primarybackground"
android:divider="@color/divider"
android:dividerHeight="1dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/selected_conversation"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
</LinearLayout>
</android.support.v4.widget.SlidingPaneLayout>

View file

@ -1,30 +0,0 @@
<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content_view_spl"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="345dp"
android:layout_height="match_parent"
android:background="@color/primarybackground"
android:orientation="vertical" >
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/primarybackground"
android:divider="@color/divider"
android:dividerHeight="1dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/selected_conversation"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
</LinearLayout>
</android.support.v4.widget.SlidingPaneLayout>

View file

@ -1,30 +0,0 @@
<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content_view_spl"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="400dp"
android:layout_height="match_parent"
android:background="@color/primarybackground"
android:orientation="vertical" >
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/primarybackground"
android:divider="@color/divider"
android:dividerHeight="1dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/selected_conversation"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
</LinearLayout>
</android.support.v4.widget.SlidingPaneLayout>

View file

@ -13,7 +13,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:padding="16dp"> android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -12,9 +12,12 @@
<RelativeLayout <RelativeLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/infocard_border" android:background="@drawable/infocard_border"
android:padding="16dp" > android:padding="@dimen/infocard_padding" >
<QuickContactBadge <QuickContactBadge
android:id="@+id/details_contact_badge" android:id="@+id/details_contact_badge"
@ -96,11 +99,14 @@
android:id="@+id/details_contact_keys" android:id="@+id/details_contact_keys"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/infocard_border" android:background="@drawable/infocard_border"
android:divider="?android:dividerHorizontal" android:divider="?android:dividerHorizontal"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp" android:padding="@dimen/infocard_padding"
android:showDividers="middle" > android:showDividers="middle" >
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -20,10 +20,13 @@
android:id="@+id/editor" android:id="@+id/editor"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/infocard_border" android:background="@drawable/infocard_border"
android:orientation="vertical" android:orientation="vertical"
android:padding="16dp"> android:padding="@dimen/infocard_padding">
<ImageView android:id="@+id/avater" <ImageView android:id="@+id/avater"
android:layout_width="72dp" android:layout_width="72dp"
android:layout_height="72dp" android:layout_height="72dp"
@ -106,10 +109,13 @@
android:id="@+id/stats" android:id="@+id/stats"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_margin="8dp" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/infocard_border" android:background="@drawable/infocard_border"
android:orientation="vertical" android:orientation="vertical"
android:padding="16dp" android:padding="@dimen/infocard_padding"
android:visibility="gone" > android:visibility="gone" >
<TableLayout <TableLayout

View file

@ -12,10 +12,13 @@
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/infocard_border" android:background="@drawable/infocard_border"
android:orientation="vertical" android:orientation="vertical"
android:padding="16dp"> android:padding="@dimen/infocard_padding">
<TextView <TextView
android:id="@+id/muc_jabberid" android:id="@+id/muc_jabberid"
@ -118,10 +121,13 @@
android:id="@+id/muc_more_details" android:id="@+id/muc_more_details"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/infocard_border" android:background="@drawable/infocard_border"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/infocard_padding">
<LinearLayout <LinearLayout

View file

@ -13,7 +13,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:padding="16dp"> android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin">
<TextView <TextView
android:id="@+id/verification_explanation" android:id="@+id/verification_explanation"

View file

@ -5,7 +5,7 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="288dp" android:layout_width="@dimen/conversations_overview_width"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/primarybackground" android:background="@color/primarybackground"
android:orientation="vertical" > android:orientation="vertical" >

View file

@ -0,0 +1,3 @@
<resources>
<dimen name="conversations_overview_width">304dp</dimen>
</resources>

View file

@ -0,0 +1,3 @@
<resources>
<dimen name="conversations_overview_width">336dp</dimen>
</resources>

View file

@ -0,0 +1,4 @@
<resources>
<dimen name="conversations_overview_width">416dp</dimen>
<dimen name="activity_horizontal_margin">32dp</dimen>
</resources>

View file

@ -1,7 +0,0 @@
<resources>
<!-- Customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available
width. This would include 7" and 10" devices in landscape (~960dp and
~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View file

@ -0,0 +1,3 @@
<resources>
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View file

@ -1,5 +1,7 @@
<resources> <resources>
<!-- Default screen margins, per the Android Design guidelines. --> <!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_horizontal_margin">8dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen> <dimen name="activity_vertical_margin">8dp</dimen>
<dimen name="infocard_padding">16dp</dimen>
<dimen name="conversations_overview_width">288dp</dimen>
</resources> </resources>