Fix wear page indicator
This commit is contained in:
parent
5ae7346123
commit
8ae63eff29
5 changed files with 20 additions and 10 deletions
|
@ -41,16 +41,18 @@ public class BolusActivity extends ViewSelectorActivity {
|
||||||
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
||||||
|
dotsPageIndicator.onPageScrolled(row, column, rowOffset, columnOffset, rowOffsetPixels,
|
||||||
|
columnOffsetPixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int row, int column) {
|
public void onPageSelected(int row, int column) {
|
||||||
|
dotsPageIndicator.onPageSelected(row, column);
|
||||||
View view = pager.getChildAt(column);
|
View view = pager.getChildAt(column);
|
||||||
view.requestFocus();
|
view.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int state) {
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
dotsPageIndicator.onPageScrollStateChanged(state);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,16 +56,18 @@ public class CPPActivity extends ViewSelectorActivity {
|
||||||
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
||||||
|
dotsPageIndicator.onPageScrolled(row, column, rowOffset, columnOffset, rowOffsetPixels,
|
||||||
|
columnOffsetPixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int row, int column) {
|
public void onPageSelected(int row, int column) {
|
||||||
|
dotsPageIndicator.onPageSelected(row, column);
|
||||||
View view = pager.getChildAt(column);
|
View view = pager.getChildAt(column);
|
||||||
view.requestFocus();
|
view.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int state) {
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
dotsPageIndicator.onPageScrollStateChanged(state);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,16 +43,18 @@ public class ECarbActivity extends ViewSelectorActivity {
|
||||||
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
||||||
|
dotsPageIndicator.onPageScrolled(row, column, rowOffset, columnOffset, rowOffsetPixels,
|
||||||
|
columnOffsetPixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int row, int column) {
|
public void onPageSelected(int row, int column) {
|
||||||
|
dotsPageIndicator.onPageSelected(row, column);
|
||||||
View view = pager.getChildAt(column);
|
View view = pager.getChildAt(column);
|
||||||
view.requestFocus();
|
view.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int state) {
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
dotsPageIndicator.onPageScrollStateChanged(state);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,16 +51,18 @@ public class TempTargetActivity extends ViewSelectorActivity {
|
||||||
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
||||||
|
dotsPageIndicator.onPageScrolled(row, column, rowOffset, columnOffset, rowOffsetPixels,
|
||||||
|
columnOffsetPixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int row, int column) {
|
public void onPageSelected(int row, int column) {
|
||||||
|
dotsPageIndicator.onPageSelected(row, column);
|
||||||
View view = pager.getChildAt(column);
|
View view = pager.getChildAt(column);
|
||||||
view.requestFocus();
|
view.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int state) {
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
dotsPageIndicator.onPageScrollStateChanged(state);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,16 +48,18 @@ public class WizardActivity extends ViewSelectorActivity {
|
||||||
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
pager.setOnPageChangeListener(new GridViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
public void onPageScrolled(int row, int column, float rowOffset, float columnOffset, int rowOffsetPixels, int columnOffsetPixels) {
|
||||||
|
dotsPageIndicator.onPageScrolled(row, column, rowOffset, columnOffset, rowOffsetPixels,
|
||||||
|
columnOffsetPixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int row, int column) {
|
public void onPageSelected(int row, int column) {
|
||||||
|
dotsPageIndicator.onPageSelected(row, column);
|
||||||
View view = pager.getChildAt(column);
|
View view = pager.getChildAt(column);
|
||||||
view.requestFocus();
|
view.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int state) {
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
dotsPageIndicator.onPageScrollStateChanged(state);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue