mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-26 17:21:31 +02:00
Debug Activity: Fix layout for small screens and landscape mode
Fixes #84
This commit is contained in:
parent
6553558947
commit
47c43e9c28
@ -1,131 +1,165 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="nodomain.freeyourgadget.gadgetbridge.ControlCenter">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:rowCount="15"
|
||||
android:alignmentMode="alignMargins">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="Message / Caller"/>
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textMultiLine"
|
||||
android:ems="10"
|
||||
android:id="@+id/editContent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/textView"
|
||||
android:text="Test" />
|
||||
android:layout_column="0"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="0"
|
||||
android:text="Message / Caller"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/sendSMSButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="send as SMS"
|
||||
android:layout_below="@+id/editContent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignEnd="@+id/incomingCallButton" />
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="2"
|
||||
android:text="send as SMS" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/sendEmailButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="2"
|
||||
android:text="send as E-Mail" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="0"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="1"
|
||||
android:ems="10"
|
||||
android:inputType="textMultiLine"
|
||||
android:text="Test" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/testNotificationButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="create test notification"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
android:layout_column="0"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="9"
|
||||
android:text="create test notification" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="set time"
|
||||
android:id="@+id/setTimeButton"
|
||||
android:layout_above="@+id/testNotificationButton"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="incoming call"
|
||||
android:layout_column="0"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="8"
|
||||
android:text="set time" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/incomingCallButton"
|
||||
android:layout_below="@+id/sendSMSButton"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="outgoing call"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="3"
|
||||
android:text="incoming call" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/outgoingCallButton"
|
||||
android:layout_alignTop="@+id/incomingCallButton"
|
||||
android:layout_alignEnd="@+id/setTimeButton"
|
||||
android:layout_toEndOf="@+id/incomingCallButton" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="send as E-Mail"
|
||||
android:id="@+id/sendEmailButton"
|
||||
android:layout_below="@+id/editContent"
|
||||
android:layout_alignStart="@+id/outgoingCallButton"
|
||||
android:layout_alignParentEnd="true" />
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="3"
|
||||
android:text="outgoing call" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="start call"
|
||||
android:id="@+id/startCallButton"
|
||||
android:layout_below="@+id/incomingCallButton"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@+id/outgoingCallButton" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="end call"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="4"
|
||||
android:text="start call" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/endCallButton"
|
||||
android:layout_below="@+id/outgoingCallButton"
|
||||
android:layout_alignEnd="@+id/outgoingCallButton"
|
||||
android:layout_toEndOf="@+id/incomingCallButton" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="set music info"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="4"
|
||||
android:text="end call" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/setMusicInfoButton"
|
||||
android:layout_below="@+id/startCallButton"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignEnd="@+id/endCallButton" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="reboot"
|
||||
android:layout_column="0"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="5"
|
||||
android:text="set music info" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/rebootButton"
|
||||
android:layout_above="@+id/setTimeButton"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignEnd="@+id/endCallButton" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Export DB"
|
||||
android:layout_column="0"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="7"
|
||||
android:text="reboot" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/exportDBButton"
|
||||
android:layout_above="@+id/rebootButton"
|
||||
android:layout_alignEnd="@+id/textView"
|
||||
android:layout_alignParentStart="true"
|
||||
android:singleLine="false" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Import DB"
|
||||
android:layout_column="0"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="6"
|
||||
android:singleLine="false"
|
||||
android:text="Export DB" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/importDBButton"
|
||||
android:layout_alignTop="@+id/exportDBButton"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_toEndOf="@+id/exportDBButton" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_row="6"
|
||||
android:text="Import DB" />
|
||||
</GridLayout>
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user