Ability to launch welcome activity again

This commit is contained in:
maskara 2017-05-29 01:17:07 +05:30
parent fc2afc7edd
commit bcca6b15e5
6 changed files with 48 additions and 13 deletions

View file

@ -1,5 +1,7 @@
package fr.free.nrw.commons;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
@ -7,12 +9,14 @@ import com.viewpagerindicator.CirclePageIndicator;
import butterknife.BindView;
import butterknife.ButterKnife;
import fr.free.nrw.commons.contributions.ContributionsActivity;
import fr.free.nrw.commons.theme.BaseActivity;
public class WelcomeActivity extends BaseActivity {
@BindView(R.id.welcomePager) ViewPager pager;
@BindView(R.id.welcomePagerIndicator) CirclePageIndicator indicator;
private WelcomePagerAdapter adapter = new WelcomePagerAdapter();
@Override
@ -20,9 +24,6 @@ public class WelcomeActivity extends BaseActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);
if (getSupportActionBar() != null) {
getSupportActionBar().hide();
}
ButterKnife.bind(this);
pager.setAdapter(adapter);
@ -40,4 +41,9 @@ public class WelcomeActivity extends BaseActivity {
adapter.setCallback(null);
super.onDestroy();
}
public static void startYourself(Context context) {
Intent welcomeIntent = new Intent(context, WelcomeActivity.class);
context.startActivity(welcomeIntent);
}
}