mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-02 15:53:55 +01:00
Add base codes for testing mapbox activity in a single fragment inside activity
This commit is contained in:
parent
7356044ad9
commit
dbd1ad2ff1
6 changed files with 31 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ import fr.free.nrw.commons.explore.SearchActivity;
|
|||
|
||||
import fr.free.nrw.commons.explore.categories.ExploreActivity;
|
||||
import fr.free.nrw.commons.nearby.NearbyTestActivity;
|
||||
import fr.free.nrw.commons.nearby.NearbyTestFragment;
|
||||
import fr.free.nrw.commons.notification.NotificationActivity;
|
||||
import fr.free.nrw.commons.review.ReviewActivity;
|
||||
import fr.free.nrw.commons.settings.SettingsActivity;
|
||||
|
|
@ -71,4 +72,7 @@ public abstract class ActivityBuilderModule {
|
|||
|
||||
@ContributesAndroidInjector
|
||||
abstract NearbyTestActivity bindNearbyTestActivity();
|
||||
|
||||
@ContributesAndroidInjector
|
||||
abstract NearbyTestFragment bindNearbyTestFragment();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
package fr.free.nrw.commons.nearby;
|
||||
|
||||
import fr.free.nrw.commons.theme.NavigationBaseActivity;
|
||||
|
||||
public class NearbyTestFragment extends NavigationBaseActivity {
|
||||
}
|
||||
|
|
@ -40,6 +40,7 @@ import fr.free.nrw.commons.explore.categories.ExploreActivity;
|
|||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
import fr.free.nrw.commons.logging.CommonsLogSender;
|
||||
import fr.free.nrw.commons.nearby.NearbyTestActivity;
|
||||
import fr.free.nrw.commons.nearby.NearbyTestFragment;
|
||||
import fr.free.nrw.commons.notification.NotificationActivity;
|
||||
import fr.free.nrw.commons.review.ReviewActivity;
|
||||
import fr.free.nrw.commons.settings.SettingsActivity;
|
||||
|
|
@ -182,7 +183,13 @@ public abstract class NavigationBaseActivity extends BaseActivity
|
|||
case R.id.action_nearby_test_activity:
|
||||
drawerLayout.closeDrawer(navigationView);
|
||||
startActivityWithFlags(this, NearbyTestActivity.class, Intent.FLAG_ACTIVITY_REORDER_TO_FRONT,
|
||||
Intent.FLAG_ACTIVITY_SINGLE_TOP); return true;
|
||||
Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
return true;
|
||||
case R.id.action_nearby_test_fragment:
|
||||
drawerLayout.closeDrawer(navigationView);
|
||||
startActivityWithFlags(this, NearbyTestFragment.class, Intent.FLAG_ACTIVITY_REORDER_TO_FRONT,
|
||||
Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
return true;
|
||||
case R.id.action_feedback:
|
||||
drawerLayout.closeDrawer(navigationView);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue