本文整理汇总了Java中com.stepstone.stepper.StepperLayout.findViewById方法的典型用法代码示例。如果您正苦于以下问题:Java StepperLayout.findViewById方法的具体用法?Java StepperLayout.findViewById怎么用?Java StepperLayout.findViewById使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.stepstone.stepper.StepperLayout
的用法示例。
在下文中一共展示了StepperLayout.findViewById方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TabsStepperType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public TabsStepperType(StepperLayout stepperLayout) {
super(stepperLayout);
mTabsContainer = (TabsContainer) stepperLayout.findViewById(R.id.ms_stepTabsContainer);
mTabsContainer.setSelectedColor(stepperLayout.getSelectedColor());
mTabsContainer.setUnselectedColor(stepperLayout.getUnselectedColor());
mTabsContainer.setErrorColor(stepperLayout.getErrorColor());
mTabsContainer.setDividerWidth(stepperLayout.getTabStepDividerWidth());
mTabsContainer.setListener(stepperLayout);
if (stepperLayout.isInEditMode()) {
//noinspection ConstantConditions
mTabsContainer.setSteps(Arrays.asList(
new StepViewModel.Builder(null).setTitle("Step 1").create(),
new StepViewModel.Builder(null).setTitle("Step 2").setSubtitle("Optional").create())
);
mTabsContainer.updateSteps(0, new SparseArray<VerificationError>(), false);
mTabsContainer.setVisibility(View.VISIBLE);
}
}
示例2: clickNext
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
/**
* Clicks the Next button.
*/
public static ViewAction clickNext() {
return new AbstractStepperNavigationAction() {
@Override
public String getDescription() {
return "Click on the Next button";
}
@Override
protected void performAction(StepperLayout stepperLayout) {
View nextButton = stepperLayout.findViewById(com.stepstone.stepper.R.id.ms_stepNextButton);
nextButton.performClick();
}
};
}
示例3: clickBack
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
/**
* Clicks the Back button.
*/
public static ViewAction clickBack() {
return new AbstractStepperNavigationAction() {
@Override
public String getDescription() {
return "Click on the Back button";
}
@Override
protected void performAction(StepperLayout stepperLayout) {
View backButton = stepperLayout.findViewById(com.stepstone.stepper.R.id.ms_stepPrevButton);
backButton.performClick();
}
};
}
示例4: clickComplete
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
/**
* Clicks the Complete button.
*/
public static ViewAction clickComplete() {
return new AbstractStepperNavigationAction() {
@Override
public String getDescription() {
return "Click on the Complete button";
}
@Override
protected void performAction(StepperLayout stepperLayout) {
View completeButton = stepperLayout.findViewById(com.stepstone.stepper.R.id.ms_stepCompleteButton);
completeButton.performClick();
}
};
}
示例5: matchesSafely
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
@Override
protected boolean matchesSafely(StepperLayout view) {
ViewGroup tabsContainer = (ViewGroup) view.findViewById(com.stepstone.stepper.R.id.ms_stepTabsInnerContainer);
int childCount = tabsContainer.getChildCount();
if (childCount == 0) {
Log.e(TAG, "No tabs found!");
return false;
}
if (tabPosition < 0 || tabPosition >= childCount) {
Log.e(TAG, "Invalid tab position: " + tabPosition);
return false;
}
StepTab stepTab = (StepTab) tabsContainer.getChildAt(tabPosition);
TextView subtitleTextView = (TextView) stepTab.findViewById(com.stepstone.stepper.R.id.ms_stepSubtitle);
return subtitleMatcher.matches(subtitleTextView);
}
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:21,代码来源:StepperLayoutTabSubtitleMatcher.java
示例6: matchesSafely
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
@Override
protected boolean matchesSafely(StepperLayout view) {
ViewGroup tabsContainer = (ViewGroup) view.findViewById(com.stepstone.stepper.R.id.ms_stepTabsInnerContainer);
int childCount = tabsContainer.getChildCount();
if (childCount == 0) {
Log.e(TAG, "No tabs found!");
return false;
}
if (tabPosition < 0 || tabPosition >= childCount) {
Log.e(TAG, "Invalid tab position: " + tabPosition);
return false;
}
StepTab stepTab = (StepTab) tabsContainer.getChildAt(tabPosition);
return new StepTabStateMatcher(state).matches(stepTab);
}
示例7: ContentOverlayStepperFeedbackType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public ContentOverlayStepperFeedbackType(@NonNull StepperLayout stepperLayout) {
mOverlayView = stepperLayout.findViewById(R.id.ms_stepPagerOverlay);
mOverlayView.setVisibility(View.VISIBLE);
mOverlayView.setAlpha(ALPHA_INVISIBLE);
final int contentOverlayBackground = stepperLayout.getContentOverlayBackground();
if (contentOverlayBackground != 0) {
mOverlayView.setBackgroundResource(contentOverlayBackground);
}
}
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:10,代码来源:ContentOverlayStepperFeedbackType.java
示例8: TabsStepperFeedbackType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public TabsStepperFeedbackType(@NonNull StepperLayout stepperLayout) {
mProgressMessageTranslationWhenHidden = stepperLayout.getResources().getDimension(R.dimen.ms_progress_message_translation_when_hidden);
mProgressMessageTextView = (TextView) stepperLayout.findViewById(R.id.ms_stepTabsProgressMessage);
mTabsScrollingContainer = stepperLayout.findViewById(R.id.ms_stepTabsScrollView);
mStepperLayout = stepperLayout;
mProgressMessageTextView.setVisibility(View.VISIBLE);
}
示例9: DotsStepperType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public DotsStepperType(StepperLayout stepperLayout) {
super(stepperLayout);
mDottedProgressBar = (DottedProgressBar) stepperLayout.findViewById(R.id.ms_stepDottedProgressBar);
mDottedProgressBar.setSelectedColor(getSelectedColor());
mDottedProgressBar.setUnselectedColor(getUnselectedColor());
if (stepperLayout.isInEditMode()) {
mDottedProgressBar.setDotCount(EDIT_MODE_DOT_COUNT);
mDottedProgressBar.setVisibility(View.VISIBLE);
}
}
示例10: ProgressBarStepperType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public ProgressBarStepperType(StepperLayout stepperLayout) {
super(stepperLayout);
mProgressBar = (ColorableProgressBar) stepperLayout.findViewById(R.id.ms_stepProgressBar);
mProgressBar.setProgressColor(getSelectedColor());
mProgressBar.setProgressBackgroundColor(getUnselectedColor());
if (stepperLayout.isInEditMode()) {
mProgressBar.setVisibility(View.VISIBLE);
mProgressBar.setProgressCompat(1, false);
mProgressBar.setMax(3);
}
}
示例11: clickTabAtPosition
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
/**
* Clicks a tab at a specified position.
*/
public static ViewAction clickTabAtPosition(@IntRange(from = 0) final int tabPosition) {
return new AbstractStepperNavigationAction() {
@Override
public String getDescription() {
return "Click on tab at position: " + tabPosition;
}
@Override
protected void performAction(StepperLayout stepperLayout) {
ViewGroup tabsContainer = (ViewGroup) stepperLayout.findViewById(com.stepstone.stepper.R.id.ms_stepTabsInnerContainer);
int childCount = tabsContainer.getChildCount();
if (childCount == 0) {
throw new IllegalArgumentException("No tabs found!");
}
if (tabPosition < 0 || tabPosition >= childCount) {
throw new IllegalArgumentException("Invalid tab position: " + tabPosition);
}
StepTab stepTab = (StepTab) tabsContainer.getChildAt(tabPosition);
stepTab.performClick();
}
};
}
示例12: perform
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
@Override
public final void perform(UiController uiController, View view) {
final StepperLayout stepperLayout = (StepperLayout) view;
final ViewPager viewPager = (ViewPager) stepperLayout.findViewById(com.stepstone.stepper.R.id.ms_stepPager);
// Add a custom tracker listener
final CustomViewPagerListener customListener = new CustomViewPagerListener();
viewPager.addOnPageChangeListener(customListener);
// Note that we're running the following block in a try-finally construct. This
// is needed since some of the actions are going to throw (expected) exceptions. If that
// happens, we still need to clean up after ourselves to leave the system (Espresso) in a good
// state.
try {
// Register our listener as idling resource so that Espresso waits until the
// wrapped action results in the view pager getting to the STATE_IDLE state
Espresso.registerIdlingResources(customListener);
uiController.loopMainThreadUntilIdle();
performAction(stepperLayout);
uiController.loopMainThreadUntilIdle();
customListener.mNeedsIdle = true;
uiController.loopMainThreadUntilIdle();
customListener.mNeedsIdle = false;
} finally {
// Unregister our idling resource
Espresso.unregisterIdlingResources(customListener);
// And remove our tracker listener from ViewPager
viewPager.removeOnPageChangeListener(customListener);
}
}
示例13: DisabledContentInteractionStepperFeedbackType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public DisabledContentInteractionStepperFeedbackType(@NonNull StepperLayout stepperLayout) {
mStepPager = (StepViewPager) stepperLayout.findViewById(R.id.ms_stepPager);
}
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:4,代码来源:DisabledContentInteractionStepperFeedbackType.java
示例14: ContentFadeStepperFeedbackType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public ContentFadeStepperFeedbackType(@NonNull StepperLayout stepperLayout) {
mPager = stepperLayout.findViewById(R.id.ms_stepPager);
mFadeOutAlpha = stepperLayout.getContentFadeAlpha();
}
示例15: ContentProgressStepperFeedbackType
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
public ContentProgressStepperFeedbackType(@NonNull StepperLayout stepperLayout) {
mPagerProgressBar = (ProgressBar) stepperLayout.findViewById(R.id.ms_stepPagerProgressBar);
}
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:4,代码来源:ContentProgressStepperFeedbackType.java