mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Ability to launch welcome activity again
This commit is contained in:
parent
fc2afc7edd
commit
bcca6b15e5
6 changed files with 48 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue