diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-23 00:05:12 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-23 00:05:12 +0200 |
commit | 3a16c088210733e07ffe6e1b2cc966ddae3fb19b (patch) | |
tree | 8284775bb2ce01edaea57c1cc73cbe1154b4c14c /app | |
parent | 76fb6a318e7a8e1f26cd82692750c4584cda5298 (diff) |
Make placeholder pretty
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/res/layout/tunnel_list_fragment.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/values-night/colors.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 |
4 files changed, 22 insertions, 6 deletions
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml index 377aeac1..48293133 100644 --- a/app/src/main/res/layout/tunnel_list_fragment.xml +++ b/app/src/main/res/layout/tunnel_list_fragment.xml @@ -68,17 +68,27 @@ app:fab_title="@string/create_from_file" /> </com.wireguard.android.widget.fab.FloatingActionsMenu> - <RelativeLayout + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:orientation="vertical" android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}" android:layout_gravity="center"> + <android.support.v7.widget.AppCompatImageView + android:id="@+id/logo_placeholder" + android:layout_width="140dp" + android:layout_height="140dp" + android:layout_gravity="center" + android:tint="@color/transparent_background_placeholder" + android:layout_marginTop="-70dp" + android:layout_marginBottom="20dp" + android:src="@mipmap/ic_launcher" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="24sp" - android:layout_centerInParent="true" - android:text="@string/no_tunnels_imported_placeholder" /> - </RelativeLayout> + android:layout_gravity="center" + android:textSize="20sp" + android:text="@string/tunnel_list_placeholder" /> + </LinearLayout> </android.support.design.widget.CoordinatorLayout> </layout> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 9a43b163..08a5403f 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -7,4 +7,7 @@ <color name="fab_label_background_color">#bbbbbb</color> <color name="accent">#5e97f6</color> + + <!-- TODO(msf): replace with ?android:attr/colorBackground with some alpha --> + <color name="transparent_background_placeholder">#aa2e2e2e</color> </resources> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 87454a73..d8e8018c 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -7,4 +7,7 @@ <color name="fab_label_background_color">#444444</color> <color name="accent">#2196F3</color> + + <!-- TODO(msf): replace with ?android:attr/colorBackground with some alpha --> + <color name="transparent_background_placeholder">#aafafafa</color> </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3fc245ae..bfaf71b6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -89,6 +89,7 @@ <string name="tools_installer_title">Install command line tools</string> <string name="tunnel_create_error">Unable to create tunnel: %s</string> <string name="tunnel_create_success">Successfully created tunnel ā%sā</string> + <string name="tunnel_list_placeholder">Add a tunnel using the blue button</string> <string name="tunnel_rename_error">Unable to rename tunnel: %s</string> <string name="tunnel_rename_success">Successfully renamed tunnel to ā%sā</string> <string name="version_title">WireGuard for Android v%s"</string> @@ -99,5 +100,4 @@ <string name="zip_export_error">Unable to export tunnels: %s</string> <string name="zip_export_success">Saved to %s</string> <string name="zip_export_summary">Zip file will be saved to downloads folder</string> - <string name="no_tunnels_imported_placeholder">Tap the button at the bottom to begin</string> </resources> |