Commit acf65084 authored by Craig Earley's avatar Craig Earley
Browse files

fixes database actions in layout mode on phone

parent 7145743a
......@@ -4,122 +4,154 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="start">
android:padding="@dimen/phone_mode_pad"
android:baselineAligned="false"
android:gravity="center_vertical"
android:orientation="vertical">
<EditText
style="@style/credentialBoxes"
android:id="@+id/serverIp"
android:text=""
android:hint="@string/server_ip"
android:singleLine="true"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
android:baselineAligned="false"
android:gravity="start|center_vertical">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1"
android:gravity="start|center_vertical">
<EditText
style="@style/credentialBoxes"
android:id="@+id/database"
android:text=""
android:hint="@string/database_name"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:textSize="@dimen/database_actions_creds_font_small"
android:id="@+id/serverIp"
android:text=""
android:hint="@string/server_ip"
android:singleLine="true"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:id="@+id/username"
android:text=""
android:hint="@string/username"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:textSize="@dimen/database_actions_creds_font_small"
android:id="@+id/database"
android:text=""
android:hint="@string/database_name"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:id="@+id/password"
android:text=""
android:inputType="textPassword"
android:hint="@string/password"
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:textSize="@dimen/database_actions_creds_font_small"
android:id="@+id/username"
android:text=""
android:hint="@string/username"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:id="@+id/port"
android:text="@string/default_port"
android:hint="@string/port_of_db"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastUpload"
android:id="@+id/lastUpload"
android:textColor="@color/dark_gray_blue"
android:textAppearance="@android:style/TextAppearance.Medium"/>
<EditText
style="@style/credentialBoxes"
android:textSize="@dimen/database_actions_creds_font_small"
android:id="@+id/password"
android:text=""
android:inputType="textPassword"
android:hint="@string/password"
android:autofillHints=""
tools:targetApi="o" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastDownload"
android:id="@+id/lastDownload"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textColor="@color/dark_gray_blue"/>
<EditText
style="@style/credentialBoxes"
android:textSize="@dimen/database_actions_creds_font_small"
android:id="@+id/port"
android:text="@string/default_port"
android:hint="@string/port_of_db"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastClean"
android:id="@+id/lastClean"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textColor="@color/dark_gray_blue"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/databaseSize"
android:id="@+id/databaseSize"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textStyle="bold"
android:textColor="@color/dark_gray_blue" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="0.5"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_vertical">
<Button
android:text="@string/connect"
android:id="@+id/setupDbButton"
style="@style/database_button_landscape" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/databaseStatus"
android:id="@+id/databaseStatus"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textStyle="bold"
android:textColor="@color/dark_gray_blue"/>
<Button
android:text="@string/upload_tables"
android:id="@+id/uploadButton"
style="@style/database_button_landscape" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="0.5"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_vertical">
<Button
android:text="@string/copy_to_sd_card"
android:id="@+id/exportDatabaseButton"
android:onClick="exportDatabase"
style="@style/database_button_landscape" />
<Button
android:text="@string/clean_menu_toggle"
android:id="@+id/cleanOptions"
style="@style/database_button_landscape" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="end">
<Button
android:text="@string/connect"
android:id="@+id/setupDbButton"
style="@style/database_button_landscape" />
android:gravity="start|center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastUpload"
android:id="@+id/lastUpload"
android:textColor="@color/dark_gray_blue"
android:textAppearance="@android:style/TextAppearance.Medium"/>
<Button
android:text="@string/upload_tables"
android:id="@+id/uploadButton"
style="@style/database_button_landscape" />
<Button
android:text="@string/copy_to_sd_card"
android:id="@+id/exportDatabaseButton"
android:onClick="exportDatabase"
style="@style/database_button_portrait" />
<Button
android:text="@string/clean_menu_toggle"
android:id="@+id/cleanOptions"
style="@style/database_button_landscape" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastDownload"
android:id="@+id/lastDownload"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textColor="@color/dark_gray_blue"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastClean"
android:id="@+id/lastClean"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textColor="@color/dark_gray_blue"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/databaseSize"
android:id="@+id/databaseSize"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textStyle="bold"
android:textColor="@color/dark_gray_blue" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/databaseStatus"
android:id="@+id/databaseStatus"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textStyle="bold"
android:textColor="@color/dark_gray_blue"/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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:padding="@dimen/tablet_mode_pad"
android:baselineAligned="false"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_weight="1"
android:gravity="start|center_vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="start|center_vertical">
<EditText
style="@style/credentialBoxes"
android:id="@+id/serverIp"
android:text=""
android:hint="@string/server_ip"
android:singleLine="true"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:id="@+id/database"
android:text=""
android:hint="@string/database_name"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:id="@+id/username"
android:text=""
android:hint="@string/username"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:id="@+id/password"
android:text=""
android:inputType="textPassword"
android:hint="@string/password"
android:autofillHints=""
tools:targetApi="o" />
<EditText
style="@style/credentialBoxes"
android:id="@+id/port"
android:text="@string/default_port"
android:hint="@string/port_of_db"
android:inputType=""
android:autofillHints=""
tools:targetApi="o" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_vertical">
<Button
android:text="@string/connect"
android:id="@+id/setupDbButton"
style="@style/database_button_landscape" />
<Button
android:text="@string/upload_tables"
android:id="@+id/uploadButton"
style="@style/database_button_landscape" />
<Button
android:text="@string/copy_to_sd_card"
android:id="@+id/exportDatabaseButton"
android:onClick="exportDatabase"
style="@style/database_button_landscape" />
<Button
android:text="@string/clean_menu_toggle"
android:id="@+id/cleanOptions"
style="@style/database_button_landscape" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1"
android:gravity="start|center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastUpload"
android:id="@+id/lastUpload"
android:textColor="@color/dark_gray_blue"
android:textAppearance="@android:style/TextAppearance.Medium"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastDownload"
android:id="@+id/lastDownload"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textColor="@color/dark_gray_blue"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lastClean"
android:id="@+id/lastClean"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textColor="@color/dark_gray_blue"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/databaseSize"
android:id="@+id/databaseSize"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textStyle="bold"
android:textColor="@color/dark_gray_blue" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/databaseStatus"
android:id="@+id/databaseStatus"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textStyle="bold"
android:textColor="@color/dark_gray_blue"/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -2,6 +2,7 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="sample_button_font_size">30sp</dimen>
<dimen name="database_actions_button_font_size">20sp</dimen>
<dimen name="database_actions_creds_font_small">14sp</dimen>
<dimen name="sensor_sample_button_padding">0dp</dimen>
<dimen name="tablet_mode_pad">20dp</dimen>
<dimen name="phone_mode_pad">8dp</dimen>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment