use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class PublishFragment method record.
private void record() {
Context context = getContext();
if (context instanceof MainActivity) {
recordPending = false;
((MainActivity) context).requestVideoCapture();
}
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class PublishesFragment method onActionItemClicked.
@Override
public boolean onActionItemClicked(androidx.appcompat.view.ActionMode actionMode, MenuItem menuItem) {
if (R.id.action_edit == menuItem.getItemId()) {
if (adapter != null && adapter.getSelectedCount() > 0) {
Claim claim = adapter.getSelectedItems().get(0);
// start channel editor with the claim
Context context = getContext();
if (context instanceof MainActivity) {
((MainActivity) context).openPublishForm(claim);
}
actionMode.finish();
return true;
}
}
if (R.id.action_delete == menuItem.getItemId()) {
if (adapter != null && adapter.getSelectedCount() > 0) {
final List<Claim> selectedClaims = new ArrayList<>(adapter.getSelectedItems());
String message = getResources().getQuantityString(R.plurals.confirm_delete_publishes, selectedClaims.size());
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()).setTitle(R.string.delete_selection).setMessage(message).setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
handleDeleteSelectedClaims(selectedClaims);
}
}).setNegativeButton(R.string.no, null);
builder.show();
return true;
}
}
return false;
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class RewardsFragment method onStop.
public void onStop() {
Context context = getContext();
if (context instanceof MainActivity) {
MainActivity activity = (MainActivity) context;
activity.resetCurrentDisplayFragment();
}
super.onStop();
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class RewardsFragment method onStart.
public void onStart() {
super.onStart();
Context context = getContext();
if (context instanceof MainActivity) {
MainActivity activity = (MainActivity) context;
activity.setWunderbarValue(null);
}
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class RewardsFragment method onPause.
public void onPause() {
Context context = getContext();
if (context instanceof MainActivity) {
MainActivity activity = (MainActivity) context;
activity.updateMiniPlayerMargins(true);
}
super.onPause();
}
Aggregations