Add @msayan's tutorial-view library, add support-v4 as dependency, add paged tutorial(WIP)
This commit is contained in:
parent
88df5e4631
commit
78e36a2eab
12 changed files with 616 additions and 1 deletions
|
@ -74,6 +74,7 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="in.celest.xash3d.FPicker"></activity>
|
||||
<activity android:name="in.celest.xash3d.XashTutorialActivity"></activity>
|
||||
<service android:name="in.celest.xash3d.XashService" android:stopWithTask="false" />
|
||||
<receiver android:name="in.celest.xash3d.XashService$exitButtonListener" />
|
||||
<receiver android:name="in.celest.xash3d.InstallReceiver">
|
||||
|
|
BIN
libs/support-v4-19.0.1.jar
Normal file
BIN
libs/support-v4-19.0.1.jar
Normal file
Binary file not shown.
10
res/drawable/circle_black.xml
Normal file
10
res/drawable/circle_black.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="12dp"
|
||||
android:height="12dp" />
|
||||
|
||||
<solid android:color="#80000000" />
|
||||
|
||||
</shape>
|
10
res/drawable/circle_white.xml
Normal file
10
res/drawable/circle_white.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="12dp"
|
||||
android:height="12dp" />
|
||||
|
||||
<solid android:color="#FFF" />
|
||||
|
||||
</shape>
|
65
res/layout/activity_tutorial.xml
Normal file
65
res/layout/activity_tutorial.xml
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/containerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFF"
|
||||
android:clipToPadding="false"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<!-- <View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:background="#20000000" />-->
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/buttonContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@android:color/white"
|
||||
android:clipToPadding="false">
|
||||
<!-- android:elevation="24dp" -->
|
||||
|
||||
<Button
|
||||
android:id="@+id/prev"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Back"
|
||||
android:textColor="#FFF" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Finish"
|
||||
android:textColor="#FFF" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/indicatorLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
53
res/layout/fragment_step.xml
Normal file
53
res/layout/fragment_step.xml
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="60dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:adjustViewBounds="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="Lorem ipsum dolor sit amet"
|
||||
android:textColor="#FFF" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingEnd="32dp"
|
||||
android:paddingStart="32dp"
|
||||
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tempus elementum sem congue laoreet. Sed pulvinar at purus quis aliquet. Quisque feugiat sed leo nec aliquet. In hac habitasse platea dictumst. Vestibulum enim sapien, gravida et tempus vel, feugiat in turpis. Fusce interdum elit et libero rhoncus dapibus"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
108
src/com/hololo/tutorial/library/Step.java
Normal file
108
src/com/hololo/tutorial/library/Step.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
package com.hololo.tutorial.library;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class Step implements Parcelable {
|
||||
|
||||
private String title;
|
||||
private String content;
|
||||
private String summary;
|
||||
private int drawable;
|
||||
private int backgroundColor;
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public int getDrawable() {
|
||||
return drawable;
|
||||
}
|
||||
|
||||
public int getBackgroundColor() {
|
||||
return backgroundColor;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Step step;
|
||||
|
||||
public Builder() {
|
||||
step = new Step();
|
||||
}
|
||||
|
||||
public Step build() {
|
||||
return step;
|
||||
}
|
||||
|
||||
public Builder setTitle(String title) {
|
||||
step.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setContent(String content) {
|
||||
step.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSummary(String summary) {
|
||||
step.summary = summary;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDrawable(int drawable) {
|
||||
step.drawable = drawable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setBackgroundColor(int backgroundColor) {
|
||||
step.backgroundColor = backgroundColor;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(this.title);
|
||||
dest.writeString(this.content);
|
||||
dest.writeString(this.summary);
|
||||
dest.writeInt(this.drawable);
|
||||
dest.writeInt(this.backgroundColor);
|
||||
}
|
||||
|
||||
public Step() {
|
||||
}
|
||||
|
||||
protected Step(Parcel in) {
|
||||
this.title = in.readString();
|
||||
this.content = in.readString();
|
||||
this.summary = in.readString();
|
||||
this.drawable = in.readInt();
|
||||
this.backgroundColor = in.readInt();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<Step> CREATOR = new Parcelable.Creator<Step>() {
|
||||
@Override
|
||||
public Step createFromParcel(Parcel source) {
|
||||
return new Step(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Step[] newArray(int size) {
|
||||
return new Step[size];
|
||||
}
|
||||
};
|
||||
}
|
65
src/com/hololo/tutorial/library/StepFragment.java
Normal file
65
src/com/hololo/tutorial/library/StepFragment.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
package com.hololo.tutorial.library;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import in.celest.xash3d.hl.R;
|
||||
|
||||
public class StepFragment extends Fragment {
|
||||
|
||||
private TextView title;
|
||||
private TextView content;
|
||||
private TextView summary;
|
||||
private ImageView imageView;
|
||||
private LinearLayout layout;
|
||||
|
||||
private Step step;
|
||||
|
||||
static StepFragment createFragment(Step step) {
|
||||
StepFragment fragment = new StepFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("step", step);
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
step = getArguments().getParcelable("step");
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_step, container, false);
|
||||
|
||||
initViews(view);
|
||||
initData();
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
title.setText(step.getTitle());
|
||||
content.setText(step.getContent());
|
||||
summary.setText(step.getSummary());
|
||||
imageView.setImageResource(step.getDrawable());
|
||||
layout.setBackgroundColor(step.getBackgroundColor());
|
||||
}
|
||||
|
||||
private void initViews(View view) {
|
||||
title = (TextView) view.findViewById(R.id.title);
|
||||
content = (TextView) view.findViewById(R.id.content);
|
||||
summary = (TextView) view.findViewById(R.id.summary);
|
||||
imageView = (ImageView) view.findViewById(R.id.image);
|
||||
layout = (LinearLayout) view.findViewById(R.id.container);
|
||||
}
|
||||
|
||||
}
|
26
src/com/hololo/tutorial/library/StepPagerAdapter.java
Normal file
26
src/com/hololo/tutorial/library/StepPagerAdapter.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
package com.hololo.tutorial.library;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class StepPagerAdapter extends FragmentPagerAdapter {
|
||||
private List<Step> stepList;
|
||||
|
||||
public StepPagerAdapter(FragmentManager fm, List<Step> stepList) {
|
||||
super(fm);
|
||||
this.stepList = stepList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return StepFragment.createFragment(stepList.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return stepList.size();
|
||||
}
|
||||
}
|
216
src/com/hololo/tutorial/library/TutorialActivity.java
Normal file
216
src/com/hololo/tutorial/library/TutorialActivity.java
Normal file
|
@ -0,0 +1,216 @@
|
|||
package com.hololo.tutorial.library;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
// import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import su.xash.fwgslib.FWGSLib;
|
||||
import in.celest.xash3d.hl.R;
|
||||
|
||||
public class TutorialActivity extends FragmentActivity /* AppCompatActivity */ implements View.OnClickListener {
|
||||
|
||||
private List<Step> steps;
|
||||
private StepPagerAdapter adapter;
|
||||
|
||||
private ViewPager pager;
|
||||
private Button next, prev;
|
||||
private LinearLayout indicatorLayout;
|
||||
private FrameLayout containerLayout;
|
||||
private RelativeLayout buttonContainer;
|
||||
|
||||
private int currentItem;
|
||||
|
||||
private String prevText, nextText, finishText, cancelText;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
if( FWGSLib.sdk >= 21 ) // material
|
||||
setTheme(0x0103022e); // Theme_Material_NoActionBar
|
||||
else
|
||||
setTheme(0x01030006); // Theme_NoTitleBar
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_tutorial);
|
||||
steps = new ArrayList<Step>();
|
||||
initTexts();
|
||||
initViews();
|
||||
initAdapter();
|
||||
}
|
||||
|
||||
private void initTexts() {
|
||||
prevText = getString(R.string.prev);
|
||||
cancelText = getString(R.string.cancel);
|
||||
finishText = "Finish";
|
||||
nextText = getString(R.string.next);
|
||||
}
|
||||
|
||||
private void initAdapter() {
|
||||
adapter = new StepPagerAdapter(getSupportFragmentManager(), steps);
|
||||
pager.setAdapter(adapter);
|
||||
pager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
currentItem = position;
|
||||
controlPosition(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void changeStatusBarColor(int backgroundColor) {
|
||||
// Window window = getWindow();
|
||||
// window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
// window.addFlags(0x80000000) //WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
|
||||
// window.setStatusBarColor(backgroundColor);
|
||||
}
|
||||
|
||||
private void controlPosition(int position) {
|
||||
notifyIndicator();
|
||||
if (position == steps.size() - 1) {
|
||||
next.setText(finishText);
|
||||
prev.setText(prevText);
|
||||
} else if (position == 0) {
|
||||
prev.setText(cancelText);
|
||||
next.setText(nextText);
|
||||
} else {
|
||||
prev.setText(prevText);
|
||||
next.setText(nextText);
|
||||
}
|
||||
|
||||
containerLayout.setBackgroundColor(steps.get(position).getBackgroundColor());
|
||||
buttonContainer.setBackgroundColor(steps.get(position).getBackgroundColor());
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
currentItem = 0;
|
||||
|
||||
pager = (ViewPager) findViewById(R.id.viewPager);
|
||||
next = (Button) findViewById(R.id.next);
|
||||
prev = (Button) findViewById(R.id.prev);
|
||||
indicatorLayout = (LinearLayout) findViewById(R.id.indicatorLayout);
|
||||
containerLayout = (FrameLayout) findViewById(R.id.containerLayout);
|
||||
buttonContainer = (RelativeLayout) findViewById(R.id.buttonContainer);
|
||||
|
||||
next.setOnClickListener(this);
|
||||
prev.setOnClickListener(this);
|
||||
}
|
||||
|
||||
public void addFragment(Step step) {
|
||||
steps.add(step);
|
||||
adapter.notifyDataSetChanged();
|
||||
notifyIndicator();
|
||||
controlPosition(currentItem);
|
||||
}
|
||||
|
||||
public void addFragment(Step step, int position) {
|
||||
steps.add(position, step);
|
||||
adapter.notifyDataSetChanged();
|
||||
notifyIndicator();
|
||||
}
|
||||
|
||||
public void notifyIndicator() {
|
||||
if (indicatorLayout.getChildCount() > 0)
|
||||
indicatorLayout.removeAllViews();
|
||||
|
||||
for (int i = 0; i < steps.size(); i++) {
|
||||
ImageView imageView = new ImageView(this);
|
||||
imageView.setPadding(8, 8, 8, 8);
|
||||
int drawable = R.drawable.circle_black;
|
||||
if (i == currentItem)
|
||||
drawable = R.drawable.circle_white;
|
||||
|
||||
imageView.setImageResource(drawable);
|
||||
|
||||
final int finalI = i;
|
||||
imageView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
changeFragment(finalI);
|
||||
}
|
||||
});
|
||||
|
||||
indicatorLayout.addView(imageView);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (currentItem == 0) {
|
||||
super.onBackPressed();
|
||||
} else {
|
||||
changeFragment(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.next) {
|
||||
changeFragment(true);
|
||||
} else if (v.getId() == R.id.prev) {
|
||||
changeFragment(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void changeFragment(int position) {
|
||||
pager.setCurrentItem(position, true);
|
||||
}
|
||||
|
||||
private void changeFragment(boolean isNext) {
|
||||
int item = currentItem;
|
||||
if (isNext) {
|
||||
item++;
|
||||
} else {
|
||||
item--;
|
||||
}
|
||||
|
||||
if (item < 0 || item == steps.size()) {
|
||||
finishTutorial();
|
||||
} else
|
||||
pager.setCurrentItem(item, true);
|
||||
}
|
||||
|
||||
public void finishTutorial() {
|
||||
finish();
|
||||
}
|
||||
|
||||
public void setPrevText(String text) {
|
||||
prevText = text;
|
||||
}
|
||||
|
||||
public void setNextText(String text) {
|
||||
nextText = text;
|
||||
}
|
||||
|
||||
public void setFinishText(String text) {
|
||||
finishText = text;
|
||||
}
|
||||
|
||||
public void setCancelText(String text) {
|
||||
cancelText = text;
|
||||
}
|
||||
|
||||
}
|
|
@ -400,7 +400,8 @@ public class LauncherActivity extends Activity {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.cancel();
|
||||
showFirstRun();
|
||||
Intent intent = new Intent(a, XashTutorialActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
60
src/in/celest/xash3d/XashTutorialActivity.java
Normal file
60
src/in/celest/xash3d/XashTutorialActivity.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
package in.celest.xash3d;
|
||||
|
||||
import com.hololo.tutorial.library.TutorialActivity;
|
||||
import com.hololo.tutorial.library.Step;
|
||||
import android.app.Activity;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
// import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.graphics.Color;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import in.celest.xash3d.hl.R;
|
||||
|
||||
public class XashTutorialActivity extends TutorialActivity
|
||||
{
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addFragment(new Step.Builder().setTitle(getString(R.string.page_title0))
|
||||
.setContent(getString(R.string.page_content0))
|
||||
.setBackgroundColor(Color.parseColor("#555555")) // int background color
|
||||
.setDrawable(R.drawable.ic_launcher) // int top drawable
|
||||
.build());
|
||||
|
||||
addFragment(new Step.Builder().setTitle(getString(R.string.page_title1))
|
||||
.setContent(getString(R.string.page_content1))
|
||||
.setBackgroundColor(Color.parseColor("#555555")) // int background color
|
||||
.setDrawable(R.drawable.page1_en) // int top drawable
|
||||
.build());
|
||||
addFragment(new Step.Builder().setTitle(getString(R.string.page_title2))
|
||||
.setContent(getString(R.string.page_content2))
|
||||
.setBackgroundColor(Color.parseColor("#555555")) // int background color
|
||||
.setDrawable(R.drawable.page2_en) // int top drawable
|
||||
.build());
|
||||
addFragment(new Step.Builder().setTitle(getString(R.string.page_title3))
|
||||
.setContent(getString(R.string.page_content3))
|
||||
.setBackgroundColor(Color.parseColor("#555555")) // int background color
|
||||
// .setDrawable(R.drawable.ic_launcher) // int top drawable
|
||||
.build());
|
||||
addFragment(new Step.Builder().setTitle(getString(R.string.page_title4))
|
||||
.setContent(getString(R.string.page_content4))
|
||||
.setBackgroundColor(Color.parseColor("#555555")) // int background color
|
||||
// .setDrawable(R.drawable.ic_launcher) // int top drawable
|
||||
.build());
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue