Browse Source

Switched to AndroidX libraries

main
M66B 6 years ago
parent
commit
10ee7df4b9
71 changed files with 443 additions and 407 deletions
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. +13
    -19
      app/build.gradle
  3. +1
    -1
      app/src/main/AndroidManifest.xml
  4. +3
    -2
      app/src/main/java/eu/faircode/email/ActivityBase.java
  5. +3
    -2
      app/src/main/java/eu/faircode/email/ActivityCompose.java
  6. +4
    -3
      app/src/main/java/eu/faircode/email/ActivitySetup.java
  7. +9
    -8
      app/src/main/java/eu/faircode/email/ActivityView.java
  8. +8
    -7
      app/src/main/java/eu/faircode/email/AdapterAccount.java
  9. +8
    -7
      app/src/main/java/eu/faircode/email/AdapterAttachment.java
  10. +6
    -5
      app/src/main/java/eu/faircode/email/AdapterFolder.java
  11. +8
    -7
      app/src/main/java/eu/faircode/email/AdapterIdentity.java
  12. +6
    -5
      app/src/main/java/eu/faircode/email/AdapterMessage.java
  13. +2
    -2
      app/src/main/java/eu/faircode/email/ApplicationEx.java
  14. +12
    -11
      app/src/main/java/eu/faircode/email/DB.java
  15. +7
    -7
      app/src/main/java/eu/faircode/email/DaoAccount.java
  16. +7
    -7
      app/src/main/java/eu/faircode/email/DaoAttachment.java
  17. +7
    -7
      app/src/main/java/eu/faircode/email/DaoFolder.java
  18. +7
    -7
      app/src/main/java/eu/faircode/email/DaoIdentity.java
  19. +8
    -8
      app/src/main/java/eu/faircode/email/DaoMessage.java
  20. +5
    -5
      app/src/main/java/eu/faircode/email/DaoOperation.java
  21. +3
    -3
      app/src/main/java/eu/faircode/email/EntityAccount.java
  22. +10
    -10
      app/src/main/java/eu/faircode/email/EntityAttachment.java
  23. +7
    -7
      app/src/main/java/eu/faircode/email/EntityFolder.java
  24. +3
    -3
      app/src/main/java/eu/faircode/email/EntityIdentity.java
  25. +12
    -12
      app/src/main/java/eu/faircode/email/EntityMessage.java
  26. +10
    -9
      app/src/main/java/eu/faircode/email/EntityOperation.java
  27. +6
    -5
      app/src/main/java/eu/faircode/email/FragmentAbout.java
  28. +12
    -10
      app/src/main/java/eu/faircode/email/FragmentAccount.java
  29. +10
    -8
      app/src/main/java/eu/faircode/email/FragmentAccounts.java
  30. +17
    -13
      app/src/main/java/eu/faircode/email/FragmentCompose.java
  31. +4
    -3
      app/src/main/java/eu/faircode/email/FragmentEula.java
  32. +4
    -3
      app/src/main/java/eu/faircode/email/FragmentEx.java
  33. +11
    -9
      app/src/main/java/eu/faircode/email/FragmentFolder.java
  34. +9
    -7
      app/src/main/java/eu/faircode/email/FragmentFolders.java
  35. +10
    -8
      app/src/main/java/eu/faircode/email/FragmentIdentities.java
  36. +13
    -10
      app/src/main/java/eu/faircode/email/FragmentIdentity.java
  37. +19
    -16
      app/src/main/java/eu/faircode/email/FragmentMessage.java
  38. +17
    -14
      app/src/main/java/eu/faircode/email/FragmentMessages.java
  39. +6
    -5
      app/src/main/java/eu/faircode/email/FragmentSetup.java
  40. +3
    -2
      app/src/main/java/eu/faircode/email/FragmentWebView.java
  41. +12
    -12
      app/src/main/java/eu/faircode/email/Helper.java
  42. +6
    -6
      app/src/main/java/eu/faircode/email/HtmlHelper.java
  43. +27
    -27
      app/src/main/java/eu/faircode/email/MessageHelper.java
  44. +2
    -2
      app/src/main/java/eu/faircode/email/MimeMessageEx.java
  45. +3
    -3
      app/src/main/java/eu/faircode/email/Provider.java
  46. +6
    -5
      app/src/main/java/eu/faircode/email/ServiceSynchronize.java
  47. +1
    -1
      app/src/main/java/eu/faircode/email/TupleAttachment.java
  48. +2
    -2
      app/src/main/res/layout/activity_compose.xml
  49. +2
    -2
      app/src/main/res/layout/activity_setup.xml
  50. +2
    -2
      app/src/main/res/layout/activity_view.xml
  51. +2
    -2
      app/src/main/res/layout/fragment_about.xml
  52. +6
    -6
      app/src/main/res/layout/fragment_account.xml
  53. +5
    -5
      app/src/main/res/layout/fragment_accounts.xml
  54. +5
    -5
      app/src/main/res/layout/fragment_compose.xml
  55. +2
    -2
      app/src/main/res/layout/fragment_eula.xml
  56. +3
    -3
      app/src/main/res/layout/fragment_folder.xml
  57. +5
    -5
      app/src/main/res/layout/fragment_folders.xml
  58. +5
    -5
      app/src/main/res/layout/fragment_identities.xml
  59. +6
    -6
      app/src/main/res/layout/fragment_identity.xml
  60. +8
    -8
      app/src/main/res/layout/fragment_message.xml
  61. +5
    -5
      app/src/main/res/layout/fragment_messages.xml
  62. +2
    -2
      app/src/main/res/layout/fragment_setup.xml
  63. +2
    -2
      app/src/main/res/layout/fragment_webview.xml
  64. +2
    -2
      app/src/main/res/layout/item_account.xml
  65. +2
    -2
      app/src/main/res/layout/item_attachment.xml
  66. +2
    -2
      app/src/main/res/layout/item_drawer.xml
  67. +2
    -2
      app/src/main/res/layout/item_folder.xml
  68. +2
    -2
      app/src/main/res/layout/item_identity.xml
  69. +2
    -2
      app/src/main/res/layout/item_message.xml
  70. +1
    -0
      app/src/main/res/layout/spinner_dropdown_item.xml
  71. +1
    -0
      app/src/main/res/layout/spinner_item.xml

BIN
.idea/caches/build_file_checksums.ser View File


+ 13
- 19
app/build.gradle View File

@ -45,31 +45,25 @@ repositories {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// TODO: AndroidX
def support_version = "28.0.0-alpha1"
def constraintlayout_version = "1.1.2" // 2.0.0-alpha1
def lifecycle_version = "1.1.1"
def room_version = "1.1.1"
def paging_version = "1.0.0"
def androidx_version = "2.0.0-alpha1"
def javamail_version = "1.6.0"
def jsoup_version = "1.11.3"
// https://developer.android.com/topic/libraries/support-library/revisions.html
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support.constraint:constraint-layout:$constraintlayout_version"
implementation "com.android.support:recyclerview-v7:$support_version"
implementation "com.android.support:design:$support_version"
// https://developer.android.com/topic/libraries/support-library/packages
// https://developer.android.com/topic/libraries/support-library/refactor
implementation "androidx.appcompat:appcompat:1.0.0-alpha1"
implementation "androidx.constraintlayout:constraintlayout:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.0.0-alpha1"
implementation "com.google.android.material:material:1.0.0-alpha1"
implementation "androidx.browser:browser:1.0.0-alpha1"
// https://developer.android.com/topic/libraries/architecture/adding-components.html
implementation "android.arch.lifecycle:extensions:$lifecycle_version"
implementation "android.arch.persistence.room:runtime:$room_version"
implementation "android.arch.paging:runtime:$paging_version"
annotationProcessor "android.arch.lifecycle:compiler:$lifecycle_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
// https://developer.android.com/topic/libraries/support-library/packages#custom-tabs
implementation "com.android.support:customtabs:$support_version"
implementation "androidx.lifecycle:lifecycle-extensions:$androidx_version"
implementation "androidx.room:room-runtime:$androidx_version"
implementation "androidx.paging:paging-runtime:$androidx_version"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:$androidx_version"
annotationProcessor "androidx.room:room-compiler:$androidx_version"
// https://javaee.github.io/javamail/
implementation "com.sun.mail:android-mail:$javamail_version"


+ 1
- 1
app/src/main/AndroidManifest.xml View File

@ -47,7 +47,7 @@
<service android:name=".ServiceSynchronize" />
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="eu.faircode.email"
android:exported="false"
android:grantUriPermissions="true">


+ 3
- 2
app/src/main/java/eu/faircode/email/ActivityBase.java View File

@ -22,15 +22,16 @@ package eu.faircode.email;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import androidx.appcompat.app.AppCompatActivity;
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.i(Helper.TAG, "Create " + this.getClass().getName());
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
String theme = prefs.getString("theme" , "light");
String theme = prefs.getString("theme", "light");
setTheme("light".equals(theme) ? R.style.AppThemeLight : R.style.AppThemeDark);
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
super.onCreate(savedInstanceState);


+ 3
- 2
app/src/main/java/eu/faircode/email/ActivityCompose.java View File

@ -20,10 +20,11 @@ package eu.faircode.email;
*/
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
public class ActivityCompose extends ActivityBase implements FragmentManager.OnBackStackChangedListener {
static final int LOADER_COMPOSE_GET = 1;
static final int LOADER_COMPOSE_PUT = 2;


+ 4
- 3
app/src/main/java/eu/faircode/email/ActivitySetup.java View File

@ -24,11 +24,12 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.LocalBroadcastManager;
import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
public class ActivitySetup extends ActivityBase implements FragmentManager.OnBackStackChangedListener {
static final String ACTION_EDIT_ACCOUNT = BuildConfig.APPLICATION_ID + ".EDIT_ACCOUNT";
static final String ACTION_EDIT_IDENTITY = BuildConfig.APPLICATION_ID + ".EDIT_IDENTITY";


+ 9
- 8
app/src/main/java/eu/faircode/email/ActivityView.java View File

@ -19,7 +19,6 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@ -29,13 +28,6 @@ import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
@ -56,6 +48,15 @@ import java.util.Locale;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
public class ActivityView extends ActivityBase implements FragmentManager.OnBackStackChangedListener, SharedPreferences.OnSharedPreferenceChangeListener {
private boolean newIntent = false;
private DrawerLayout drawerLayout;


+ 8
- 7
app/src/main/java/eu/faircode/email/AdapterAccount.java View File

@ -21,11 +21,6 @@ package eu.faircode.email;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.util.DiffUtil;
import android.support.v7.util.ListUpdateCallback;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -40,6 +35,12 @@ import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import androidx.annotation.NonNull;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListUpdateCallback;
import androidx.recyclerview.widget.RecyclerView;
public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHolder> {
private Context context;
@ -77,7 +78,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
ivPrimary.setVisibility(account.primary ? View.VISIBLE : View.GONE);
tvName.setText(account.name);
ivSync.setVisibility(account.synchronize ? View.VISIBLE : View.INVISIBLE);
tvHost.setText(String.format("%s:%d" , account.host, account.port));
tvHost.setText(String.format("%s:%d", account.host, account.port));
tvUser.setText(account.user);
}
@ -91,7 +92,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(
new Intent(ActivitySetup.ACTION_EDIT_ACCOUNT)
.putExtra("id" , account.id));
.putExtra("id", account.id));
}
}


+ 8
- 7
app/src/main/java/eu/faircode/email/AdapterAttachment.java View File

@ -24,11 +24,6 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.v4.content.FileProvider;
import android.support.v7.util.DiffUtil;
import android.support.v7.util.ListUpdateCallback;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
@ -48,6 +43,12 @@ import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import androidx.annotation.NonNull;
import androidx.core.content.FileProvider;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListUpdateCallback;
import androidx.recyclerview.widget.RecyclerView;
public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.ViewHolder> {
private Context context;
private ExecutorService executor = Executors.newCachedThreadPool();
@ -116,10 +117,10 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
final File dir = new File(context.getCacheDir(), "attachments");
final File file = new File(dir, TextUtils.isEmpty(attachment.name)
? "attachment_" + attachment.id
: attachment.name.toLowerCase().replaceAll("[^a-zA-Z0-9-.]" , "_"));
: attachment.name.toLowerCase().replaceAll("[^a-zA-Z0-9-.]", "_"));
// https://developer.android.com/reference/android/support/v4/content/FileProvider
Uri uri = FileProvider.getUriForFile(context, "eu.faircode.email" , file);
Uri uri = FileProvider.getUriForFile(context, "eu.faircode.email", file);
// Build intent
final Intent intent = new Intent(Intent.ACTION_VIEW);


+ 6
- 5
app/src/main/java/eu/faircode/email/AdapterFolder.java View File

@ -22,11 +22,6 @@ package eu.faircode.email;
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.util.DiffUtil;
import android.support.v7.util.ListUpdateCallback;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -41,6 +36,12 @@ import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import androidx.annotation.NonNull;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListUpdateCallback;
import androidx.recyclerview.widget.RecyclerView;
public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder> {
private Context context;


+ 8
- 7
app/src/main/java/eu/faircode/email/AdapterIdentity.java View File

@ -21,11 +21,6 @@ package eu.faircode.email;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.util.DiffUtil;
import android.support.v7.util.ListUpdateCallback;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -40,6 +35,12 @@ import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import androidx.annotation.NonNull;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListUpdateCallback;
import androidx.recyclerview.widget.RecyclerView;
public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHolder> {
private Context context;
@ -77,7 +78,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
ivPrimary.setVisibility(identity.primary ? View.VISIBLE : View.GONE);
tvName.setText(identity.name);
ivSync.setVisibility(identity.synchronize ? View.VISIBLE : View.INVISIBLE);
tvHost.setText(String.format("%s:%d" , identity.host, identity.port));
tvHost.setText(String.format("%s:%d", identity.host, identity.port));
tvEmail.setText(identity.email);
}
@ -91,7 +92,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(
new Intent(ActivitySetup.ACTION_EDIT_IDENTITY)
.putExtra("id" , identity.id));
.putExtra("id", identity.id));
}
}


+ 6
- 5
app/src/main/java/eu/faircode/email/AdapterMessage.java View File

@ -19,15 +19,10 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.paging.PagedListAdapter;
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.util.DiffUtil;
import android.support.v7.widget.RecyclerView;
import android.text.format.DateUtils;
import android.util.Log;
import android.view.LayoutInflater;
@ -40,6 +35,12 @@ import android.widget.TextView;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import androidx.annotation.NonNull;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.paging.PagedListAdapter;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.RecyclerView;
public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMessage.ViewHolder> {
private Context context;
private ViewType viewType;


+ 2
- 2
app/src/main/java/eu/faircode/email/ApplicationEx.java View File

@ -45,7 +45,7 @@ public class ApplicationEx extends Application {
db = DB.getBlockingInstance(ApplicationEx.this);
EntityFolder drafts = db.folder().getPrimaryFolder(EntityFolder.TYPE_DRAFTS);
if (drafts != null) {
Address to = new InternetAddress("marcel+email@faircode.eu" , "FairCode");
Address to = new InternetAddress("marcel+email@faircode.eu", "FairCode");
String body = ex + "\n" + Log.getStackTraceString(ex);
EntityMessage draft = new EntityMessage();
@ -53,7 +53,7 @@ public class ApplicationEx extends Application {
draft.folder = drafts.id;
draft.to = new Address[]{to};
draft.subject = BuildConfig.APPLICATION_ID + " crash info";
draft.body = "<pre>" + body.replaceAll("\\r?\\n" , "<br />") + "</pre>";
draft.body = "<pre>" + body.replaceAll("\\r?\\n", "<br />") + "</pre>";
draft.received = new Date().getTime();
draft.seen = false;
draft.ui_seen = false;


+ 12
- 11
app/src/main/java/eu/faircode/email/DB.java View File

@ -1,12 +1,5 @@
package eu.faircode.email;
import android.arch.persistence.db.SupportSQLiteDatabase;
import android.arch.persistence.room.Database;
import android.arch.persistence.room.Room;
import android.arch.persistence.room.RoomDatabase;
import android.arch.persistence.room.TypeConverter;
import android.arch.persistence.room.TypeConverters;
import android.arch.persistence.room.migration.Migration;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
@ -21,6 +14,14 @@ import java.util.List;
import javax.mail.Address;
import javax.mail.internet.InternetAddress;
import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;
import androidx.room.TypeConverter;
import androidx.room.TypeConverters;
import androidx.room.migration.Migration;
import androidx.sqlite.db.SupportSQLiteDatabase;
/*
This file is part of Safe email.
@ -149,7 +150,7 @@ public abstract class DB extends RoomDatabase {
@TypeConverter
public static String toStringArray(String[] value) {
return TextUtils.join("," , value);
return TextUtils.join(",", value);
}
@TypeConverter
@ -165,13 +166,13 @@ public abstract class DB extends RoomDatabase {
String p = ((InternetAddress) address).getPersonal();
JSONObject jaddress = new JSONObject();
if (a != null)
jaddress.put("address" , a);
jaddress.put("address", a);
if (p != null)
jaddress.put("personal" , p);
jaddress.put("personal", p);
jaddresses.put(jaddress);
} else {
JSONObject jaddress = new JSONObject();
jaddress.put("address" , address.toString());
jaddress.put("address", address.toString());
jaddresses.put(jaddress);
}
} catch (JSONException ex) {


+ 7
- 7
app/src/main/java/eu/faircode/email/DaoAccount.java View File

@ -19,15 +19,15 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;
import java.util.List;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
@Dao
public interface DaoAccount {
@Query("SELECT * FROM account WHERE synchronize = :synchronize")


+ 7
- 7
app/src/main/java/eu/faircode/email/DaoAttachment.java View File

@ -19,15 +19,15 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;
import java.util.List;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
@Dao
public interface DaoAttachment {
@Query("SELECT id,message,sequence,name,type,size,progress" +


+ 7
- 7
app/src/main/java/eu/faircode/email/DaoFolder.java View File

@ -19,15 +19,15 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;
import java.util.List;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
@Dao
public interface DaoFolder {
@Query("SELECT * FROM folder WHERE account = :account")


+ 7
- 7
app/src/main/java/eu/faircode/email/DaoIdentity.java View File

@ -19,15 +19,15 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;
import java.util.List;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
@Dao
public interface DaoIdentity {
@Query("SELECT * FROM identity")


+ 8
- 8
app/src/main/java/eu/faircode/email/DaoMessage.java View File

@ -19,16 +19,16 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.LiveData;
import android.arch.paging.DataSource;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;
import java.util.List;
import androidx.lifecycle.LiveData;
import androidx.paging.DataSource;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
@Dao
public interface DaoMessage {


+ 5
- 5
app/src/main/java/eu/faircode/email/DaoOperation.java View File

@ -19,13 +19,13 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import java.util.List;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
@Dao
public interface DaoOperation {
@Insert(onConflict = OnConflictStrategy.REPLACE)


+ 3
- 3
app/src/main/java/eu/faircode/email/EntityAccount.java View File

@ -19,9 +19,9 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@Entity(
tableName = EntityAccount.TABLE_NAME,


+ 10
- 10
app/src/main/java/eu/faircode/email/EntityAttachment.java View File

@ -19,25 +19,25 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import javax.mail.BodyPart;
import static android.arch.persistence.room.ForeignKey.CASCADE;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Ignore;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import static androidx.room.ForeignKey.CASCADE;
@Entity(
tableName = EntityAttachment.TABLE_NAME,
foreignKeys = {
@ForeignKey(childColumns = "message" , entity = EntityMessage.class, parentColumns = "id" , onDelete = CASCADE)
@ForeignKey(childColumns = "message", entity = EntityMessage.class, parentColumns = "id", onDelete = CASCADE)
},
indices = {
@Index(value = {"message"}),
@Index(value = {"message" , "sequence"}, unique = true)
@Index(value = {"message", "sequence"}, unique = true)
}
)
public class EntityAttachment {


+ 7
- 7
app/src/main/java/eu/faircode/email/EntityFolder.java View File

@ -19,16 +19,16 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import java.util.Arrays;
import java.util.List;
import static android.arch.persistence.room.ForeignKey.CASCADE;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import static androidx.room.ForeignKey.CASCADE;
@Entity(
tableName = EntityFolder.TABLE_NAME,


+ 3
- 3
app/src/main/java/eu/faircode/email/EntityIdentity.java View File

@ -19,9 +19,9 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@Entity(
tableName = EntityIdentity.TABLE_NAME,


+ 12
- 12
app/src/main/java/eu/faircode/email/EntityMessage.java View File

@ -19,32 +19,32 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import javax.mail.Address;
import static android.arch.persistence.room.ForeignKey.CASCADE;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import static androidx.room.ForeignKey.CASCADE;
// https://developer.android.com/training/data-storage/room/defining-data
@Entity(
tableName = EntityMessage.TABLE_NAME,
foreignKeys = {
@ForeignKey(childColumns = "account" , entity = EntityAccount.class, parentColumns = "id" , onDelete = CASCADE),
@ForeignKey(childColumns = "folder" , entity = EntityFolder.class, parentColumns = "id" , onDelete = CASCADE),
@ForeignKey(childColumns = "identity" , entity = EntityIdentity.class, parentColumns = "id" , onDelete = CASCADE),
@ForeignKey(childColumns = "replying" , entity = EntityMessage.class, parentColumns = "id" , onDelete = CASCADE)
@ForeignKey(childColumns = "account", entity = EntityAccount.class, parentColumns = "id", onDelete = CASCADE),
@ForeignKey(childColumns = "folder", entity = EntityFolder.class, parentColumns = "id", onDelete = CASCADE),
@ForeignKey(childColumns = "identity", entity = EntityIdentity.class, parentColumns = "id", onDelete = CASCADE),
@ForeignKey(childColumns = "replying", entity = EntityMessage.class, parentColumns = "id", onDelete = CASCADE)
},
indices = {
@Index(value = {"account"}),
@Index(value = {"folder"}),
@Index(value = {"identity"}),
@Index(value = {"replying"}),
@Index(value = {"folder" , "uid"}, unique = true),
@Index(value = {"folder", "uid"}, unique = true),
@Index(value = {"thread"}),
@Index(value = {"received"}),
@Index(value = {"ui_seen"}),


+ 10
- 9
app/src/main/java/eu/faircode/email/EntityOperation.java View File

@ -19,14 +19,8 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import org.json.JSONArray;
@ -34,12 +28,19 @@ import org.json.JSONArray;
import java.util.ArrayList;
import java.util.List;
import static android.arch.persistence.room.ForeignKey.CASCADE;
import androidx.annotation.NonNull;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import static androidx.room.ForeignKey.CASCADE;
@Entity(
tableName = EntityOperation.TABLE_NAME,
foreignKeys = {
@ForeignKey(childColumns = "message" , entity = EntityMessage.class, parentColumns = "id" , onDelete = CASCADE)
@ForeignKey(childColumns = "message", entity = EntityMessage.class, parentColumns = "id", onDelete = CASCADE)
},
indices = {
@Index(value = {"message"})
@ -101,7 +102,7 @@ public class EntityOperation {
intent.setType("account/" + message.account);
intent.setAction(ServiceSynchronize.ACTION_PROCESS_FOLDER);
}
intent.putExtra("folder" , message.folder);
intent.putExtra("folder", message.folder);
synchronized (queue) {
queue.add(intent);


+ 6
- 5
app/src/main/java/eu/faircode/email/FragmentAbout.java View File

@ -21,8 +21,6 @@ package eu.faircode.email;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -37,6 +35,9 @@ import java.util.concurrent.Executors;
import javax.mail.Address;
import javax.mail.internet.InternetAddress;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class FragmentAbout extends FragmentEx {
private ExecutorService executor = Executors.newCachedThreadPool();
@ -65,14 +66,14 @@ public class FragmentAbout extends FragmentEx {
StringBuilder info = Helper.getDebugInfo();
info.insert(0, getString(R.string.title_debug_info_remark) + "\n\n\n\n");
Address to = new InternetAddress("marcel+email@faircode.eu" , "FairCode");
Address to = new InternetAddress("marcel+email@faircode.eu", "FairCode");
EntityMessage draft = new EntityMessage();
draft.account = drafts.account;
draft.folder = drafts.id;
draft.to = new Address[]{to};
draft.subject = BuildConfig.APPLICATION_ID + " debug info";
draft.body = "<pre>" + info.toString().replaceAll("\\r?\\n" , "<br />") + "</pre>";
draft.body = "<pre>" + info.toString().replaceAll("\\r?\\n", "<br />") + "</pre>";
draft.received = new Date().getTime();
draft.seen = false;
draft.ui_seen = false;
@ -83,7 +84,7 @@ public class FragmentAbout extends FragmentEx {
EntityOperation.process(getContext());
startActivity(new Intent(getContext(), ActivityCompose.class)
.putExtra("id" , draft.id));
.putExtra("id", draft.id));
}
} catch (Throwable ex) {
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));


+ 12
- 10
app/src/main/java/eu/faircode/email/FragmentAccount.java View File

@ -19,17 +19,9 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.AsyncTaskLoader;
import android.support.v4.content.Loader;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
@ -46,6 +38,7 @@ import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.Toast;
import com.google.android.material.textfield.TextInputLayout;
import com.sun.mail.imap.IMAPFolder;
import com.sun.mail.imap.IMAPStore;
@ -58,6 +51,14 @@ import javax.mail.Folder;
import javax.mail.MessagingException;
import javax.mail.Session;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.lifecycle.Observer;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.AsyncTaskLoader;
import androidx.loader.content.Loader;
public class FragmentAccount extends FragmentEx {
private List<Provider> providers;
@ -149,7 +150,8 @@ public class FragmentAccount extends FragmentEx {
args.putBoolean("synchronize", cbSynchronize.isChecked());
args.putBoolean("primary", cbPrimary.isChecked());
getLoaderManager().restartLoader(ActivityView.LOADER_ACCOUNT_PUT, args, putLoaderCallbacks).forceLoad();
LoaderManager.getInstance(FragmentAccount.this)
.restartLoader(ActivityView.LOADER_ACCOUNT_PUT, args, putLoaderCallbacks).forceLoad();
}
});
@ -382,7 +384,7 @@ public class FragmentAccount extends FragmentEx {
@Override
public void onLoadFinished(@NonNull Loader<Throwable> loader, Throwable ex) {
getLoaderManager().destroyLoader(loader.getId());
LoaderManager.getInstance(FragmentAccount.this).destroyLoader(loader.getId());
btnSave.setEnabled(true);
pbCheck.setVisibility(View.GONE);


+ 10
- 8
app/src/main/java/eu/faircode/email/FragmentAccounts.java View File

@ -19,22 +19,24 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.constraint.Group;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public class FragmentAccounts extends FragmentEx {
private RecyclerView rvAccount;
private ProgressBar pbWait;


+ 17
- 13
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -19,21 +19,12 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.os.Handler;
import android.provider.ContactsContract;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.constraint.Group;
import android.support.design.widget.BottomNavigationView;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.AsyncTaskLoader;
import android.support.v4.content.Loader;
import android.text.Html;
import android.text.TextUtils;
import android.util.Log;
@ -50,6 +41,8 @@ import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.Toast;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -61,6 +54,15 @@ import javax.mail.Address;
import javax.mail.MessagingException;
import javax.mail.internet.InternetAddress;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.AsyncTaskLoader;
import androidx.loader.content.Loader;
import static android.app.Activity.RESULT_OK;
public class FragmentCompose extends FragmentEx {
@ -213,7 +215,8 @@ public class FragmentCompose extends FragmentEx {
ivIdentityAdd.setVisibility(View.VISIBLE);
// Get might select another identity
getLoaderManager().restartLoader(ActivityCompose.LOADER_COMPOSE_GET, getArguments(), getLoaderCallbacks).forceLoad();
LoaderManager.getInstance(FragmentCompose.this)
.restartLoader(ActivityCompose.LOADER_COMPOSE_GET, getArguments(), getLoaderCallbacks).forceLoad();
}
});
}
@ -305,7 +308,8 @@ public class FragmentCompose extends FragmentEx {
args.putString("body", etBody.getText().toString());
args.putString("action", action);
getLoaderManager().restartLoader(ActivityCompose.LOADER_COMPOSE_PUT, args, putLoaderCallbacks).forceLoad();
LoaderManager.getInstance(this)
.restartLoader(ActivityCompose.LOADER_COMPOSE_PUT, args, putLoaderCallbacks).forceLoad();
}
private static class GetLoader extends AsyncTaskLoader<Bundle> {
@ -394,7 +398,7 @@ public class FragmentCompose extends FragmentEx {
@Override
public void onLoadFinished(@NonNull Loader<Bundle> loader, Bundle result) {
getLoaderManager().destroyLoader(loader.getId());
LoaderManager.getInstance(FragmentCompose.this).destroyLoader(loader.getId());
long iid = result.getLong("iid", -1);
long rid = result.getLong("rid", -1);
@ -618,7 +622,7 @@ public class FragmentCompose extends FragmentEx {
@Override
public void onLoadFinished(@NonNull Loader<Throwable> loader, Throwable ex) {
getLoaderManager().destroyLoader(loader.getId());
LoaderManager.getInstance(FragmentCompose.this).destroyLoader(loader.getId());
String action = args.getString("action");
Log.i(Helper.TAG, "Put finished action=" + action + " ex=" + ex);


+ 4
- 3
app/src/main/java/eu/faircode/email/FragmentEula.java View File

@ -22,13 +22,14 @@ package eu.faircode.email;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class FragmentEula extends FragmentEx {
@Override
@ -43,7 +44,7 @@ public class FragmentEula extends FragmentEx {
@Override
public void onClick(View view) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
prefs.edit().putBoolean("eula" , true).apply();
prefs.edit().putBoolean("eula", true).apply();
}
});


+ 4
- 3
app/src/main/java/eu/faircode/email/FragmentEx.java View File

@ -1,11 +1,12 @@
package eu.faircode.email;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
public class FragmentEx extends Fragment {
private String subtitle = " ";


+ 11
- 9
app/src/main/java/eu/faircode/email/FragmentFolder.java View File

@ -19,15 +19,8 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.constraint.Group;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.AsyncTaskLoader;
import android.support.v4.content.Loader;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
@ -39,6 +32,14 @@ import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.Group;
import androidx.lifecycle.Observer;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.AsyncTaskLoader;
import androidx.loader.content.Loader;
public class FragmentFolder extends FragmentEx {
private CheckBox cbSynchronize;
private EditText etAfter;
@ -77,7 +78,8 @@ public class FragmentFolder extends FragmentEx {
args.putBoolean("synchronize", cbSynchronize.isChecked());
args.putString("after", etAfter.getText().toString());
getLoaderManager().restartLoader(ActivityView.LOADER_FOLDER_PUT, args, putLoaderCallbacks).forceLoad();
LoaderManager.getInstance(FragmentFolder.this)
.restartLoader(ActivityView.LOADER_FOLDER_PUT, args, putLoaderCallbacks).forceLoad();
}
});
@ -163,7 +165,7 @@ public class FragmentFolder extends FragmentEx {
@Override
public void onLoadFinished(@NonNull Loader<Throwable> loader, Throwable ex) {
getLoaderManager().destroyLoader(loader.getId());
LoaderManager.getInstance(FragmentFolder.this).destroyLoader(loader.getId());
btnSave.setEnabled(true);
pbSave.setVisibility(View.GONE);


+ 9
- 7
app/src/main/java/eu/faircode/email/FragmentFolders.java View File

@ -19,22 +19,24 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.constraint.Group;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.Toast;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.Group;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public class FragmentFolders extends FragmentEx {
private RecyclerView rvFolder;
private ProgressBar pbWait;


+ 10
- 8
app/src/main/java/eu/faircode/email/FragmentIdentities.java View File

@ -19,22 +19,24 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.constraint.Group;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public class FragmentIdentities extends FragmentEx {
private RecyclerView rvIdentity;
private ProgressBar pbWait;


+ 13
- 10
app/src/main/java/eu/faircode/email/FragmentIdentity.java View File

@ -19,17 +19,9 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.AsyncTaskLoader;
import android.support.v4.content.Loader;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@ -48,6 +40,8 @@ import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.Toast;
import com.google.android.material.textfield.TextInputLayout;
import java.util.List;
import java.util.Objects;
import java.util.Properties;
@ -57,6 +51,14 @@ import java.util.concurrent.Executors;
import javax.mail.Session;
import javax.mail.Transport;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.lifecycle.Observer;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.AsyncTaskLoader;
import androidx.loader.content.Loader;
public class FragmentIdentity extends FragmentEx {
private List<Provider> providers;
@ -179,7 +181,8 @@ public class FragmentIdentity extends FragmentEx {
args.putBoolean("synchronize", cbSynchronize.isChecked());
args.putBoolean("primary", cbPrimary.isChecked());
getLoaderManager().restartLoader(ActivityView.LOADER_IDENTITY_PUT, args, putLoaderCallbacks).forceLoad();
LoaderManager.getInstance(FragmentIdentity.this)
.restartLoader(ActivityView.LOADER_IDENTITY_PUT, args, putLoaderCallbacks).forceLoad();
}
});
@ -341,7 +344,7 @@ public class FragmentIdentity extends FragmentEx {
@Override
public void onLoadFinished(@NonNull Loader<Throwable> loader, Throwable ex) {
getLoaderManager().destroyLoader(loader.getId());
LoaderManager.getInstance(FragmentIdentity.this).destroyLoader(loader.getId());
btnSave.setEnabled(true);
pbCheck.setVisibility(View.GONE);


+ 19
- 16
app/src/main/java/eu/faircode/email/FragmentMessage.java View File

@ -19,26 +19,12 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.Observer;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.constraint.Group;
import android.support.customtabs.CustomTabsIntent;
import android.support.design.widget.BottomNavigationView;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.AsyncTaskLoader;
import android.support.v4.content.Loader;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.text.Layout;
import android.text.Spannable;
@ -55,6 +41,8 @@ import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import java.text.Collator;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@ -66,6 +54,20 @@ import java.util.Locale;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.PopupMenu;
import androidx.browser.customtabs.CustomTabsIntent;
import androidx.constraintlayout.widget.Group;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.AsyncTaskLoader;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public class FragmentMessage extends FragmentEx {
private TextView tvTime;
private TextView tvFrom;
@ -471,7 +473,8 @@ public class FragmentMessage extends FragmentEx {
private void onActionMove(final long id) {
Bundle args = new Bundle();
args.putLong("id", id);
getLoaderManager().restartLoader(ActivityView.LOADER_MESSAGE_MOVE, args, moveLoaderCallbacks).forceLoad();
LoaderManager.getInstance(this)
.restartLoader(ActivityView.LOADER_MESSAGE_MOVE, args, moveLoaderCallbacks).forceLoad();
}
private void onActionArchive(final long id) {
@ -555,7 +558,7 @@ public class FragmentMessage extends FragmentEx {
@Override
public void onLoadFinished(@NonNull Loader<List<EntityFolder>> loader, List<EntityFolder> folders) {
getLoaderManager().destroyLoader(loader.getId());
LoaderManager.getInstance(FragmentMessage.this).destroyLoader(loader.getId());
View anchor = top_navigation.findViewById(R.id.action_thread);
PopupMenu popupMenu = new PopupMenu(getContext(), anchor);


+ 17
- 14
app/src/main/java/eu/faircode/email/FragmentMessages.java View File

@ -19,23 +19,10 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.Observer;
import android.arch.paging.LivePagedListBuilder;
import android.arch.paging.PagedList;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.constraint.Group;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.AsyncTaskLoader;
import android.support.v4.content.Loader;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -43,6 +30,21 @@ import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.Group;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.Observer;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.AsyncTaskLoader;
import androidx.loader.content.Loader;
import androidx.paging.LivePagedListBuilder;
import androidx.paging.PagedList;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public class FragmentMessages extends FragmentEx {
private RecyclerView rvMessage;
private TextView tvNoEmail;
@ -149,7 +151,8 @@ public class FragmentMessages extends FragmentEx {
}
});
getLoaderManager().restartLoader(ActivityView.LOADER_MESSAGES_INIT, new Bundle(), initLoaderCallbacks).forceLoad();
LoaderManager.getInstance(this)
.restartLoader(ActivityView.LOADER_MESSAGES_INIT, new Bundle(), initLoaderCallbacks).forceLoad();
}
private static class InitLoader extends AsyncTaskLoader<Bundle> {


+ 6
- 5
app/src/main/java/eu/faircode/email/FragmentSetup.java View File

@ -20,15 +20,10 @@ package eu.faircode.email;
*/
import android.Manifest;
import android.arch.lifecycle.Observer;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -42,6 +37,12 @@ import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer;
public class FragmentSetup extends FragmentEx {
private Button btnAccount;
private ProgressBar pbAccount;


+ 3
- 2
app/src/main/java/eu/faircode/email/FragmentWebView.java View File

@ -20,8 +20,6 @@ package eu.faircode.email;
*/
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -31,6 +29,9 @@ import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
// https://developer.android.com/reference/android/webkit/WebView
public class FragmentWebView extends FragmentEx {


+ 12
- 12
app/src/main/java/eu/faircode/email/Helper.java View File

@ -72,33 +72,33 @@ public class Helper {
if (bytes < unit) return bytes + " B";
int exp = (int) (Math.log(bytes) / Math.log(unit));
String pre = (si ? "kMGTPE" : "KMGTPE").charAt(exp - 1) + (si ? "" : "i");
return String.format("%.1f %sB" , bytes / Math.pow(unit, exp), pre);
return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre);
}
static StringBuilder getDebugInfo() {
StringBuilder sb = new StringBuilder();
// Get version info
sb.append(String.format("%s: %s/%d\r\n" , BuildConfig.APPLICATION_ID, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
sb.append(String.format("Android: %s (SDK %d)\r\n" , Build.VERSION.RELEASE, Build.VERSION.SDK_INT));
sb.append(String.format("%s: %s/%d\r\n", BuildConfig.APPLICATION_ID, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
sb.append(String.format("Android: %s (SDK %d)\r\n", Build.VERSION.RELEASE, Build.VERSION.SDK_INT));
sb.append("\r\n");
// Get device info
sb.append(String.format("Brand: %s\r\n" , Build.BRAND));
sb.append(String.format("Manufacturer: %s\r\n" , Build.MANUFACTURER));
sb.append(String.format("Model: %s\r\n" , Build.MODEL));
sb.append(String.format("Product: %s\r\n" , Build.PRODUCT));
sb.append(String.format("Device: %s\r\n" , Build.DEVICE));
sb.append(String.format("Host: %s\r\n" , Build.HOST));
sb.append(String.format("Display: %s\r\n" , Build.DISPLAY));
sb.append(String.format("Id: %s\r\n" , Build.ID));
sb.append(String.format("Brand: %s\r\n", Build.BRAND));
sb.append(String.format("Manufacturer: %s\r\n", Build.MANUFACTURER));
sb.append(String.format("Model: %s\r\n", Build.MODEL));
sb.append(String.format("Product: %s\r\n", Build.PRODUCT));
sb.append(String.format("Device: %s\r\n", Build.DEVICE));
sb.append(String.format("Host: %s\r\n", Build.HOST));
sb.append(String.format("Display: %s\r\n", Build.DISPLAY));
sb.append(String.format("Id: %s\r\n", Build.ID));
sb.append("\r\n");
// Get logcat
Process proc = null;
BufferedReader br = null;
try {
String[] cmd = new String[]{"logcat" , "-d" , "-v" , "threadtime"};
String[] cmd = new String[]{"logcat", "-d", "-v", "threadtime"};
proc = Runtime.getRuntime().exec(cmd);
br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line;


+ 6
- 6
app/src/main/java/eu/faircode/email/HtmlHelper.java View File

@ -58,20 +58,20 @@ public class HtmlHelper implements NodeVisitor {
if (!refs.contains(ref))
refs.add(ref);
String alt = context.getString(R.string.title_link);
text = text.replace(ref, String.format("<a href=\"%s\">%s [%d]</a>" , ref, alt, refs.size()));
text = text.replace(ref, String.format("<a href=\"%s\">%s [%d]</a>", ref, alt, refs.size()));
}
sb.append(text);
} else if (name.equals("li"))
sb.append(newline).append(" * ");
else if (name.equals("dt"))
sb.append(" ");
else if (StringUtil.in(name, "p" , "h1" , "h2" , "h3" , "h4" , "h5" , "tr" , "div"))
else if (StringUtil.in(name, "p", "h1", "h2", "h3", "h4", "h5", "tr", "div"))
sb.append(newline);
}
public void tail(Node node, int depth) {
String name = node.nodeName();
if (StringUtil.in(name, "br" , "dd" , "dt" , "p" , "h1" , "h2" , "h3" , "h4" , "h5" , "div"))
if (StringUtil.in(name, "br", "dd", "dt", "p", "h1", "h2", "h3", "h4", "h5", "div"))
sb.append(newline);
else if (name.equals("a")) {
String ref = node.absUrl("href");
@ -82,7 +82,7 @@ public class HtmlHelper implements NodeVisitor {
if (TextUtils.isEmpty(alt))
alt = context.getString(R.string.title_link);
alt = Html.escapeHtml(alt);
sb.append(" ").append(String.format("<a href=\"%s\">%s [%d]</a>" , ref, alt, refs.size()));
sb.append(" ").append(String.format("<a href=\"%s\">%s [%d]</a>", ref, alt, refs.size()));
}
} else if (name.equals("img")) {
String ref = node.absUrl("src");
@ -93,7 +93,7 @@ public class HtmlHelper implements NodeVisitor {
if (TextUtils.isEmpty(alt))
alt = context.getString(R.string.title_image);
alt = Html.escapeHtml(alt);
sb.append(" ").append(String.format("<a href=\"%s\">%s [%d]</a>" , ref, alt, refs.size()));
sb.append(" ").append(String.format("<a href=\"%s\">%s [%d]</a>", ref, alt, refs.size()));
}
}
}
@ -103,7 +103,7 @@ public class HtmlHelper implements NodeVisitor {
if (refs.size() > 0)
sb.append(newline).append(newline);
for (int i = 0; i < refs.size(); i++)
sb.append(String.format("[%d] %s " , i + 1, refs.get(i))).append(newline);
sb.append(String.format("[%d] %s ", i + 1, refs.get(i))).append(newline);
return sb.toString();
}


+ 27
- 27
app/src/main/java/eu/faircode/email/MessageHelper.java View File

@ -52,28 +52,28 @@ public class MessageHelper {
Properties props = new Properties();
// https://javaee.github.io/javamail/docs/api/com/sun/mail/imap/package-summary.html#properties
props.put("mail.imaps.ssl.checkserveridentity" , "true");
props.put("mail.imaps.ssl.trust" , "*");
props.put("mail.imaps.starttls.enable" , "false");
props.put("mail.imaps.timeout" , "20000");
props.put("mail.imaps.connectiontimeout" , "20000");
props.put("mail.imaps.ssl.checkserveridentity", "true");
props.put("mail.imaps.ssl.trust", "*");
props.put("mail.imaps.starttls.enable", "false");
props.put("mail.imaps.timeout", "20000");
props.put("mail.imaps.connectiontimeout", "20000");
// https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html#properties
props.put("mail.smtps.ssl.checkserveridentity" , "true");
props.put("mail.smtps.ssl.trust" , "*");
props.put("mail.smtps.starttls.enable" , "false");
props.put("mail.smtps.starttls.required" , "false");
props.put("mail.smtps.auth" , "true");
props.put("mail.smtps.timeout" , "20000");
props.put("mail.smtps.connectiontimeout" , "20000");
props.put("mail.smtp.ssl.checkserveridentity" , "true");
props.put("mail.smtp.ssl.trust" , "*");
props.put("mail.smtp.starttls.enable" , "true");
props.put("mail.smtp.starttls.required" , "true");
props.put("mail.smtp.auth" , "true");
props.put("mail.smtp.timeout" , "20000");
props.put("mail.smtp.connectiontimeout" , "20000");
props.put("mail.smtps.ssl.checkserveridentity", "true");
props.put("mail.smtps.ssl.trust", "*");
props.put("mail.smtps.starttls.enable", "false");
props.put("mail.smtps.starttls.required", "false");
props.put("mail.smtps.auth", "true");
props.put("mail.smtps.timeout", "20000");
props.put("mail.smtps.connectiontimeout", "20000");
props.put("mail.smtp.ssl.checkserveridentity", "true");
props.put("mail.smtp.ssl.trust", "*");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.starttls.required", "true");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.timeout", "20000");
props.put("mail.smtp.connectiontimeout", "20000");
return props;
}
@ -106,8 +106,8 @@ public class MessageHelper {
static MimeMessageEx from(EntityMessage message, EntityMessage reply, Session isession) throws MessagingException {
MimeMessageEx imessage = from(message, isession);
imessage.addHeader("In-Reply-To" , reply.msgid);
imessage.addHeader("References" , (reply.references == null ? "" : reply.references + " ") + reply.msgid);
imessage.addHeader("In-Reply-To", reply.msgid);
imessage.addHeader("References", (reply.references == null ? "" : reply.references + " ") + reply.msgid);
return imessage;
}
@ -126,16 +126,16 @@ public class MessageHelper {
}
String getMessageID() throws MessagingException {
return imessage.getHeader("Message-ID" , null);
return imessage.getHeader("Message-ID", null);
}
String[] getReferences() throws MessagingException {
String refs = imessage.getHeader("References" , null);
String refs = imessage.getHeader("References", null);
return (refs == null ? new String[0] : refs.split("\\s+"));
}
String getInReplyTo() throws MessagingException {
return imessage.getHeader("In-Reply-To" , null);
return imessage.getHeader("In-Reply-To", null);
}
String getThreadId(long uid) throws MessagingException {
@ -181,7 +181,7 @@ public class MessageHelper {
formatted.add(personal);
} else
formatted.add(address.toString());
return TextUtils.join(", " , formatted);
return TextUtils.join(", ", formatted);
}
String getHtml() throws MessagingException {
@ -193,7 +193,7 @@ public class MessageHelper {
try {
String s = part.getContent().toString();
if (part.isMimeType("text/plain"))
s = "<pre>" + s.replaceAll("\\r?\\n" , "<br />") + "</pre>";
s = "<pre>" + s.replaceAll("\\r?\\n", "<br />") + "</pre>";
return s;
} catch (IOException ex) {
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));


+ 2
- 2
app/src/main/java/eu/faircode/email/MimeMessageEx.java View File

@ -30,7 +30,7 @@ public class MimeMessageEx extends MimeMessage {
.append("anonymous@localhost")
.append('>');
setHeader("Message-ID" , sb.toString());
setHeader("Message-ID", sb.toString());
Log.i(Helper.TAG, "Override Message-ID=" + sb.toString());
} catch (Throwable ex) {
Log.e(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
@ -50,7 +50,7 @@ public class MimeMessageEx extends MimeMessage {
String part = parts.get(0);
parts.remove(0);
if (!TextUtils.join("." , parts).startsWith(BuildConfig.APPLICATION_ID))
if (!TextUtils.join(".", parts).startsWith(BuildConfig.APPLICATION_ID))
return -1;
long id = Long.parseLong(part.substring(1));


+ 3
- 3
app/src/main/java/eu/faircode/email/Provider.java View File

@ -62,11 +62,11 @@ public class Provider {
provider.name = xml.getAttributeValue(null, "name");
} else if ("imap".equals(xml.getName())) {
provider.imap_host = xml.getAttributeValue(null, "host");
provider.imap_port = xml.getAttributeIntValue(null, "port" , 0);
provider.imap_port = xml.getAttributeIntValue(null, "port", 0);
} else if ("smtp".equals(xml.getName())) {
provider.smtp_host = xml.getAttributeValue(null, "host");
provider.smtp_port = xml.getAttributeIntValue(null, "port" , 0);
provider.starttls = xml.getAttributeBooleanValue(null, "starttls" , false);
provider.smtp_port = xml.getAttributeIntValue(null, "port", 0);
provider.starttls = xml.getAttributeBooleanValue(null, "starttls", false);
} else
throw new IllegalAccessException(xml.getName());
} else if (eventType == XmlPullParser.END_TAG) {


+ 6
- 5
app/src/main/java/eu/faircode/email/ServiceSynchronize.java View File

@ -23,8 +23,6 @@ import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.arch.lifecycle.LifecycleService;
import android.arch.lifecycle.Observer;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@ -37,9 +35,6 @@ import android.net.NetworkRequest;
import android.net.Uri;
import android.os.Build;
import android.os.SystemClock;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.LocalBroadcastManager;
import android.text.TextUtils;
import android.util.Log;
@ -93,6 +88,12 @@ import javax.mail.internet.MimeMessage;
import javax.mail.search.ComparisonTerm;
import javax.mail.search.ReceivedDateTerm;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleService;
import androidx.lifecycle.Observer;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
public class ServiceSynchronize extends LifecycleService {
private ServiceState state = new ServiceState();
private ExecutorService executor = Executors.newSingleThreadExecutor();


+ 1
- 1
app/src/main/java/eu/faircode/email/TupleAttachment.java View File

@ -1,6 +1,6 @@
package eu.faircode.email;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
public class TupleAttachment {
@NonNull


+ 2
- 2
app/src/main/res/layout/activity_compose.xml View File

@ -1,4 +1,4 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
@ -9,4 +9,4 @@
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>

+ 2
- 2
app/src/main/res/layout/activity_setup.xml View File

@ -1,4 +1,4 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
@ -9,4 +9,4 @@
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>

+ 2
- 2
app/src/main/res/layout/activity_view.xml View File

@ -1,4 +1,4 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
@ -19,4 +19,4 @@
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>

+ 2
- 2
app/src/main/res/layout/fragment_about.xml View File

@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="12dp">
@ -59,5 +59,5 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvEula" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

+ 6
- 6
app/src/main/res/layout/fragment_account.xml View File

@ -7,7 +7,7 @@
android:orientation="vertical"
tools:context=".ActivityView">
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="12dp">
@ -142,7 +142,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etUser" />
<android.support.design.widget.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -152,11 +152,11 @@
app:layout_constraintTop_toBottomOf="@id/tvPassword"
app:passwordToggleEnabled="true">
<android.support.design.widget.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id="@+id/cbSynchronize"
@ -204,10 +204,10 @@
app:layout_constraintBottom_toBottomOf="@id/btnSave"
app:layout_constraintEnd_toEndOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="spProvider,etName,etHost,etPort,etUser,tilPassword,cbPrimary,cbSynchronize,btnSave" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

+ 5
- 5
app/src/main/res/layout/fragment_accounts.xml View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ActivityView">
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvAccount"
android:layout_width="0dp"
android:layout_height="0dp"
@ -28,13 +28,13 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="rvAccount" />
<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -45,4 +45,4 @@
app:backgroundTint="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 5
- 5
app/src/main/res/layout/fragment_compose.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -146,7 +146,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</ScrollView>
<android.support.design.widget.BottomNavigationView
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -170,15 +170,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpCc"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="etCc,ivCcAdd,etBcc,ivBccAdd" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="etTo,ivToAdd,etSubject,vSeparator,scroll,bottom_navigation" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/fragment_eula.xml View File

@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="12dp">
@ -37,5 +37,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btnCancel"
app:layout_constraintTop_toBottomOf="@id/tvEula" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

+ 3
- 3
app/src/main/res/layout/fragment_folder.xml View File

@ -8,7 +8,7 @@
android:orientation="vertical"
tools:context=".ActivityView">
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="12dp">
@ -75,10 +75,10 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="cbSynchronize,tvAfter,etAfter,btnSave" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

+ 5
- 5
app/src/main/res/layout/fragment_folders.xml View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ActivityView">
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvFolder"
android:layout_width="0dp"
android:layout_height="0dp"
@ -28,13 +28,13 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="rvFolder" />
<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -45,4 +45,4 @@
app:backgroundTint="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 5
- 5
app/src/main/res/layout/fragment_identities.xml View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ActivityView">
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvIdentity"
android:layout_width="0dp"
android:layout_height="0dp"
@ -28,13 +28,13 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="rvIdentity" />
<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -45,4 +45,4 @@
app:backgroundTint="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 6
- 6
app/src/main/res/layout/fragment_identity.xml View File

@ -7,7 +7,7 @@
android:orientation="vertical"
tools:context=".ActivityView">
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="12dp">
@ -194,7 +194,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etUser" />
<android.support.design.widget.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -204,11 +204,11 @@
app:layout_constraintTop_toBottomOf="@id/tvPassword"
app:passwordToggleEnabled="true">
<android.support.design.widget.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id="@+id/cbSynchronize"
@ -256,10 +256,10 @@
app:layout_constraintBottom_toBottomOf="@id/btnSave"
app:layout_constraintEnd_toEndOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="etName,etEmail,spProvider,etHost,cbStartTls,etPort,etUser,tilPassword,cbPrimary,cbSynchronize,btnSave" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

+ 8
- 8
app/src/main/res/layout/fragment_message.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@ -146,7 +146,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvBcc" />
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvAttachment"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -161,7 +161,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/vSeparatorAttachments" />
<android.support.design.widget.BottomNavigationView
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/top_navigation"
android:layout_width="match_parent"
android:layout_height="30dp"
@ -197,7 +197,7 @@
android:textIsSelectable="true" />
</ScrollView>
<android.support.design.widget.BottomNavigationView
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -222,21 +222,21 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpAddress"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="vSeparatorAddress,tvToTitle,tvTo,tvCcTitle,tvCc,tvBccTitle,tvBcc" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpAttachments"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="vSeparatorAttachments,rvAttachment" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="tvFrom,tvTime,tvSubject,tvCount,top_navigation,scroll" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 5
- 5
app/src/main/res/layout/fragment_messages.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@ -17,7 +17,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvFolder"
android:layout_width="0dp"
android:layout_height="0dp"
@ -39,13 +39,13 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Group
<androidx.constraintlayout.widget.Group
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="rvFolder" />
<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -56,4 +56,4 @@
app:backgroundTint="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/fragment_setup.xml View File

@ -7,7 +7,7 @@
android:orientation="vertical"
tools:context=".ActivityView">
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -156,5 +156,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDarkTheme" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

+ 2
- 2
app/src/main/res/layout/fragment_webview.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -22,4 +22,4 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/progressbar" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/item_account.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -69,4 +69,4 @@
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvHost" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/item_attachment.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -59,4 +59,4 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivAttachments" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/item_drawer.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -28,4 +28,4 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/ivItem"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/item_folder.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -78,4 +78,4 @@
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivSync" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/item_identity.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -69,4 +69,4 @@
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvHost" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 2
- 2
app/src/main/res/layout/item_message.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -85,4 +85,4 @@
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSubject" />
</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 1
- 0
app/src/main/res/layout/spinner_dropdown_item.xml View File

@ -6,5 +6,6 @@
android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:ellipsize="marquee"
android:singleLine="true"
android:text="Title"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:textColorPrimary" />

+ 1
- 0
app/src/main/res/layout/spinner_item.xml View File

@ -6,6 +6,7 @@
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:text="Title"
android:textAlignment="inherit"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:textColorPrimary" />

Loading…
Cancel
Save