aboutsummaryrefslogtreecommitdiff
path: root/common/src/com/android/tv/common/ui/setup
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/com/android/tv/common/ui/setup')
-rw-r--r--common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java5
-rw-r--r--common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java14
2 files changed, 12 insertions, 7 deletions
diff --git a/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java b/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java
index bcaefec9..88159da9 100644
--- a/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java
+++ b/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java
@@ -72,9 +72,6 @@ public abstract class SetupGuidedStepFragment extends GuidedStepFragment {
}
// gridView Alignment
VerticalGridView gridView = getGuidedActionsStylist().getActionsGridView();
- // Workaround of b/28274171
- // TODO: Remove the following line once b/28274171 is resolved.
- gridView.setFocusable(true);
int offset = getResources().getDimensionPixelOffset(
R.dimen.setup_guidedactions_selector_margin_top);
gridView.setWindowAlignmentOffset(offset);
@@ -86,8 +83,6 @@ public abstract class SetupGuidedStepFragment extends GuidedStepFragment {
ViewGroup group = (ViewGroup) view.findViewById(R.id.content_frame);
group.setClipChildren(false);
group.setClipToPadding(false);
- // Workaround b/26205201
- view.findViewById(R.id.guidedactions_list2).setFocusable(false);
return view;
}
diff --git a/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java b/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
index 63247481..b9ad4657 100644
--- a/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
+++ b/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
@@ -34,6 +34,7 @@ public abstract class SetupMultiPaneFragment extends SetupFragment {
private static final boolean DEBUG = false;
public static final int ACTION_DONE = Integer.MAX_VALUE;
+ public static final int ACTION_SKIP = ACTION_DONE - 1;
private static final String CONTENT_FRAGMENT_TAG = "content_fragment";
@@ -53,7 +54,12 @@ public abstract class SetupMultiPaneFragment extends SetupFragment {
}
if (needsDoneButton()) {
setOnClickAction(view.findViewById(R.id.button_done), getActionCategory(), ACTION_DONE);
- } else {
+ }
+ if (needsSkipButton()) {
+ view.findViewById(R.id.button_skip).setVisibility(View.VISIBLE);
+ setOnClickAction(view.findViewById(R.id.button_skip), getActionCategory(), ACTION_SKIP);
+ }
+ if (!needsDoneButton() && !needsSkipButton()) {
View doneButtonContainer = view.findViewById(R.id.done_button_container);
// Use content view to check layout direction while view is being created.
if (getResources().getConfiguration().getLayoutDirection()
@@ -90,6 +96,10 @@ public abstract class SetupMultiPaneFragment extends SetupFragment {
return true;
}
+ protected boolean needsSkipButton() {
+ return false;
+ }
+
@Override
protected int[] getParentIdsForDelay() {
return new int[] {R.id.content_fragment, R.id.guidedactions_list};
@@ -99,4 +109,4 @@ public abstract class SetupMultiPaneFragment extends SetupFragment {
public int[] getSharedElementIds() {
return new int[] {R.id.action_fragment_background, R.id.done_button_container};
}
-}
+} \ No newline at end of file