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,32 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_alignParentTop="true"
tools:showIn="@layout/swap_blank">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_alignParentTop="true"
tools:showIn="@layout/swap_blank">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/swap_start_header" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/swap_start_header"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:padding="20dp"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:paddingEnd="30dp"
android:gravity="center"
android:textAlignment="center"
android:text="@string/swap_intro"
android:textColor="@android:color/white"
android:textSize="18sp"
tools:ignore="UnusedAttribute" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:padding="20dp"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:paddingEnd="30dp"
android:gravity="center"
android:textAlignment="center"
android:text="@string/swap_intro"
android:textColor="@android:color/white"
android:textSize="18sp"
tools:ignore="UnusedAttribute"/>
</RelativeLayout>

View File

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

View File

@ -5,20 +5,20 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:titleTextAppearance="@style/SwapTheme.Wizard.Text"
titleTextAppearance="@style/SwapTheme.Wizard.Text"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
tools:ignore="UnusedAttribute" />
android:id="@+id/toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:titleTextAppearance="@style/SwapTheme.Wizard.Text"
titleTextAppearance="@style/SwapTheme.Wizard.Text"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
tools:ignore="UnusedAttribute"/>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
android:id="@+id/fragment_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>

View File

@ -1,96 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<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="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:paddingBottom="2dip"
android:paddingTop="2dip">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:paddingBottom="2dip"
android:paddingTop="2dip">
<ImageView
android:id="@android:id/icon"
android:layout_width="48dip"
android:layout_height="48dip"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_marginLeft="10dp"
android:layout_marginTop="6dip"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
tools:src="@drawable/ic_launcher" />
android:id="@android:id/icon"
android:layout_width="48dip"
android:layout_height="48dip"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_marginLeft="10dp"
android:layout_marginTop="6dip"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
tools:src="@drawable/ic_launcher"/>
<LinearLayout
android:id="@+id/button_or_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:orientation="vertical"
android:gravity="end"
android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
android:layout_marginRight="10dp">
android:id="@+id/button_or_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:orientation="vertical"
android:gravity="end"
android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
android:layout_marginRight="10dp">
<Button
android:id="@+id/btn_install"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/swap_light_blue"
android:textColor="@android:color/white"
android:maxEms="10"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/menu_install"
tools:ignore="UnusedAttribute" />
android:id="@+id/btn_install"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/swap_light_blue"
android:textColor="@android:color/white"
android:maxEms="10"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/menu_install"
tools:ignore="UnusedAttribute"/>
<TextView
android:id="@+id/status_installed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="italic"
android:text="@string/app_installed" />
android:id="@+id/status_installed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="italic"
android:text="@string/app_installed"/>
<TextView
android:id="@+id/status_incompatible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="italic"
android:textColor="@color/swap_incompatible"
android:text="@string/app_incompatible" />
android:id="@+id/status_incompatible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="italic"
android:textColor="@color/swap_incompatible"
android:text="@string/app_incompatible"/>
</LinearLayout>
<TextView
android:id="@+id/name"
android:layout_toEndOf="@android:id/icon"
android:layout_toRightOf="@android:id/icon"
android:layout_toStartOf="@+id/button_or_text"
android:layout_toLeftOf="@+id/button_or_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_marginLeft="10dp"
android:layout_marginTop="6dip"
android:layout_marginBottom="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="F-Droid" />
android:id="@+id/name"
android:layout_toEndOf="@android:id/icon"
android:layout_toRightOf="@android:id/icon"
android:layout_toStartOf="@+id/button_or_text"
android:layout_toLeftOf="@+id/button_or_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_marginLeft="10dp"
android:layout_marginTop="6dip"
android:layout_marginBottom="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="F-Droid"/>
<ProgressBar
android:id="@+id/progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
style="?android:attr/progressBarStyleHorizontal"
android:layout_toEndOf="@android:id/icon"
android:paddingStart="5dp"
android:paddingLeft="5dp"
android:paddingEnd="5dp"
android:paddingRight="5dp"
android:layout_toRightOf="@android:id/icon"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/name"
/>
android:id="@+id/progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
style="?android:attr/progressBarStyleHorizontal"
android:layout_toEndOf="@android:id/icon"
android:paddingStart="5dp"
android:paddingLeft="5dp"
android:paddingEnd="5dp"
android:paddingRight="5dp"
android:layout_toRightOf="@android:id/icon"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/name"
/>
</RelativeLayout>

View File

@ -5,205 +5,205 @@
http://stackoverflow.com/questions/27449776/conflicting-lint-messages-regarding-paddingstart-usage?lq=1
-->
<org.fdroid.fdroid.views.swap.StartSwapView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".views.swap.SwapWorkflowActivity">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".views.swap.SwapWorkflowActivity">
<!-- Misc header -->
<include layout="@layout/start_swap_header" />
<include layout="@layout/start_swap_header"/>
<!-- Bluetooth swap status + toggle -->
<LinearLayout
android:id="@+id/bluetooth_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/header"
android:padding="10dp"
android:orientation="horizontal">
android:id="@+id/bluetooth_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/header"
android:padding="10dp"
android:orientation="horizontal">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:tint="@color/swap_grey_icon"
android:src="@drawable/ic_bluetooth_white" />
android:layout_width="24dp"
android:layout_height="24dp"
android:tint="@color/swap_grey_icon"
android:src="@drawable/ic_bluetooth_white"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingStart="15dp"
android:layout_weight="1.00"
tools:ignore="RtlSymmetry">
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingStart="15dp"
android:layout_weight="1.00"
tools:ignore="RtlSymmetry">
<TextView
android:id="@+id/bluetooth_visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/swap_visible_bluetooth"
android:textSize="18sp" />
android:id="@+id/bluetooth_visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/swap_visible_bluetooth"
android:textSize="18sp"/>
<TextView
android:id="@+id/device_id_bluetooth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="SP-120"
android:textColor="@color/swap_light_text" />
android:id="@+id/device_id_bluetooth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="SP-120"
android:textColor="@color/swap_light_text"/>
</LinearLayout>
<android.support.v7.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:id="@+id/switch_bluetooth" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:id="@+id/switch_bluetooth"/>
</LinearLayout>
<!-- WiFi swap status + toggle -->
<LinearLayout
android:id="@+id/wifi_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/bluetooth_info"
android:padding="10dp"
android:orientation="horizontal">
android:id="@+id/wifi_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/bluetooth_info"
android:padding="10dp"
android:orientation="horizontal">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:tint="@color/swap_grey_icon"
android:src="@drawable/ic_network_wifi_white" />
android:layout_width="24dp"
android:layout_height="24dp"
android:tint="@color/swap_grey_icon"
android:src="@drawable/ic_network_wifi_white"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingStart="15dp"
android:layout_weight="1.00"
tools:ignore="RtlSymmetry">
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingStart="15dp"
android:layout_weight="1.00"
tools:ignore="RtlSymmetry">
<TextView
android:id="@+id/wifi_visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/swap_not_visible_wifi"
android:textSize="18sp" />
android:id="@+id/wifi_visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/swap_not_visible_wifi"
android:textSize="18sp"/>
<TextView
android:id="@+id/device_id_wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/swap_wifi_device_name"
android:textColor="@color/swap_light_text" />
android:id="@+id/device_id_wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/swap_wifi_device_name"
android:textColor="@color/swap_light_text"/>
<TextView
android:id="@+id/wifi_network"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="wifi network name"
android:textColor="@color/swap_bright_blue"
android:textSize="16sp" />
android:id="@+id/wifi_network"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="wifi network name"
android:textColor="@color/swap_bright_blue"
android:textSize="16sp"/>
</LinearLayout>
<android.support.v7.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:id="@+id/switch_wifi" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:id="@+id/switch_wifi"/>
</LinearLayout>
<!-- Feedback for "searching for nearby people..." -->
<LinearLayout
android:id="@+id/feedback_searching"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/wifi_info"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:paddingBottom="5dp"
android:paddingTop="20dp">
android:id="@+id/feedback_searching"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/wifi_info"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:paddingBottom="5dp"
android:paddingTop="20dp">
<TextView
android:id="@+id/text_people_nearby"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/swap_people_nearby"
android:textColor="@color/swap_light_text"
android:layout_weight="1.00"/>
android:id="@+id/text_people_nearby"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/swap_people_nearby"
android:textColor="@color/swap_light_text"
android:layout_weight="1.00"/>
<ProgressBar
android:id="@+id/searching_people_nearby"
android:layout_width="24dp"
android:layout_height="24dp"
android:indeterminate="true" />
android:id="@+id/searching_people_nearby"
android:layout_width="24dp"
android:layout_height="24dp"
android:indeterminate="true"/>
</LinearLayout>
<!-- Buttons to help the user when they can't find any peers. Shown at bottom of relative layout -->
<LinearLayout
android:id="@+id/cant_find_peers"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
android:id="@+id/cant_find_peers"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<Button
android:id="@+id/btn_send_fdroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_fdroid_grey"
android:drawableStart="@drawable/ic_fdroid_grey"
android:text="@string/swap_send_fdroid"
android:drawablePadding="10dp"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:paddingEnd="25dp"
android:background="@android:color/transparent" />
android:id="@+id/btn_send_fdroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_fdroid_grey"
android:drawableStart="@drawable/ic_fdroid_grey"
android:text="@string/swap_send_fdroid"
android:drawablePadding="10dp"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:paddingEnd="25dp"
android:background="@android:color/transparent"/>
<Button
android:id="@+id/btn_qr_scanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_qr_grey"
android:drawableStart="@drawable/ic_qr_grey"
android:text="@string/swap_scan_qr"
android:drawablePadding="10dp"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:paddingEnd="25dp"
android:background="@android:color/transparent" />
android:id="@+id/btn_qr_scanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_qr_grey"
android:drawableStart="@drawable/ic_qr_grey"
android:text="@string/swap_scan_qr"
android:drawablePadding="10dp"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:paddingEnd="25dp"
android:background="@android:color/transparent"/>
</LinearLayout>
<!-- Heading for "can't find peers" -->
<TextView
android:id="@+id/header_cant_find_peers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/cant_find_peers"
android:text="@string/swap_cant_find_peers"
android:paddingLeft="20dp"
android:paddingStart="20dp"
android:paddingRight="20dp"
android:paddingEnd="20dp"
android:paddingTop="20dp"
android:textColor="@color/swap_light_text" />
android:id="@+id/header_cant_find_peers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/cant_find_peers"
android:text="@string/swap_cant_find_peers"
android:paddingLeft="20dp"
android:paddingStart="20dp"
android:paddingRight="20dp"
android:paddingEnd="20dp"
android:paddingTop="20dp"
android:textColor="@color/swap_light_text"/>
<!-- List of all currently known peers (i.e. bluetooth and wifi devices that have been identified -->
<ListView
android:id="@+id/list_people_nearby"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/feedback_searching"
android:layout_above="@id/header_cant_find_peers">
android:id="@+id/list_people_nearby"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/feedback_searching"
android:layout_above="@id/header_cant_find_peers">
</ListView>

View File

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.ConfirmReceive xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/swap_blue"
android:padding="18dp">
<org.fdroid.fdroid.views.swap.ConfirmReceive
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/swap_blue"
android:padding="18dp">
<!-- Padding is 32px * 0.56 = 18dip -->
<ImageView
@ -17,7 +18,7 @@
android:layout_width="117.6dp"
android:layout_height="117.6dp"
android:layout_centerHorizontal="true"/>
<!-- 210 * 0.56 = 117.6 -->
<!-- 210 * 0.56 = 117.6 -->
<TextView
android:id="@+id/text_title"
@ -27,10 +28,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="28sp"
android:lines="1" />
<!-- 60 * 0.56 = 33.6 -->
<!-- Temporarily making it smaller than 33.6 until we figure out how to
prevent line breaks on the hyphen in F-Droid. -->
android:lines="1"/>
<!-- 60 * 0.56 = 33.6 -->
<!-- Temporarily making it smaller than 33.6 until we figure out how to
prevent line breaks on the hyphen in F-Droid. -->
<TextView
android:id="@+id/text_description"
@ -40,7 +41,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="25.75sp"/>
<!-- 46px * 0.56 = 25.76sp -->
<!-- 46px * 0.56 = 25.76sp -->
<LinearLayout
android:layout_width="wrap_content"
@ -49,9 +50,9 @@
android:layout_below="@+id/text_description"
android:layout_centerInParent="true"
android:layout_marginTop="45dp">
<!-- 80px * 0.56 = 45dp -->
<!-- 80px * 0.56 = 45dp -->
<!-- TODO: Remove associated style files style="@style/SwapTheme.Wizard.ReceiveSwap.Deny"-->
<!-- TODO: Remove associated style files style="@style/SwapTheme.Wizard.ReceiveSwap.Deny"-->
<Button
android:id="@+id/no_button"
android:text="@string/no"
@ -60,7 +61,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="25dp"
android:layout_marginRight="25dp"
tools:ignore="UnusedAttribute" />
tools:ignore="UnusedAttribute"/>
<!-- TODO: Remove associated style files style="@style/SwapTheme.Wizard.ReceiveSwap.Confirm" -->
<Button
@ -69,7 +70,7 @@
android:backgroundTint="@color/swap_light_blue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="UnusedAttribute" />
tools:ignore="UnusedAttribute"/>
</LinearLayout>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.SwapConnecting
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
<TextView
android:id="@+id/heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -16,15 +16,15 @@
android:textAlignment="center"
android:gravity="center"
tools:text="Connecting with Nexus 4"
tools:ignore="UnusedAttribute" />
tools:ignore="UnusedAttribute"/>
<ProgressBar
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:layout_gravity="center" />
android:layout_gravity="center"/>
<TextView
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/error"
@ -34,9 +34,9 @@
android:text="@string/swap_connection_misc_error"
android:visibility="gone"
android:padding="30dp"
tools:ignore="UnusedAttribute" />
tools:ignore="UnusedAttribute"/>
<Button
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/back"
@ -45,6 +45,6 @@
android:layout_gravity="center_horizontal"
android:visibility="gone"
android:text="@string/back"
tools:ignore="UnusedAttribute" />
tools:ignore="UnusedAttribute"/>
</org.fdroid.fdroid.views.swap.SwapConnecting>

View File

@ -1,26 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.InitialLoadingView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/swap_blue"
android:paddingTop="38.8dp"> <!-- 69px * 96dpi / 160dpi -->
<org.fdroid.fdroid.views.swap.InitialLoadingView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/swap_blue"
android:paddingTop="38.8dp"> <!-- 69px * 96dpi / 160dpi -->
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
/>
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loading"
android:textSize="18sp"
android:layout_below="@+id/progress"
android:textColor="@android:color/white"
android:layout_centerHorizontal="true" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loading"
android:textSize="18sp"
android:layout_below="@+id/progress"
android:textColor="@android:color/white"
android:layout_centerHorizontal="true"/>
</org.fdroid.fdroid.views.swap.InitialLoadingView>

View File

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

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.NfcView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/swap_blue"
android:paddingTop="38.8dp"> <!-- 69px * 96dpi / 160dpi -->
<org.fdroid.fdroid.views.swap.NfcView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/swap_blue"
android:paddingTop="38.8dp"> <!-- 69px * 96dpi / 160dpi -->
<ImageView
android:layout_width="wrap_content"
@ -21,7 +22,7 @@
style="@style/SwapTheme.Wizard.MainText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/icon_nfc" />
android:layout_below="@id/icon_nfc"/>
<CheckBox
android:id="@+id/checkbox_dont_show"

View File

@ -1,45 +1,45 @@
<?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="?attr/listPreferredItemHeight"
android:orientation="horizontal"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingBottom="4dip"
android:paddingTop="4dip">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeight"
android:orientation="horizontal"
android:minHeight="?attr/listPreferredItemHeight"
android:paddingBottom="4dip"
android:paddingTop="4dip">
<RelativeLayout
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_gravity="center_vertical">
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_gravity="center_vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/circle"
android:tint="@color/swap_light_grey_icon"/>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/circle"
android:tint="@color/swap_light_grey_icon"/>
<ImageView
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_centerInParent="true"
tools:src="@drawable/ic_bluetooth_white" />
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_centerInParent="true"
tools:src="@drawable/ic_bluetooth_white"/>
</RelativeLayout>
<TextView
android:id="@+id/peer_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:textSize="20sp"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="Nexus 4" />
android:id="@+id/peer_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:textSize="20sp"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="Nexus 4"/>
</LinearLayout>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.WifiQrView
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/swap_blue"
android:layout_height="match_parent"
android:layout_width="wrap_content">
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/swap_blue"
android:layout_height="match_parent"
android:layout_width="wrap_content">
<LinearLayout android:orientation="vertical"
android:gravity="center"
@ -20,10 +20,10 @@
tools:src="@drawable/swap_qr_example"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/swap_scan_or_type_url"
style="@style/SwapTheme.Wizard.MainText"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/swap_scan_or_type_url"
style="@style/SwapTheme.Wizard.MainText"/>
<!--
<Button style="@style/SwapTheme.Wizard.OptionButton"
@ -45,12 +45,12 @@
android:id="@+id/btn_qr_scanner"/>
<TextView
android:id="@+id/warning_qr_scanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/warning_scaning_qr_code"
android:visibility="gone"
style="@style/SwapTheme.Wizard.QRScanWarningText"/>
android:id="@+id/warning_qr_scanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/warning_scaning_qr_code"
android:visibility="gone"
style="@style/SwapTheme.Wizard.QRScanWarningText"/>
</LinearLayout>