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

Commit 1705b2a5 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix some oddities in ResolverActivity" into jb-dev

parents 92d7f9ff 9bee4664
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -209,6 +209,20 @@ public class ResolverActivity extends AlertActivity implements AdapterView.OnIte
        }
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        if (mAlwaysUseOption) {
            final int checkedPos = mGrid.getCheckedItemPosition();
            final boolean enabled = checkedPos != GridView.INVALID_POSITION;
            mAlwaysButton.setEnabled(enabled);
            mOnceButton.setEnabled(enabled);
            if (enabled) {
                mGrid.setSelection(checkedPos);
            }
        }
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        if (mAlwaysUseOption) {
@@ -216,6 +230,9 @@ public class ResolverActivity extends AlertActivity implements AdapterView.OnIte
            final boolean enabled = checkedPos != GridView.INVALID_POSITION;
            mAlwaysButton.setEnabled(enabled);
            mOnceButton.setEnabled(enabled);
            if (enabled) {
                mGrid.smoothScrollToPosition(checkedPos);
            }
        } else {
            startSelected(position, false);
        }
+14 −9
Original line number Diff line number Diff line
@@ -23,15 +23,20 @@
              android:divider="?android:attr/dividerHorizontal"
              android:showDividers="middle"
              android:dividerPadding="0dip">
    <FrameLayout android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_weight="1">
        <GridView
            android:layout_gravity="center"
        android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:id="@+id/resolver_grid"
            android:numColumns="4"
            android:columnWidth="128dp"
            android:padding="16dp"
        android:clipToPadding="false" />
            android:clipToPadding="false"
            android:scrollbarStyle="outsideOverlay" />
    </FrameLayout>
    <LinearLayout
        android:id="@+id/button_bar"
        android:visibility="gone"
+1 −1
Original line number Diff line number Diff line
@@ -3562,7 +3562,7 @@

    <!-- Title for a button to choose the currently selected activity
         as the default in the activity resolver. [CHAR LIMIT=25] -->
    <string name="activity_resolver_use_always">Use Always</string>
    <string name="activity_resolver_use_always">Always</string>

    <!-- Title for a button to choose the currently selected activity
         from the activity resolver to use just this once. [CHAR LIMIT=25] -->