mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -7,6 +7,13 @@
|
|||
android:gravity="center"
|
||||
android:weightSum="1"
|
||||
android:layout_centerHorizontal="true">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -156,6 +163,21 @@
|
|||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="right"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#fff"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,11 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:gravity="center"
|
||||
|
|
@ -130,5 +137,21 @@
|
|||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="right"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#fff"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,12 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -127,6 +133,20 @@
|
|||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="right"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#fff"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,11 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -41,4 +48,19 @@
|
|||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="right"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#fff"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
|
@ -240,4 +240,5 @@
|
|||
<string name="notifications_mention">%1$s mentioned you on %2$s.</string>
|
||||
<string name="toggle_view_button">Toggle view</string>
|
||||
<string name="about_rate_us"><u>Rate Us</u></string>
|
||||
<string name="welcome_skip_button">Skip Tutorial</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue