OSDN Git Service

CMFM: Fix association dialog layout
authorJorge Ruesga <jorge@ruesga.com>
Mon, 17 Mar 2014 00:18:54 +0000 (01:18 +0100)
committerJorge Ruesga <jorge@ruesga.com>
Mon, 17 Mar 2014 00:18:54 +0000 (01:18 +0100)
Change-Id: Ib2af1ce3f8ad394134fd4a52d896c4f46898e234
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
res/layout/associations_dialog.xml
res/layout/associations_item.xml
res/values-sw600dp/integers.xml [new file with mode: 0644]
res/values-sw720dp/integers.xml [new file with mode: 0644]
res/values/integers.xml

index 11cf0ed..210301a 100644 (file)
@@ -26,7 +26,7 @@
         android:stretchMode="columnWidth"
         android:scrollbars="vertical"
         android:horizontalSpacing="@dimen/default_margin"
-        android:numColumns="3" />
+        android:numColumns="@integer/associations_items_per_row" />
 
     <CheckBox android:id="@+id/associations_remember"
         android:layout_width="match_parent"
index 8299b43..9ead243 100644 (file)
@@ -18,7 +18,7 @@
   android:layout_width="@dimen/grid_width"
   android:layout_height="wrap_content"
   android:background="@drawable/holo_selection"
-  android:orientation="vertical" >
+  android:orientation="vertical">
 
     <ImageView android:id="@+id/associations_item_icon"
       android:width="@dimen/grid_image_width"
@@ -35,7 +35,7 @@
       android:layout_height="wrap_content"
       android:layout_alignParentBottom="true"
       android:textAppearance="@style/secondary_text_appearance"
-      android:paddingBottom="@dimen/default_margin"
+      android:layout_margin="@dimen/default_margin"
       android:gravity="center"
       android:textStyle="bold"
       android:singleLine="true"
diff --git a/res/values-sw600dp/integers.xml b/res/values-sw600dp/integers.xml
new file mode 100644 (file)
index 0000000..7babd0e
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2012-2013 The CyanogenMod Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Association items per row -->
+    <integer name="associations_items_per_row">5</integer>
+</resources>
diff --git a/res/values-sw720dp/integers.xml b/res/values-sw720dp/integers.xml
new file mode 100644 (file)
index 0000000..b5321b7
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2012-2013 The CyanogenMod Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Association items per row -->
+    <integer name="associations_items_per_row">6</integer>
+</resources>
index b7696d2..bf5cb5e 100644 (file)
@@ -27,4 +27,7 @@
 
     <!-- Normal edit text sise -->
     <integer name="default_edit_text_ems">8</integer>
+
+    <!-- Association items per row -->
+    <integer name="associations_items_per_row">3</integer>
 </resources>