Skip option in Welcome Screen (#1251)

*  Skip option in Welcome Screen

*  Tutorial screen Revamped

* fixed the prodDebug visibility
This commit is contained in:
Tanvi Dadu 2018-03-10 22:47:21 +05:30 committed by Vivek Maskara
parent bc87ad5d51
commit 57bfb7b328
6 changed files with 111 additions and 13 deletions

View file

@ -5,6 +5,7 @@ import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@ -54,10 +55,18 @@ public class WelcomePagerAdapter extends PagerAdapter {
public Object instantiateItem(ViewGroup container, int position) {
LayoutInflater inflater = LayoutInflater.from(container.getContext());
ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false);
if (position == PAGE_FINAL) {
if( BuildConfig.FLAVOR == "beta"){
TextView textView = (TextView) layout.findViewById(R.id.welcomeYesButton);
if( textView.getVisibility() != View.VISIBLE){
textView.setVisibility(View.VISIBLE);
}
ViewHolder holder = new ViewHolder(layout);
layout.setTag(holder);
} else {
if (position == PAGE_FINAL) {
ViewHolder holder = new ViewHolder(layout);
layout.setTag(holder);
}
}
container.addView(layout);
return layout;
@ -92,5 +101,6 @@ public class WelcomePagerAdapter extends PagerAdapter {
callback.onYesClicked();
}
}
}
}