mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-28 16:40:53 +01:00
Added spinners for account/identity/folder
This commit is contained in:
@@ -27,6 +27,11 @@ import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@@ -55,6 +60,16 @@ public class Helper {
|
||||
return mutated;
|
||||
}
|
||||
|
||||
static void setViewsEnabled(ViewGroup view, boolean enabled) {
|
||||
for (int i = 0; i < view.getChildCount(); i++) {
|
||||
View child = view.getChildAt(i);
|
||||
if (child instanceof Spinner || child instanceof EditText || child instanceof CheckBox)
|
||||
child.setEnabled(enabled);
|
||||
else if (child instanceof ViewGroup)
|
||||
setViewsEnabled((ViewGroup) child, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
static String localizeFolderName(Context context, String name) {
|
||||
if ("INBOX".equals(name))
|
||||
return context.getString(R.string.title_folder_inbox);
|
||||
|
||||
Reference in New Issue
Block a user