Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc2f8c4e authored by Chih-Chung Chang's avatar Chih-Chung Chang Committed by Android (Google) Code Review
Browse files

Merge "Fix 5543077: Gallery UI tweaks." into ics-mr1

parents 1a9b69fb 47c476d3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:gravity="center_vertical"
    android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
    android:paddingRight="?android:attr/listPreferredItemPaddingRight"
    android:paddingLeft="18dp"
    android:paddingRight="18dp"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
/>
+5 −1
Original line number Diff line number Diff line
@@ -39,19 +39,23 @@
    </RelativeLayout>
    <RelativeLayout android:layout_width="fill_parent"
                android:layout_height="@dimen/manage_cache_bottom_height"
                android:paddingLeft="16dp"
                android:paddingRight="16dp"
                android:background="#1f1f1f">
        <TextView android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/make_available_offline"
            android:textSize="14sp"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:gravity="center_vertical"
            android:drawableLeft="@drawable/ic_menu_make_offline"
            android:drawablePadding="3dp"/>
        <Button android:id="@+id/done"
            android:layout_width="wrap_content"
            android:layout_width="74dp"
            android:layout_height="match_parent"
            android:text="@string/done"
            android:textSize="14sp"
            android:layout_alignParentRight="true"/>
    </RelativeLayout>
</LinearLayout>
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
    <dimen name="albumset_title_font_size">14sp</dimen>
    <dimen name="albumset_count_font_size">12sp</dimen>
    <dimen name="albumset_left_margin">6dp</dimen>
    <dimen name="albumset_icon_size">26dp</dimen>
    <dimen name="albumset_icon_size">25dp</dimen>

    <!-- configuration for album page -->
    <integer name="album_rows_land">2</integer>
+15 −4
Original line number Diff line number Diff line
@@ -60,11 +60,24 @@ public class ManageCacheDrawer extends IconDrawer {
            int dataSourceType, int mediaType, boolean isPanorama,
            int labelBackgroundHeight, boolean wantCache, boolean isCaching) {

        boolean selected = mSelectionManager.isItemSelected(path);
        boolean chooseToCache = wantCache ^ selected;
        boolean available = isLocal(dataSourceType) || chooseToCache;

        int x = -width / 2;
        int y = -height / 2;

        if (!available) {
            canvas.save(GLCanvas.SAVE_FLAG_ALPHA);
            canvas.multiplyAlpha(0.6f);
        }

        drawWithRotation(canvas, content, x, y, width, height, rotation);

        if (!available) {
            canvas.restore();
        }

        if (((rotation / 90) & 0x01) == 1) {
            int temp = width;
            width = height;
@@ -76,7 +89,7 @@ public class ManageCacheDrawer extends IconDrawer {
        drawMediaTypeOverlay(canvas, mediaType, isPanorama, x, y, width, height);
        drawLabelBackground(canvas, width, height, labelBackgroundHeight);
        drawIcon(canvas, width, height, dataSourceType);
        drawCachingPin(canvas, path, dataSourceType, isCaching, wantCache,
        drawCachingPin(canvas, path, dataSourceType, isCaching, chooseToCache,
                width, height);

        if (mSelectionManager.isPressedPath(path)) {
@@ -85,9 +98,7 @@ public class ManageCacheDrawer extends IconDrawer {
    }

    private void drawCachingPin(GLCanvas canvas, Path path, int dataSourceType,
            boolean isCaching, boolean wantCache, int width, int height) {
        boolean selected = mSelectionManager.isItemSelected(path);
        boolean chooseToCache = wantCache ^ selected;
            boolean isCaching, boolean chooseToCache, int width, int height) {

        ResourceTexture icon = null;
        if (isLocal(dataSourceType)) {