Loading core/java/com/android/internal/app/ResolverActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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); } Loading core/res/res/layout/resolver_grid.xml +14 −9 Original line number Diff line number Diff line Loading @@ -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" Loading core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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] --> Loading Loading
core/java/com/android/internal/app/ResolverActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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); } Loading
core/res/res/layout/resolver_grid.xml +14 −9 Original line number Diff line number Diff line Loading @@ -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" Loading
core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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] --> Loading