|
|
|
@ -111,6 +111,7 @@ import androidx.preference.PreferenceManager;
|
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
|
|
|
|
|
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
|
|
|
|
import com.google.android.material.snackbar.Snackbar;
|
|
|
|
|
|
|
|
|
|
import org.openintents.openpgp.util.OpenPgpApi;
|
|
|
|
|
|
|
|
|
@ -1324,6 +1325,16 @@ public class Helper {
|
|
|
|
|
view.setLayoutParams(lparam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void setSnackbarLines(Snackbar snackbar, int lines) {
|
|
|
|
|
View sv = snackbar.getView();
|
|
|
|
|
if (sv == null)
|
|
|
|
|
return;
|
|
|
|
|
TextView tv = sv.findViewById(com.google.android.material.R.id.snackbar_text);
|
|
|
|
|
if (tv == null)
|
|
|
|
|
return;
|
|
|
|
|
tv.setMaxLines(lines);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static boolean isNight(Context context) {
|
|
|
|
|
// https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#configuration_changes
|
|
|
|
|
int uiMode = context.getResources().getConfiguration().uiMode;
|
|
|
|
|