summaryrefslogtreecommitdiffstats
path: root/res/layout/preference_memoryusage.xml
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-05-06 14:12:13 -0700
committerGilles Debunne <debunne@google.com>2011-05-06 14:12:15 -0700
commit783be0a24f328d7e781b5765b7688c55fb24c89c (patch)
tree07177f571eefff9e23f9db444ddaed1846f92e96 /res/layout/preference_memoryusage.xml
parent934d21dc2a30a1ec985ece13f9b95599ba56fdd7 (diff)
downloadpackages_apps_Settings-783be0a24f328d7e781b5765b7688c55fb24c89c.zip
packages_apps_Settings-783be0a24f328d7e781b5765b7688c55fb24c89c.tar.gz
packages_apps_Settings-783be0a24f328d7e781b5765b7688c55fb24c89c.tar.bz2
Fixes in UsageBarPreference
The widget layout that was used resulted in a clipped usage bar. It also had a 6dip left offset inherited from the default layout which adds margin after the text (even if the text is empty here). Used a custom layout for the whole preference to fix this issue. Other fixes in the drawing code to prevent accumulative rounding issues. Change-Id: Ief9bf85260345355615c9670624d86f0893eb2d2
Diffstat (limited to 'res/layout/preference_memoryusage.xml')
-rw-r--r--res/layout/preference_memoryusage.xml19
1 files changed, 13 insertions, 6 deletions
diff --git a/res/layout/preference_memoryusage.xml b/res/layout/preference_memoryusage.xml
index 60b2ba8..2882535 100644
--- a/res/layout/preference_memoryusage.xml
+++ b/res/layout/preference_memoryusage.xml
@@ -13,17 +13,24 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:gravity="center_vertical"
+ android:paddingRight="?android:attr/scrollbarSize"
+ android:paddingLeft="@*android:dimen/preference_widget_width">
-<com.android.settings.deviceinfo.PercentageBarChart
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
+ <com.android.settings.deviceinfo.PercentageBarChart
+ android:id="@+id/percentage_bar_chart"
android:layout_width="match_parent"
android:layout_height="32dip"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
- android:id="@+id/percentage_bar_chart"
- android:paddingRight="?android:attr/scrollbarSize"
settings:minTickWidth="6dip"
settings:emptyColor="@color/memory_avail">
+ </com.android.settings.deviceinfo.PercentageBarChart>
-</com.android.settings.deviceinfo.PercentageBarChart>
+</LinearLayout>