Delete small about view and use proper margins for the view instead of hardcoded spacing causing troubles on small screens

This commit is contained in:
Gautier Pelloux-Prayer 2014-11-10 14:19:56 +01:00
parent e210d9d761
commit 59b52f52ce
2 changed files with 34 additions and 80 deletions

View file

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/background"
android:gravity="center">
<ImageView
android:contentDescription="@string/content_description_welcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_linphone_57x57" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/text_default"
android:textSize="30dp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_text"
android:autoLink="web"
android:gravity="center"
android:paddingTop="50sp"
android:textStyle="bold"
android:textColor="@color/text_contrast"
android:id="@+id/AboutText"/>
<Button
android:id="@+id/send_log"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30sp"
android:text="@string/menu_send_log"
android:visibility="gone" />
<Button android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_exit"
android:visibility="visible"
android:layout_marginTop="30sp"/>
</LinearLayout>
</ScrollView>

View file

@ -5,30 +5,34 @@
android:orientation="vertical"
android:background="@drawable/background"
android:gravity="center">
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
<ImageView
android:contentDescription="@string/content_description_welcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_linphone_57x57" />
<View android:layout_weight="5" android:layout_width="0dp" android:layout_height="0dp" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/text_default"
android:textSize="30dp"
android:textStyle="bold" />
<TextView
<View android:layout_weight="50" android:layout_width="0dp" android:layout_height="0dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_text"
android:gravity="center"
android:paddingTop="50sp"
android:gravity="center"
android:textStyle="bold"
android:textColor="@color/text_contrast"
android:id="@+id/AboutText"/>
@ -43,19 +47,28 @@
android:textColor="@color/text_contrast"
android:id="@+id/AboutLink"/>
<Button
android:id="@+id/send_log"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30sp"
android:text="@string/menu_send_log"
android:visibility="gone" />
<Button android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_exit"
android:visibility="visible"
android:layout_marginTop="30sp"/>
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
<LinearLayout
android:layout_width="fill_parent"
android:gravity="center"
android:layout_height="wrap_content">
<View android:layout_weight="1" android:layout_width="0dp" android:layout_height="0dp" />
<Button
android:id="@+id/send_log"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_send_log"/>
<View android:layout_weight="1" android:layout_width="0dp" android:layout_height="0dp" />
<Button android:id="@+id/exit"
android:layout_toRightOf="@id/send_log"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_exit"
android:visibility="visible"/>
<View android:layout_weight="1" android:layout_width="0dp" android:layout_height="0dp" />
</LinearLayout>
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
</LinearLayout>