Make placeholder pretty

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-07-23 00:05:12 +02:00
parent 76fb6a318e
commit 3a16c08821
4 changed files with 22 additions and 6 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>