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

Commit ca25db0c authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Custom pressed states, fixed column sizes.

Use custom pressed state assets.  Use fixed column sizes to prevent
truncating of long dates on small screens.

Also tear down any active CAB when switching fragments.

Bug: 11032418, 11028212
Change-Id: I2bf3dc3f693319b4b55cc901ed460f60faceba35
parent 9095c5a8
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -18,14 +18,14 @@

    <item android:state_window_focused="false" android:drawable="@android:color/transparent" />

    <item android:state_focused="true"   android:state_activated="true" android:drawable="@*android:drawable/list_selected_holo_light" />
    <item android:state_focused="false"  android:state_activated="true" android:drawable="@*android:drawable/list_selected_holo_light" />

    <item android:state_focused="true"  android:state_enabled="false" android:state_pressed="true" android:drawable="@*android:drawable/list_selector_disabled_holo_light" />
    <item android:state_focused="true"  android:state_enabled="false"                              android:drawable="@*android:drawable/list_selector_disabled_holo_light" />
    <item android:state_focused="true"                                android:state_pressed="true" android:drawable="@*android:drawable/list_selector_background_transition_holo_light" />
    <item android:state_focused="false"                               android:state_pressed="true" android:drawable="@*android:drawable/list_selector_background_transition_holo_light" />
    <item android:state_focused="true"                                                             android:drawable="@*android:drawable/list_focused_holo" />
    <item android:state_focused="true"   android:state_activated="true" android:drawable="@drawable/ic_grid_card_focused" />
    <item android:state_focused="false"  android:state_activated="true" android:drawable="@drawable/ic_grid_card_focused" />

    <item android:state_focused="true"  android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/ic_grid_card_pressed" />
    <item android:state_focused="true"  android:state_enabled="false"                              android:drawable="@drawable/ic_grid_card_pressed" />
    <item android:state_focused="true"                                android:state_pressed="true" android:drawable="@drawable/ic_grid_card_pressed" />
    <item android:state_focused="false"                               android:state_pressed="true" android:drawable="@drawable/ic_grid_card_pressed" />
    <item android:state_focused="true"                                                             android:drawable="@drawable/ic_grid_card_pressed" />

    <item android:drawable="@android:color/transparent" />

+3 −7
Original line number Diff line number Diff line
@@ -92,10 +92,8 @@

            <TextView
                android:id="@+id/date"
                android:layout_width="0dp"
                android:layout_width="90dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.25"
                android:minWidth="70dp"
                android:singleLine="true"
                android:ellipsize="marquee"
                android:textAlignment="viewStart"
@@ -103,11 +101,9 @@

            <TextView
                android:id="@+id/size"
                android:layout_width="0dp"
                android:layout_width="90dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.25"
                android:layout_marginStart="8dp"
                android:minWidth="70dp"
                android:singleLine="true"
                android:ellipsize="marquee"
                android:textAlignment="viewStart"
@@ -117,7 +113,7 @@
                android:id="@android:id/summary"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.5"
                android:layout_weight="1"
                android:layout_marginStart="8dp"
                android:singleLine="true"
                android:ellipsize="marquee"
+4 −0
Original line number Diff line number Diff line
@@ -216,6 +216,10 @@ public class DirectoryFragment extends Fragment {
            final View view = target.getChildAt(i);
            mRecycleListener.onMovedToScrapHeap(view);
        }

        // Tear down any selection in progress
        mListView.setChoiceMode(AbsListView.CHOICE_MODE_NONE);
        mGridView.setChoiceMode(AbsListView.CHOICE_MODE_NONE);
    }

    @Override