Reference MainActivity instead of FDroid where appropriate.
Left old references to FDroid from within classes that are only part of the old UI. These are to be removed once the new UI is done.
This commit is contained in:
parent
f9a860e00c
commit
09af5402e8
@ -343,11 +343,11 @@
|
||||
android:label="@string/menu_install"
|
||||
android:theme="@style/MinWithDialogBaseThemeLight"
|
||||
android:excludeFromRecents="true"
|
||||
android:parentActivityName=".FDroid"
|
||||
android:parentActivityName=".views.main.MainActivity"
|
||||
android:configChanges="layoutDirection|locale" >
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".FDroid" />
|
||||
android:value=".views.main.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".privileged.views.UninstallDialogActivity"
|
||||
@ -357,11 +357,11 @@
|
||||
android:name=".views.ManageReposActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:parentActivityName=".FDroid"
|
||||
android:parentActivityName=".views.main.MainActivity"
|
||||
android:configChanges="layoutDirection|locale" >
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".FDroid" />
|
||||
android:value=".views.main.MainActivity" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
@ -400,11 +400,11 @@
|
||||
android:name=".AppDetails2"
|
||||
android:label="@string/app_details"
|
||||
android:exported="true"
|
||||
android:parentActivityName=".FDroid"
|
||||
android:parentActivityName=".views.main.MainActivity"
|
||||
android:configChanges="layoutDirection|locale" >
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".FDroid" />
|
||||
android:value=".views.main.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:label="@string/menu_settings"
|
||||
@ -424,13 +424,13 @@
|
||||
<activity
|
||||
android:label="@string/swap"
|
||||
android:name=".views.swap.SwapWorkflowActivity"
|
||||
android:parentActivityName=".FDroid"
|
||||
android:parentActivityName=".views.main.MainActivity"
|
||||
android:theme="@style/SwapTheme.Wizard"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".FDroid" />
|
||||
android:value=".views.main.MainActivity" />
|
||||
</activity>
|
||||
<!-- Note: AppThemeTransparent, this activity shows dialogs only -->
|
||||
<activity
|
||||
|
@ -31,6 +31,7 @@ import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
|
||||
import com.nostra13.universalimageloader.utils.DiskCacheUtils;
|
||||
|
||||
import org.fdroid.fdroid.data.App;
|
||||
import org.fdroid.fdroid.views.main.MainActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -408,7 +409,7 @@ class NotificationHelper {
|
||||
}
|
||||
|
||||
// Intent to open main app list
|
||||
Intent intentObject = new Intent(context, FDroid.class);
|
||||
Intent intentObject = new Intent(context, MainActivity.class);
|
||||
PendingIntent piAction = PendingIntent.getActivity(context, 0, intentObject, 0);
|
||||
|
||||
NotificationCompat.Builder builder =
|
||||
@ -483,7 +484,7 @@ class NotificationHelper {
|
||||
}
|
||||
|
||||
// Intent to open main app list
|
||||
Intent intentObject = new Intent(context, FDroid.class);
|
||||
Intent intentObject = new Intent(context, MainActivity.class);
|
||||
PendingIntent piAction = PendingIntent.getActivity(context, 0, intentObject, 0);
|
||||
|
||||
NotificationCompat.Builder builder =
|
||||
|
@ -50,6 +50,7 @@ import org.fdroid.fdroid.data.Repo;
|
||||
import org.fdroid.fdroid.data.RepoProvider;
|
||||
import org.fdroid.fdroid.data.Schema;
|
||||
import org.fdroid.fdroid.installer.InstallManagerService;
|
||||
import org.fdroid.fdroid.views.main.MainActivity;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
@ -154,7 +155,7 @@ public class UpdateService extends IntentService {
|
||||
// http://stackoverflow.com/a/20032920
|
||||
//
|
||||
if (Build.VERSION.SDK_INT <= 10) {
|
||||
Intent pendingIntent = new Intent(this, FDroid.class);
|
||||
Intent pendingIntent = new Intent(this, MainActivity.class);
|
||||
pendingIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
notificationBuilder.setContentIntent(PendingIntent.getActivity(this, 0, pendingIntent, PendingIntent.FLAG_UPDATE_CURRENT));
|
||||
}
|
||||
|
@ -32,10 +32,10 @@ import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.view.ContextThemeWrapper;
|
||||
|
||||
import org.fdroid.fdroid.FDroid;
|
||||
import org.fdroid.fdroid.FDroidApp;
|
||||
import org.fdroid.fdroid.R;
|
||||
import org.fdroid.fdroid.installer.PrivilegedInstaller;
|
||||
import org.fdroid.fdroid.views.main.MainActivity;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ -259,7 +259,7 @@ public class InstallExtensionDialogActivity extends FragmentActivity {
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
InstallExtensionDialogActivity.this.setResult(result);
|
||||
InstallExtensionDialogActivity.this.finish();
|
||||
startActivity(new Intent(InstallExtensionDialogActivity.this, FDroid.class));
|
||||
startActivity(new Intent(InstallExtensionDialogActivity.this, MainActivity.class));
|
||||
}
|
||||
})
|
||||
.setCancelable(false);
|
||||
|
@ -32,7 +32,6 @@ import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.LoaderManager;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v4.content.CursorLoader;
|
||||
import android.support.v4.content.Loader;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
@ -52,7 +51,6 @@ import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.fdroid.fdroid.FDroid;
|
||||
import org.fdroid.fdroid.FDroidApp;
|
||||
import org.fdroid.fdroid.R;
|
||||
import org.fdroid.fdroid.UpdateService;
|
||||
@ -149,11 +147,6 @@ public class ManageReposActivity extends AppCompatActivity implements LoaderMana
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
Intent destIntent = new Intent(this, FDroid.class);
|
||||
setResult(RESULT_OK, destIntent);
|
||||
NavUtils.navigateUpTo(this, destIntent);
|
||||
return true;
|
||||
case R.id.action_add_repo:
|
||||
showAddRepo();
|
||||
return true;
|
||||
|
@ -27,7 +27,10 @@ import org.fdroid.fdroid.R;
|
||||
*/
|
||||
public class MainActivity extends AppCompatActivity implements BottomNavigationView.OnNavigationItemSelectedListener {
|
||||
|
||||
public static final String EXTRA_VIEW_MY_APPS = "org.fdroid.fdroid.views.main.MainActivity.VIEW_MY_APPS";
|
||||
|
||||
private RecyclerView pager;
|
||||
private MainViewAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -35,15 +38,27 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationV
|
||||
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
adapter = new MainViewAdapter(this);
|
||||
|
||||
pager = (RecyclerView) findViewById(R.id.main_view_pager);
|
||||
pager.setHasFixedSize(true);
|
||||
pager.setLayoutManager(new NonScrollingHorizontalLayoutManager(this));
|
||||
pager.setAdapter(new MainViewAdapter(this));
|
||||
pager.setAdapter(adapter);
|
||||
|
||||
BottomNavigationView bottomNavigation = (BottomNavigationView) findViewById(R.id.bottom_navigation);
|
||||
bottomNavigation.setOnNavigationItemSelectedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
if (getIntent().hasExtra(EXTRA_VIEW_MY_APPS)) {
|
||||
getIntent().removeExtra(EXTRA_VIEW_MY_APPS);
|
||||
pager.scrollToPosition(adapter.adapterPositionFromItemId(R.id.my_apps));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
pager.scrollToPosition(((MainViewAdapter) pager.getAdapter()).adapterPositionFromItemId(item.getItemId()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user