standardized code format for all swap layout XML

This commit is contained in:
Hans-Christoph Steiner 2019-05-06 10:50:44 +02:00
parent a8fc3d2b2c
commit 40c52821fa
12 changed files with 370 additions and 364 deletions

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/header" android:id="@+id/header"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -11,7 +12,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/swap_start_header" /> android:src="@drawable/swap_start_header"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -27,6 +28,6 @@
android:text="@string/swap_intro" android:text="@string/swap_intro"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="18sp" android:textSize="18sp"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
</RelativeLayout> </RelativeLayout>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/header" android:id="@+id/header"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -14,11 +14,11 @@
titleTextAppearance="@style/SwapTheme.Wizard.Text" titleTextAppearance="@style/SwapTheme.Wizard.Text"
android:minHeight="?attr/actionBarSize" android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
<FrameLayout <FrameLayout
android:id="@+id/fragment_container" android:id="@+id/fragment_container"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" /> android:layout_height="fill_parent"/>
</LinearLayout> </LinearLayout>

View File

@ -17,7 +17,7 @@
android:layout_marginTop="6dip" android:layout_marginTop="6dip"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
tools:src="@drawable/ic_launcher" /> tools:src="@drawable/ic_launcher"/>
<LinearLayout <LinearLayout
android:id="@+id/button_or_text" android:id="@+id/button_or_text"
@ -41,14 +41,14 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/menu_install" android:text="@string/menu_install"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
<TextView <TextView
android:id="@+id/status_installed" android:id="@+id/status_installed"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="italic" android:textStyle="italic"
android:text="@string/app_installed" /> android:text="@string/app_installed"/>
<TextView <TextView
android:id="@+id/status_incompatible" android:id="@+id/status_incompatible"
@ -56,7 +56,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="italic" android:textStyle="italic"
android:textColor="@color/swap_incompatible" android:textColor="@color/swap_incompatible"
android:text="@string/app_incompatible" /> android:text="@string/app_incompatible"/>
</LinearLayout> </LinearLayout>
@ -73,7 +73,7 @@
android:layout_marginTop="6dip" android:layout_marginTop="6dip"
android:layout_marginBottom="6dip" android:layout_marginBottom="6dip"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="F-Droid" /> tools:text="F-Droid"/>
<ProgressBar <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"

View File

@ -13,7 +13,7 @@
tools:context=".views.swap.SwapWorkflowActivity"> tools:context=".views.swap.SwapWorkflowActivity">
<!-- Misc header --> <!-- Misc header -->
<include layout="@layout/start_swap_header" /> <include layout="@layout/start_swap_header"/>
<!-- Bluetooth swap status + toggle --> <!-- Bluetooth swap status + toggle -->
<LinearLayout <LinearLayout
@ -28,7 +28,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:tint="@color/swap_grey_icon" android:tint="@color/swap_grey_icon"
android:src="@drawable/ic_bluetooth_white" /> android:src="@drawable/ic_bluetooth_white"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
@ -44,14 +44,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="@string/swap_visible_bluetooth" tools:text="@string/swap_visible_bluetooth"
android:textSize="18sp" /> android:textSize="18sp"/>
<TextView <TextView
android:id="@+id/device_id_bluetooth" android:id="@+id/device_id_bluetooth"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="SP-120" tools:text="SP-120"
android:textColor="@color/swap_light_text" /> android:textColor="@color/swap_light_text"/>
</LinearLayout> </LinearLayout>
@ -59,7 +59,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:enabled="false"
android:id="@+id/switch_bluetooth" /> android:id="@+id/switch_bluetooth"/>
</LinearLayout> </LinearLayout>
@ -76,7 +76,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:tint="@color/swap_grey_icon" android:tint="@color/swap_grey_icon"
android:src="@drawable/ic_network_wifi_white" /> android:src="@drawable/ic_network_wifi_white"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
@ -92,14 +92,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="@string/swap_not_visible_wifi" tools:text="@string/swap_not_visible_wifi"
android:textSize="18sp" /> android:textSize="18sp"/>
<TextView <TextView
android:id="@+id/device_id_wifi" android:id="@+id/device_id_wifi"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/swap_wifi_device_name" android:text="@string/swap_wifi_device_name"
android:textColor="@color/swap_light_text" /> android:textColor="@color/swap_light_text"/>
<TextView <TextView
android:id="@+id/wifi_network" android:id="@+id/wifi_network"
@ -107,7 +107,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="wifi network name" tools:text="wifi network name"
android:textColor="@color/swap_bright_blue" android:textColor="@color/swap_bright_blue"
android:textSize="16sp" /> android:textSize="16sp"/>
</LinearLayout> </LinearLayout>
@ -115,7 +115,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:enabled="false"
android:id="@+id/switch_wifi" /> android:id="@+id/switch_wifi"/>
</LinearLayout> </LinearLayout>
@ -142,7 +142,7 @@
android:id="@+id/searching_people_nearby" android:id="@+id/searching_people_nearby"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:indeterminate="true" /> android:indeterminate="true"/>
</LinearLayout> </LinearLayout>
@ -166,7 +166,7 @@
android:paddingLeft="25dp" android:paddingLeft="25dp"
android:paddingRight="25dp" android:paddingRight="25dp"
android:paddingEnd="25dp" android:paddingEnd="25dp"
android:background="@android:color/transparent" /> android:background="@android:color/transparent"/>
<Button <Button
android:id="@+id/btn_qr_scanner" android:id="@+id/btn_qr_scanner"
@ -179,7 +179,7 @@
android:paddingLeft="25dp" android:paddingLeft="25dp"
android:paddingRight="25dp" android:paddingRight="25dp"
android:paddingEnd="25dp" android:paddingEnd="25dp"
android:background="@android:color/transparent" /> android:background="@android:color/transparent"/>
</LinearLayout> </LinearLayout>
@ -195,7 +195,7 @@
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingEnd="20dp" android:paddingEnd="20dp"
android:paddingTop="20dp" android:paddingTop="20dp"
android:textColor="@color/swap_light_text" /> android:textColor="@color/swap_light_text"/>
<!-- List of all currently known peers (i.e. bluetooth and wifi devices that have been identified --> <!-- List of all currently known peers (i.e. bluetooth and wifi devices that have been identified -->
<ListView <ListView

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.ConfirmReceive xmlns:android="http://schemas.android.com/apk/res/android" <org.fdroid.fdroid.views.swap.ConfirmReceive
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -27,7 +28,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="28sp" android:textSize="28sp"
android:lines="1" /> android:lines="1"/>
<!-- 60 * 0.56 = 33.6 --> <!-- 60 * 0.56 = 33.6 -->
<!-- Temporarily making it smaller than 33.6 until we figure out how to <!-- Temporarily making it smaller than 33.6 until we figure out how to
prevent line breaks on the hyphen in F-Droid. --> prevent line breaks on the hyphen in F-Droid. -->
@ -60,7 +61,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="25dp" android:layout_marginEnd="25dp"
android:layout_marginRight="25dp" android:layout_marginRight="25dp"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
<!-- TODO: Remove associated style files style="@style/SwapTheme.Wizard.ReceiveSwap.Confirm" --> <!-- TODO: Remove associated style files style="@style/SwapTheme.Wizard.ReceiveSwap.Confirm" -->
<Button <Button
@ -69,7 +70,7 @@
android:backgroundTint="@color/swap_light_blue" android:backgroundTint="@color/swap_light_blue"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
</LinearLayout> </LinearLayout>

View File

@ -16,13 +16,13 @@
android:textAlignment="center" android:textAlignment="center"
android:gravity="center" android:gravity="center"
tools:text="Connecting with Nexus 4" tools:text="Connecting with Nexus 4"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
<ProgressBar <ProgressBar
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:indeterminate="true" android:indeterminate="true"
android:layout_gravity="center" /> android:layout_gravity="center"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -34,7 +34,7 @@
android:text="@string/swap_connection_misc_error" android:text="@string/swap_connection_misc_error"
android:visibility="gone" android:visibility="gone"
android:padding="30dp" android:padding="30dp"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
<Button <Button
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -45,6 +45,6 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:visibility="gone" android:visibility="gone"
android:text="@string/back" android:text="@string/back"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute"/>
</org.fdroid.fdroid.views.swap.SwapConnecting> </org.fdroid.fdroid.views.swap.SwapConnecting>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.InitialLoadingView xmlns:android="http://schemas.android.com/apk/res/android" <org.fdroid.fdroid.views.swap.InitialLoadingView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -21,6 +22,6 @@
android:textSize="18sp" android:textSize="18sp"
android:layout_below="@+id/progress" android:layout_below="@+id/progress"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:layout_centerHorizontal="true" /> android:layout_centerHorizontal="true"/>
</org.fdroid.fdroid.views.swap.InitialLoadingView> </org.fdroid.fdroid.views.swap.InitialLoadingView>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.JoinWifiView xmlns:android="http://schemas.android.com/apk/res/android" <org.fdroid.fdroid.views.swap.JoinWifiView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/swap_blue" android:background="@color/swap_blue"
tools:context=".views.swap.SwapWorkflowActivity"> tools:context=".views.swap.SwapWorkflowActivity">
@ -24,7 +25,7 @@
android:id="@+id/wifi_icon" android:id="@+id/wifi_icon"
android:src="@drawable/wifi" android:src="@drawable/wifi"
android:layout_below="@+id/text_description" android:layout_below="@+id/text_description"
android:layout_centerHorizontal="true" /> android:layout_centerHorizontal="true"/>
<!-- <!--
<Button style="@style/SwapTheme.Wizard.OptionButton" <Button style="@style/SwapTheme.Wizard.OptionButton"
@ -40,7 +41,7 @@
android:id="@+id/wifi_ssid" android:id="@+id/wifi_ssid"
style="@style/SwapTheme.Wizard.WifiSSID" style="@style/SwapTheme.Wizard.WifiSSID"
android:layout_below="@id/wifi_icon" android:layout_below="@id/wifi_icon"
android:layout_centerHorizontal="true" /> android:layout_centerHorizontal="true"/>
<!--android:layout_above="@id/wifi_available_networks_prompt"--> <!--android:layout_above="@id/wifi_available_networks_prompt"-->
<TextView <TextView

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.NfcView xmlns:android="http://schemas.android.com/apk/res/android" <org.fdroid.fdroid.views.swap.NfcView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -21,7 +22,7 @@
style="@style/SwapTheme.Wizard.MainText" style="@style/SwapTheme.Wizard.MainText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/icon_nfc" /> android:layout_below="@id/icon_nfc"/>
<CheckBox <CheckBox
android:id="@+id/checkbox_dont_show" android:id="@+id/checkbox_dont_show"

View File

@ -27,7 +27,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
tools:src="@drawable/ic_bluetooth_white" /> tools:src="@drawable/ic_bluetooth_white"/>
</RelativeLayout> </RelativeLayout>
@ -40,6 +40,6 @@
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart" android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:textSize="20sp" android:textSize="20sp"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="Nexus 4" /> tools:text="Nexus 4"/>
</LinearLayout> </LinearLayout>