mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Skip option in Welcome Screen (#1251)
* Skip option in Welcome Screen * Tutorial screen Revamped * fixed the prodDebug visibility
This commit is contained in:
parent
bc87ad5d51
commit
57bfb7b328
6 changed files with 111 additions and 13 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue