use of androidx.annotation.Keep in project Taskbar by farmerbb.
the class Taskbar method openSettings.
/**
* Opens the settings page for configuring Taskbar, using the specified title and theme.
* @param context Context used to start the activity
* @param title Title to display in the top level of the settings hierarchy.
* If null, defaults to "Settings".
* @param theme Theme to apply to the settings activity. If set to -1, the activity will
* use the app's default theme if it is a derivative of Theme.AppCompat,
* or Theme.AppCompat.Light otherwise.
*/
@Keep
public static void openSettings(@NonNull Context context, @Nullable String title, @StyleRes int theme) {
Intent intent = new Intent(context, MainActivity.class);
intent.putExtra("title", title);
intent.putExtra("theme", theme);
intent.putExtra("back_arrow", true);
if (!(context instanceof Activity))
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
Aggregations