android: Background for state panels provides separator
authorTobias Brunner <tobias@strongswan.org>
Thu, 30 May 2013 08:50:08 +0000 (10:50 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 Jul 2013 16:49:29 +0000 (18:49 +0200)
src/frontends/android/res/drawable/state_background.xml [new file with mode: 0644]
src/frontends/android/res/drawable/vpn_state_background.xml [deleted file]
src/frontends/android/res/layout/imc_state_fragment.xml
src/frontends/android/res/layout/vpn_state_fragment.xml
src/frontends/android/res/values/colors.xml

diff --git a/src/frontends/android/res/drawable/state_background.xml b/src/frontends/android/res/drawable/state_background.xml
new file mode 100644 (file)
index 0000000..ee36325
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2012-2013 Tobias Brunner
+    Hochschule fuer Technik Rapperswil
+
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+
+    This program is distributed in the hope that it will be useful, but
+    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item>
+        <shape>
+            <solid
+                android:color="@color/panel_separator" />
+        </shape>
+    </item>
+
+    <item android:bottom="2dp">
+        <shape>
+            <solid
+                android:color="@color/panel_background" />
+        </shape>
+    </item>
+
+</layer-list>
diff --git a/src/frontends/android/res/drawable/vpn_state_background.xml b/src/frontends/android/res/drawable/vpn_state_background.xml
deleted file mode 100644 (file)
index 24f469a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2012 Tobias Brunner
-    Hochschule fuer Technik Rapperswil
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
-
-    This program is distributed in the hope that it will be useful, but
-    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <solid
-        android:color="#333" />
-
-</shape>
\ No newline at end of file
index bdb3cd3..8685388 100644 (file)
@@ -16,7 +16,8 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/vpn_state_background"
+    android:paddingBottom="2dp"
+    android:background="@drawable/state_background"
     android:orientation="vertical" >
 
     <LinearLayout
@@ -46,9 +47,4 @@
 
     </LinearLayout>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="2dp"
-        android:background="?android:attr/listDivider" />
-
 </LinearLayout>
index 6353f32..e347c4c 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-    Copyright (C) 2012 Tobias Brunner
+    Copyright (C) 2012-2013 Tobias Brunner
     Copyright (C) 2012 Giuliano Grassi
     Copyright (C) 2012 Ralf Sager
     Hochschule fuer Technik Rapperswil
@@ -18,8 +18,8 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:layout_margin="5dp"
-    android:background="@drawable/vpn_state_background"
+    android:paddingBottom="2dp"
+    android:background="@drawable/state_background"
     android:orientation="vertical" >
 
     <GridLayout
@@ -83,9 +83,4 @@
         style="?android:attr/borderlessButtonStyle" >
     </Button>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="2dp"
-        android:background="?android:attr/listDivider" />
-
 </LinearLayout>
index ee8d724..4af28b4 100644 (file)
     <color
         name="success_text">#99CC00</color>
 
+    <color
+        name="panel_background">#333333</color>
+
+    <color
+        name="panel_separator">#5a5a5a</color>
+
 </resources>