mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Create base of the Review Activity
This commit is contained in:
parent
7a1adf9e70
commit
7ddc1a16ba
1 changed files with 70 additions and 1 deletions
|
|
@ -1,8 +1,77 @@
|
||||||
package fr.free.nrw.commons.review;
|
package fr.free.nrw.commons.review;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.design.widget.NavigationView;
|
||||||
|
import android.support.v4.widget.DrawerLayout;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import fr.free.nrw.commons.R;
|
||||||
|
import fr.free.nrw.commons.auth.AuthenticatedActivity;
|
||||||
|
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by root on 18.05.2018.
|
* Created by root on 18.05.2018.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ReviewActivity {
|
public class ReviewActivity extends AuthenticatedActivity {
|
||||||
|
|
||||||
|
@BindView(R.id.toolbar)
|
||||||
|
Toolbar toolbar;
|
||||||
|
@BindView(R.id.navigation_view)
|
||||||
|
NavigationView navigationView;
|
||||||
|
@BindView(R.id.drawer_layout)
|
||||||
|
DrawerLayout drawerLayout;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onAuthCookieAcquired(String authCookie) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onAuthFailure() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_review);
|
||||||
|
ButterKnife.bind(this);
|
||||||
|
|
||||||
|
initDrawer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
getMenuInflater().inflate(R.menu.review_randomizer_menu, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == R.id.action_review) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Consumers should be simply using this method to use this activity.
|
||||||
|
* @param context
|
||||||
|
* @param title Page title
|
||||||
|
* @param categoryName Name of the category for displaying its images
|
||||||
|
*/
|
||||||
|
public static void startYourself(Context context, String title, String categoryName) {
|
||||||
|
Intent reviewActivity = new Intent(context, ReviewActivity.class);
|
||||||
|
context.startActivity(reviewActivity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue