use of com.frostwire.android.gui.activities.MainActivity in project frostwire by frostwire.
the class DownloadSoundcloudFromUrlTask method onPostExecute.
@Override
protected void onPostExecute(Context ctx, List<SoundcloudSearchResult> results) {
if (ctx != null && !results.isEmpty()) {
MainActivity activity = (MainActivity) ctx;
ConfirmSoundcloudDownloadDialog dlg = createConfirmListDialog(ctx, results);
dlg.show(activity.getFragmentManager());
}
}
use of com.frostwire.android.gui.activities.MainActivity in project frostwire by frostwire.
the class MainController method showPreferences.
public void showPreferences() {
if (!Ref.alive(activityRef)) {
return;
}
MainActivity activity = activityRef.get();
Intent i = new Intent(activity, SettingsActivity.class);
activity.startActivity(i);
}
use of com.frostwire.android.gui.activities.MainActivity in project frostwire by frostwire.
the class MainController method switchContent.
public void switchContent(Fragment fragment) {
if (!Ref.alive(activityRef)) {
return;
}
MainActivity activity = activityRef.get();
activity.switchContent(fragment);
}
use of com.frostwire.android.gui.activities.MainActivity in project frostwire by frostwire.
the class MainController method showTransfers.
public void showTransfers(TransferStatus status) {
if (!Ref.alive(activityRef)) {
return;
}
MainActivity activity = activityRef.get();
if (!(activity.getCurrentFragment() instanceof TransfersFragment)) {
activity.runOnUiThread(() -> {
TransfersFragment fragment = (TransfersFragment) activity.getFragmentByNavMenuId(R.id.menu_main_transfers);
fragment.selectStatusTab(status);
switchFragment(R.id.menu_main_transfers);
});
}
}
use of com.frostwire.android.gui.activities.MainActivity in project frostwire by frostwire.
the class MainController method launchMyMusic.
public void launchMyMusic() {
if (!Ref.alive(activityRef)) {
return;
}
MainActivity activity = activityRef.get();
Intent i = new Intent(activity, com.andrew.apollo.ui.activities.HomeActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(i);
}
Aggregations