aboutsummaryrefslogtreecommitdiff
path: root/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
diff options
context:
space:
mode:
authorNick Chalko <nchalko@google.com>2017-05-10 19:00:37 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-10 19:00:37 +0000
commitc11f019e2f3b2e9a4edb0bd2687c149a30c209a0 (patch)
tree14d9836ff9283690321c166560ee3450792236ad /common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
parent430c2be3b91676005fdd243553e38acff8dfc3de (diff)
parent0550a7221be0581b0bd421a9d70400ff8699a6e7 (diff)
downloadTV-c11f019e2f3b2e9a4edb0bd2687c149a30c209a0.tar.gz
Sync to ub-tv-dev at lost+ hash 550cbec17259717c5453f6be1eb05736ba10ef1d
am: 0550a7221b Change-Id: Id38d8bc09ffbf856c8976893096c47d3bcc8b8b7
Diffstat (limited to 'common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java')
-rw-r--r--common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java14
1 files changed, 12 insertions, 2 deletions
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