diff --git a/app/build.gradle b/app/build.gradle index 441e190da..c42412fba 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,7 +20,7 @@ android { targetSdkVersion 28 versionCode 52 versionName "4.1" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true } buildTypes { @@ -58,46 +58,44 @@ android { } } -ext.supportLibraryVersion = '28.0.0' ext.daggerVersion = '2.19' - // if libraries are changed here, they should also be changed in LicenseActivity dependencies { - implementation('com.mikepenz:materialdrawer:6.0.9@aar') { + implementation('com.mikepenz:materialdrawer:6.1.1@aar') { transitive = true } - implementation "com.android.support:appcompat-v7:$supportLibraryVersion" - implementation "com.android.support:customtabs:$supportLibraryVersion" - implementation "com.android.support:recyclerview-v7:$supportLibraryVersion" - implementation "com.android.support:support-v13:$supportLibraryVersion" - implementation "com.android.support:design:$supportLibraryVersion" - implementation "com.android.support:exifinterface:$supportLibraryVersion" - implementation "com.android.support:cardview-v7:$supportLibraryVersion" - implementation "com.android.support:preference-v7:$supportLibraryVersion" - implementation 'com.squareup.retrofit2:retrofit:2.4.0' - implementation 'com.squareup.retrofit2:converter-gson:2.4.0' + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.browser:browser:1.0.0' + implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation 'androidx.legacy:legacy-support-v13:1.0.0' + implementation 'com.google.android.material:material:1.1.0-alpha01' + implementation 'androidx.exifinterface:exifinterface:1.0.0' + implementation 'androidx.cardview:cardview:1.0.0' + implementation 'androidx.preference:preference:1.1.0-alpha01' + implementation 'com.squareup.retrofit2:retrofit:2.5.0' + implementation 'com.squareup.retrofit2:converter-gson:2.5.0' implementation 'com.squareup.picasso:picasso:2.5.2' - implementation 'com.squareup.okhttp3:okhttp:3.11.0' - implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0' + implementation 'com.squareup.okhttp3:okhttp:3.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0' implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0' - implementation 'com.github.connyduck:sparkbutton:1.0.1' - implementation 'com.github.chrisbanes:PhotoView:2.1.4' - implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar' - implementation('com.theartofdev.edmodo:android-image-cropper:2.7.0') { + implementation 'com.github.connyduck:sparkbutton:2.0.0' + implementation 'com.github.chrisbanes:PhotoView:2.3.0' + implementation 'com.mikepenz:google-material-typeface:3.0.1.3.original@aar' + implementation('com.theartofdev.edmodo:android-image-cropper:2.8.0') { exclude group: 'com.android.support' } implementation 'com.evernote:android-job:1.2.6' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' // EmojiCompat - implementation "com.android.support:support-emoji:$supportLibraryVersion" - implementation "com.android.support:support-emoji-appcompat:$supportLibraryVersion" + implementation 'androidx.emoji:emoji:1.0.0' + implementation 'androidx.emoji:emoji-appcompat:1.0.0' implementation 'de.c1710:filemojicompat:1.0.14' // architecture components - implementation 'android.arch.lifecycle:extensions:1.1.1' + implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' //room - implementation 'android.arch.persistence.room:runtime:1.1.1' - kapt 'android.arch.persistence.room:compiler:1.1.1' + implementation 'androidx.room:room-runtime:2.0.0' + kapt 'androidx.room:room-compiler:2.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" testImplementation 'junit:junit:4.12' implementation "com.google.dagger:dagger:$daggerVersion" @@ -107,14 +105,14 @@ dependencies { kapt "com.google.dagger:dagger-android-processor:$daggerVersion" testImplementation 'org.robolectric:robolectric:4.0.2' testImplementation 'org.mockito:mockito-inline:2.23.0' - androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) debugImplementation 'im.dino:dbinspector:3.4.1@aar' - implementation 'io.reactivex.rxjava2:rxjava:2.2.3' + implementation 'io.reactivex.rxjava2:rxjava:2.2.4' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0' - implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' - implementation 'com.uber.autodispose:autodispose-android-archcomponents:1.0.0-RC3' - implementation 'com.uber.autodispose:autodispose-ktx:1.0.0-RC3' + implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0' + implementation 'com.uber.autodispose:autodispose-android-archcomponents:1.0.0' + implementation 'com.uber.autodispose:autodispose-ktx:1.0.0' } diff --git a/app/src/androidTest/java/com/keylesspalace/tusky/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/keylesspalace/tusky/ExampleInstrumentedTest.java index 2af4bb533..3e54733f5 100644 --- a/app/src/androidTest/java/com/keylesspalace/tusky/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/com/keylesspalace/tusky/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package com.keylesspalace.tusky; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bfd7e73d0..27d129afb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -131,7 +131,7 @@ diff --git a/app/src/main/java/com/keylesspalace/tusky/AboutActivity.kt b/app/src/main/java/com/keylesspalace/tusky/AboutActivity.kt index 8acc0cc2f..e66375dd9 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AboutActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/AboutActivity.kt @@ -2,7 +2,7 @@ package com.keylesspalace.tusky import android.content.Intent import android.os.Bundle -import android.support.annotation.StringRes +import androidx.annotation.StringRes import android.text.SpannableString import android.text.SpannableStringBuilder import android.text.method.LinkMovementMethod diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt index 2668c09a6..eaac74d6f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt @@ -16,28 +16,31 @@ package com.keylesspalace.tusky import android.animation.ArgbEvaluator -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProviders +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProviders import android.content.Context import android.content.Intent import android.graphics.Color import android.graphics.PorterDuff import android.os.Bundle import android.preference.PreferenceManager -import android.support.annotation.AttrRes -import android.support.annotation.ColorInt -import android.support.annotation.Px -import android.support.design.widget.* -import android.support.text.emoji.EmojiCompat -import android.support.v4.app.ActivityOptionsCompat -import android.support.v4.app.Fragment -import android.support.v4.content.ContextCompat -import android.support.v7.app.AlertDialog -import android.support.v7.widget.LinearLayoutManager +import androidx.annotation.AttrRes +import androidx.annotation.ColorInt +import androidx.annotation.Px +import androidx.emoji.text.EmojiCompat +import androidx.core.app.ActivityOptionsCompat +import androidx.fragment.app.Fragment +import androidx.core.content.ContextCompat +import androidx.appcompat.app.AlertDialog +import androidx.recyclerview.widget.LinearLayoutManager import android.view.Menu import android.view.MenuItem import android.view.View import android.view.ViewGroup +import com.google.android.material.appbar.AppBarLayout +import com.google.android.material.appbar.CollapsingToolbarLayout +import com.google.android.material.floatingactionbutton.FloatingActionButton +import com.google.android.material.snackbar.Snackbar import com.keylesspalace.tusky.adapter.AccountFieldAdapter import com.keylesspalace.tusky.di.ViewModelFactory import com.keylesspalace.tusky.entity.Account @@ -59,7 +62,7 @@ import javax.inject.Inject class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportFragmentInjector, LinkListener { @Inject - lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector + lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector @Inject lateinit var viewModelFactory: ViewModelFactory diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java b/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java index b6370df0d..eb63a16be 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/AccountListActivity.java @@ -18,12 +18,12 @@ package com.keylesspalace.tusky; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import com.keylesspalace.tusky.fragment.AccountListFragment; diff --git a/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java b/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java index c8e65e66f..0df1c86cd 100644 --- a/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java @@ -15,22 +15,22 @@ package com.keylesspalace.tusky; +import android.app.ActivityManager; import android.content.Intent; import android.content.SharedPreferences; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.util.TypedValue; import android.view.Menu; import android.view.View; +import com.google.android.material.snackbar.Snackbar; import com.keylesspalace.tusky.db.AccountEntity; import com.keylesspalace.tusky.db.AccountManager; import com.keylesspalace.tusky.di.Injectable; @@ -41,6 +41,9 @@ import java.util.List; import javax.inject.Inject; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.appcompat.app.AppCompatActivity; import retrofit2.Call; public abstract class BaseActivity extends AppCompatActivity implements Injectable { @@ -68,6 +71,13 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab } ThemeUtils.setAppNightMode(theme, this); + /* set the taskdescription programmatically, the theme would turn it blue */ + String appName = getString(R.string.app_name); + Bitmap appIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher); + int recentsBackgroundColor = ThemeUtils.getColor(this, R.attr.recents_background_color); + + setTaskDescription(new ActivityManager.TaskDescription(appName, appIcon, recentsBackgroundColor)); + long accountId = getIntent().getLongExtra("account", -1); if (accountId != -1) { accountManager.setActiveAccount(accountId); @@ -76,11 +86,17 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab int style = textStyle(preferences.getString("statusTextSize", "medium")); getTheme().applyStyle(style, false); - redirectIfNotLoggedIn(); + if(requiresLogin()) { + redirectIfNotLoggedIn(); + } callList = new ArrayList<>(); } + protected boolean requiresLogin() { + return true; + } + private int textStyle(String name) { int style; switch (name) { diff --git a/app/src/main/java/com/keylesspalace/tusky/BottomSheetActivity.kt b/app/src/main/java/com/keylesspalace/tusky/BottomSheetActivity.kt index 8818f629e..0bb02371a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/BottomSheetActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/BottomSheetActivity.kt @@ -17,8 +17,8 @@ package com.keylesspalace.tusky import android.content.Intent import android.os.Bundle -import android.support.annotation.VisibleForTesting -import android.support.design.widget.BottomSheetBehavior +import androidx.annotation.VisibleForTesting +import com.google.android.material.bottomsheet.BottomSheetBehavior import android.view.View import android.widget.LinearLayout import com.keylesspalace.tusky.entity.SearchResults diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index 30e607a72..58a44ce7e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -18,7 +18,7 @@ package com.keylesspalace.tusky; import android.Manifest; import android.annotation.SuppressLint; import android.app.ProgressDialog; -import android.arch.lifecycle.Lifecycle; +import androidx.lifecycle.Lifecycle; import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; @@ -39,25 +39,25 @@ import android.os.Parcel; import android.os.Parcelable; import android.preference.PreferenceManager; import android.provider.MediaStore; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.Px; -import android.support.annotation.StringRes; -import android.support.design.widget.BottomSheetBehavior; -import android.support.design.widget.Snackbar; -import android.support.transition.TransitionManager; -import android.support.v13.view.inputmethod.InputConnectionCompat; -import android.support.v13.view.inputmethod.InputContentInfoCompat; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v4.content.FileProvider; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AlertDialog; -import android.support.v7.content.res.AppCompatResources; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.Px; +import androidx.annotation.StringRes; +import com.google.android.material.bottomsheet.BottomSheetBehavior; +import com.google.android.material.snackbar.Snackbar; +import androidx.transition.TransitionManager; +import androidx.core.view.inputmethod.InputConnectionCompat; +import androidx.core.view.inputmethod.InputContentInfoCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.core.content.FileProvider; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.InputFilter; import android.text.InputType; @@ -692,7 +692,7 @@ public final class ComposeActivity color = ContextCompat.getColor(this, R.color.compose_media_visible_button_disabled_blue); } else { hideMediaToggle.setClickable(true); - color = ContextCompat.getColor(this, R.color.primary); + color = ContextCompat.getColor(this, R.color.tusky_blue); } } else { hideMediaToggle.setClickable(true); @@ -1452,7 +1452,7 @@ public final class ComposeActivity if (show) { statusMarkSensitive = true; contentWarningBar.setVisibility(View.VISIBLE); - contentWarningButton.setTextColor(ContextCompat.getColor(this, R.color.primary)); + contentWarningButton.setTextColor(ContextCompat.getColor(this, R.color.tusky_blue)); contentWarningEditor.setSelection(contentWarningEditor.getText().length()); contentWarningEditor.requestFocus(); } else { diff --git a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt index ebdc416aa..3c6e3b19e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt @@ -17,19 +17,19 @@ package com.keylesspalace.tusky import android.Manifest import android.app.Activity -import android.arch.lifecycle.LiveData -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProviders +import androidx.lifecycle.LiveData +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProviders import android.content.Intent import android.content.pm.PackageManager import android.graphics.Bitmap import android.graphics.Color import android.net.Uri import android.os.Bundle -import android.support.design.widget.Snackbar -import android.support.v4.app.ActivityCompat -import android.support.v4.content.ContextCompat -import android.support.v7.widget.LinearLayoutManager +import com.google.android.material.snackbar.Snackbar +import androidx.core.app.ActivityCompat +import androidx.core.content.ContextCompat +import androidx.recyclerview.widget.LinearLayoutManager import android.view.Menu import android.view.MenuItem import android.view.View diff --git a/app/src/main/java/com/keylesspalace/tusky/EmojiPreference.java b/app/src/main/java/com/keylesspalace/tusky/EmojiPreference.java index e296604e0..ab03f1c20 100644 --- a/app/src/main/java/com/keylesspalace/tusky/EmojiPreference.java +++ b/app/src/main/java/com/keylesspalace/tusky/EmojiPreference.java @@ -1,14 +1,14 @@ package com.keylesspalace.tusky; import android.app.AlarmManager; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Build; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceManager; +import androidx.preference.Preference; +import androidx.preference.PreferenceManager; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; diff --git a/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java b/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java index add0a6601..d3b4b0f88 100644 --- a/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java @@ -16,11 +16,11 @@ package com.keylesspalace.tusky; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import com.keylesspalace.tusky.fragment.TimelineFragment; diff --git a/app/src/main/java/com/keylesspalace/tusky/LicenseActivity.kt b/app/src/main/java/com/keylesspalace/tusky/LicenseActivity.kt index a927e7386..915baf963 100644 --- a/app/src/main/java/com/keylesspalace/tusky/LicenseActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/LicenseActivity.kt @@ -16,7 +16,7 @@ package com.keylesspalace.tusky import android.os.Bundle -import android.support.annotation.RawRes +import androidx.annotation.RawRes import android.util.Log import android.view.MenuItem import android.widget.TextView diff --git a/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt b/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt index 086ce7419..7fbfe9c5c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt @@ -3,10 +3,10 @@ package com.keylesspalace.tusky import android.content.Context import android.content.Intent import android.os.Bundle -import android.support.v7.widget.DividerItemDecoration -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView -import android.support.v7.widget.Toolbar +import androidx.recyclerview.widget.DividerItemDecoration +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView +import androidx.appcompat.widget.Toolbar import android.view.LayoutInflater import android.view.MenuItem import android.view.View diff --git a/app/src/main/java/com/keylesspalace/tusky/LoginActivity.kt b/app/src/main/java/com/keylesspalace/tusky/LoginActivity.kt index 0d0fdbd19..5d59624c2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/LoginActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/LoginActivity.kt @@ -22,16 +22,13 @@ import android.content.Intent import android.content.SharedPreferences import android.net.Uri import android.os.Bundle -import android.preference.PreferenceManager -import android.support.customtabs.CustomTabsIntent -import android.support.v7.app.AppCompatActivity +import androidx.browser.customtabs.CustomTabsIntent import android.text.method.LinkMovementMethod import android.util.Log import android.view.MenuItem import android.view.View import android.widget.EditText import android.widget.TextView -import com.keylesspalace.tusky.db.AccountManager import com.keylesspalace.tusky.di.Injectable import com.keylesspalace.tusky.entity.AccessToken import com.keylesspalace.tusky.entity.AppCredentials @@ -46,12 +43,10 @@ import retrofit2.Response import javax.inject.Inject -class LoginActivity : AppCompatActivity(), Injectable { +class LoginActivity : BaseActivity(), Injectable { @Inject lateinit var mastodonApi: MastodonApi - @Inject - lateinit var accountManager: AccountManager private lateinit var preferences: SharedPreferences private var domain: String = "" @@ -68,13 +63,6 @@ class LoginActivity : AppCompatActivity(), Injectable { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - preferences = PreferenceManager.getDefaultSharedPreferences(this) - val theme = preferences.getString("appTheme", ThemeUtils.APP_THEME_DEFAULT) - if (theme == "black") { - setTheme(R.style.TuskyBlackTheme) - } - ThemeUtils.setAppNightMode(theme, this) - setContentView(R.layout.activity_login) if (savedInstanceState != null) { @@ -107,6 +95,10 @@ class LoginActivity : AppCompatActivity(), Injectable { } + override fun requiresLogin(): Boolean { + return false + } + override fun finish() { super.finish() if(isAdditionalLogin()) { @@ -144,7 +136,7 @@ class LoginActivity : AppCompatActivity(), Injectable { HttpUrl.Builder().host(domain).scheme("https").build() } catch (e: IllegalArgumentException) { setLoading(false) - domainEditText.error = getString(R.string.error_invalid_domain) + domainTextInputLayout.error = getString(R.string.error_invalid_domain) return } @@ -153,7 +145,7 @@ class LoginActivity : AppCompatActivity(), Injectable { response: Response) { if (!response.isSuccessful) { loginButton.isEnabled = true - domainEditText.error = getString(R.string.error_failed_app_registration) + domainTextInputLayout.error = getString(R.string.error_failed_app_registration) setLoading(false) Log.e(TAG, "App authentication failed. " + response.message()) return @@ -167,7 +159,7 @@ class LoginActivity : AppCompatActivity(), Injectable { override fun onFailure(call: Call, t: Throwable) { loginButton.isEnabled = true - domainEditText.error = getString(R.string.error_failed_app_registration) + domainTextInputLayout.error = getString(R.string.error_failed_app_registration) setLoading(false) Log.e(TAG, Log.getStackTraceString(t)) } @@ -243,7 +235,7 @@ class LoginActivity : AppCompatActivity(), Injectable { onLoginSuccess(response.body()!!.accessToken) } else { setLoading(false) - domainEditText.error = getString(R.string.error_retrieving_oauth_token) + domainTextInputLayout.error = getString(R.string.error_retrieving_oauth_token) Log.e(TAG, String.format("%s %s", getString(R.string.error_retrieving_oauth_token), response.message())) @@ -252,7 +244,7 @@ class LoginActivity : AppCompatActivity(), Injectable { override fun onFailure(call: Call, t: Throwable) { setLoading(false) - domainEditText.error = getString(R.string.error_retrieving_oauth_token) + domainTextInputLayout.error = getString(R.string.error_retrieving_oauth_token) Log.e(TAG, String.format("%s %s", getString(R.string.error_retrieving_oauth_token), t.message)) @@ -265,14 +257,14 @@ class LoginActivity : AppCompatActivity(), Injectable { /* Authorization failed. Put the error response where the user can read it and they * can try again. */ setLoading(false) - domainEditText.error = getString(R.string.error_authorization_denied) + domainTextInputLayout.error = getString(R.string.error_authorization_denied) Log.e(TAG, String.format("%s %s", getString(R.string.error_authorization_denied), error)) } else { // This case means a junk response was received somehow. setLoading(false) - domainEditText.error = getString(R.string.error_authorization_unknown) + domainTextInputLayout.error = getString(R.string.error_authorization_unknown) } } else { // first show or user cancelled login diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java index 3f36da0d7..43af35898 100644 --- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java @@ -15,22 +15,22 @@ package com.keylesspalace.tusky; -import android.arch.lifecycle.Lifecycle; +import androidx.lifecycle.Lifecycle; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; +import androidx.emoji.text.EmojiCompat; +import androidx.fragment.app.Fragment; +import androidx.core.content.ContextCompat; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.AlertDialog; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.TabLayout; -import android.support.text.emoji.EmojiCompat; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AlertDialog; import android.util.Log; import android.view.KeyEvent; import android.widget.ImageButton; diff --git a/app/src/main/java/com/keylesspalace/tusky/ModalTimelineActivity.kt b/app/src/main/java/com/keylesspalace/tusky/ModalTimelineActivity.kt index cb6f37ead..ebca7b642 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ModalTimelineActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/ModalTimelineActivity.kt @@ -3,8 +3,8 @@ package com.keylesspalace.tusky import android.content.Context import android.content.Intent import android.os.Bundle -import android.support.design.widget.FloatingActionButton -import android.support.v4.app.Fragment +import com.google.android.material.floatingactionbutton.FloatingActionButton +import androidx.fragment.app.Fragment import android.view.MenuItem import com.keylesspalace.tusky.fragment.TimelineFragment import com.keylesspalace.tusky.interfaces.ActionButtonActivity diff --git a/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt b/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt index 016047c2f..dac4869e5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt @@ -20,7 +20,7 @@ import android.content.Intent import android.content.SharedPreferences import android.os.Bundle import android.preference.PreferenceManager -import android.support.v4.app.Fragment +import androidx.fragment.app.Fragment import android.util.Log import android.view.MenuItem import com.keylesspalace.tusky.appstore.EventHub diff --git a/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java b/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java index 3a2e04eb1..6308816c6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java @@ -18,13 +18,13 @@ package com.keylesspalace.tusky; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import com.google.android.material.snackbar.Snackbar; +import androidx.appcompat.app.ActionBar; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java b/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java index c6d5f2a07..ca738a95f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/SavedTootActivity.java @@ -15,17 +15,17 @@ package com.keylesspalace.tusky; -import android.arch.lifecycle.Lifecycle; +import androidx.lifecycle.Lifecycle; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.widget.TextView; diff --git a/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java b/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java index 0281347bc..eac55bdab 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java @@ -20,12 +20,12 @@ import android.app.SearchableInfo; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.SearchView; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.SearchView; +import androidx.appcompat.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt b/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt index 3dd2243b0..8c2974b84 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt @@ -17,7 +17,7 @@ package com.keylesspalace.tusky import android.content.Intent import android.os.Bundle -import android.support.v7.app.AppCompatActivity +import androidx.appcompat.app.AppCompatActivity import com.keylesspalace.tusky.db.AccountManager import com.keylesspalace.tusky.di.Injectable diff --git a/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java b/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java index 299d742eb..67ae95210 100644 --- a/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java +++ b/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java @@ -18,10 +18,10 @@ package com.keylesspalace.tusky; import android.app.Activity; import android.app.Application; import android.app.Service; -import android.arch.persistence.room.Room; +import androidx.room.Room; import android.content.BroadcastReceiver; import android.preference.PreferenceManager; -import android.support.text.emoji.EmojiCompat; +import androidx.emoji.text.EmojiCompat; import com.evernote.android.job.JobManager; import com.jakewharton.picasso.OkHttp3Downloader; diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt b/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt index 5e7470786..7731a9a0e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt @@ -31,10 +31,10 @@ import android.net.Uri import android.os.Build import android.os.Bundle import android.os.Environment -import android.support.v4.app.ActivityCompat -import android.support.v4.content.ContextCompat -import android.support.v4.content.FileProvider -import android.support.v4.view.ViewPager +import androidx.core.app.ActivityCompat +import androidx.core.content.ContextCompat +import androidx.core.content.FileProvider +import androidx.viewpager.widget.ViewPager import android.util.Log import android.view.Menu import android.view.MenuItem diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java b/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java index f5144dc5e..9653e8ad5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ViewTagActivity.java @@ -16,11 +16,11 @@ package com.keylesspalace.tusky; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import com.keylesspalace.tusky.fragment.TimelineFragment; diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java b/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java index 2033134e4..171463b3d 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java @@ -18,11 +18,11 @@ package com.keylesspalace.tusky; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountAdapter.java index 14afe76f5..66c8c5142 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountAdapter.java @@ -15,9 +15,9 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import com.keylesspalace.tusky.entity.Account; import com.keylesspalace.tusky.interfaces.AccountActionListener; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldAdapter.kt b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldAdapter.kt index c83c778d7..3dcc6d2f8 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldAdapter.kt +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldAdapter.kt @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.adapter -import android.support.v7.widget.RecyclerView +import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup import android.view.View diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldEditAdapter.kt b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldEditAdapter.kt index f265a4e63..96ae4dc9b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldEditAdapter.kt +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountFieldEditAdapter.kt @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.adapter -import android.support.v7.widget.RecyclerView +import androidx.recyclerview.widget.RecyclerView import android.text.Editable import android.text.TextWatcher import android.view.LayoutInflater diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountViewHolder.java index 49bae8c92..996100668 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/AccountViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/AccountViewHolder.java @@ -1,7 +1,7 @@ package com.keylesspalace.tusky.adapter; import android.content.Context; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java index 23354dba8..8bfc6be18 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java @@ -15,8 +15,8 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/EmojiAdapter.kt b/app/src/main/java/com/keylesspalace/tusky/adapter/EmojiAdapter.kt index 6afd71b51..cc869048a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/EmojiAdapter.kt +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/EmojiAdapter.kt @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.adapter -import android.support.v7.widget.RecyclerView +import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup import android.widget.ImageView diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/FollowAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/FollowAdapter.java index 8b7aab71b..821587463 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/FollowAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/FollowAdapter.java @@ -15,8 +15,8 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestsAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestsAdapter.java index a3941c686..9b42dfc70 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestsAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestsAdapter.java @@ -15,8 +15,8 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/LoadingFooterViewHolder.kt b/app/src/main/java/com/keylesspalace/tusky/adapter/LoadingFooterViewHolder.kt index f848c1809..ebff5c5f1 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/LoadingFooterViewHolder.kt +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/LoadingFooterViewHolder.kt @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.adapter -import android.support.v7.widget.RecyclerView +import androidx.recyclerview.widget.RecyclerView import android.view.View class LoadingFooterViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) \ No newline at end of file diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java index e802c3ee4..1104975f5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/MentionAutoCompleteAdapter.java @@ -16,9 +16,9 @@ package com.keylesspalace.tusky.adapter; import android.content.Context; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java index 7c64e8741..eeee26a59 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java @@ -1,7 +1,7 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java index 4abce3f1f..41b55cff4 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java @@ -20,11 +20,11 @@ import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.Typeface; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v4.text.BidiFormatter; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.core.text.BidiFormatter; +import androidx.recyclerview.widget.RecyclerView; import android.text.InputFilter; import android.text.SpannableStringBuilder; import android.text.Spanned; @@ -427,7 +427,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter { icon = ContextCompat.getDrawable(context, R.drawable.ic_star_24dp); if (icon != null) { icon.setColorFilter(ContextCompat.getColor(context, - R.color.status_favourite_button_marked_dark), PorterDuff.Mode.SRC_ATOP); + R.color.tusky_orange), PorterDuff.Mode.SRC_ATOP); } format = context.getString(R.string.notification_favourite_format); @@ -437,7 +437,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter { icon = ContextCompat.getDrawable(context, R.drawable.ic_repeat_24dp); if (icon != null) { icon.setColorFilter(ContextCompat.getColor(context, - R.color.color_accent_dark), PorterDuff.Mode.SRC_ATOP); + R.color.tusky_blue), PorterDuff.Mode.SRC_ATOP); } format = context.getString(R.string.notification_reblog_format); diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/PlaceholderViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/PlaceholderViewHolder.java index ed4940df4..294ad0944 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/PlaceholderViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/PlaceholderViewHolder.java @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.adapter; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.Button; import android.widget.ProgressBar; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/ReportAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/ReportAdapter.java index 4602ee331..0b0ac3fd9 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/ReportAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/ReportAdapter.java @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.adapter; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.text.Spanned; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/SavedTootAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/SavedTootAdapter.java index ed556a02d..6d4889c84 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/SavedTootAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/SavedTootAdapter.java @@ -16,8 +16,8 @@ package com.keylesspalace.tusky.adapter; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/SearchResultsAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/SearchResultsAdapter.java index c64a55e9f..144f2b82b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/SearchResultsAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/SearchResultsAdapter.java @@ -15,9 +15,9 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 264fe35b2..58fdc8a11 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -2,11 +2,11 @@ package com.keylesspalace.tusky.adapter; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.content.res.AppCompatResources; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.recyclerview.widget.RecyclerView; import android.text.InputFilter; import android.text.Spanned; import android.text.TextUtils; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java index 3d817a8e0..d880042ea 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java @@ -4,7 +4,7 @@ import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.TextUtils; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java index 5e9d00f07..572f621bf 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java @@ -16,7 +16,7 @@ package com.keylesspalace.tusky.adapter; import android.content.Context; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.view.View; import android.widget.ImageView; import android.widget.TextView; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/ThreadAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/ThreadAdapter.java index 609c495f0..c66e03718 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/ThreadAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/ThreadAdapter.java @@ -15,9 +15,9 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/TimelineAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/TimelineAdapter.java index 29be60513..98f65e1e4 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/TimelineAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/TimelineAdapter.java @@ -15,8 +15,8 @@ package com.keylesspalace.tusky.adapter; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/keylesspalace/tusky/db/AccountDao.kt b/app/src/main/java/com/keylesspalace/tusky/db/AccountDao.kt index a51b2e2bf..e1c64e28d 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/AccountDao.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/AccountDao.kt @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.db -import android.arch.persistence.room.* +import androidx.room.* @Dao interface AccountDao { diff --git a/app/src/main/java/com/keylesspalace/tusky/db/AccountEntity.kt b/app/src/main/java/com/keylesspalace/tusky/db/AccountEntity.kt index c52b8033d..0b234576d 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/AccountEntity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/AccountEntity.kt @@ -15,10 +15,10 @@ package com.keylesspalace.tusky.db -import android.arch.persistence.room.Entity -import android.arch.persistence.room.Index -import android.arch.persistence.room.PrimaryKey -import android.arch.persistence.room.TypeConverters +import androidx.room.Entity +import androidx.room.Index +import androidx.room.PrimaryKey +import androidx.room.TypeConverters import com.keylesspalace.tusky.entity.Emoji import com.keylesspalace.tusky.entity.Status diff --git a/app/src/main/java/com/keylesspalace/tusky/db/AppDatabase.java b/app/src/main/java/com/keylesspalace/tusky/db/AppDatabase.java index f07e7ad30..dc99d5815 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/AppDatabase.java +++ b/app/src/main/java/com/keylesspalace/tusky/db/AppDatabase.java @@ -15,11 +15,11 @@ package com.keylesspalace.tusky.db; -import android.arch.persistence.db.SupportSQLiteDatabase; -import android.arch.persistence.room.Database; -import android.arch.persistence.room.RoomDatabase; -import android.arch.persistence.room.migration.Migration; -import android.support.annotation.NonNull; +import androidx.sqlite.db.SupportSQLiteDatabase; +import androidx.room.Database; +import androidx.room.RoomDatabase; +import androidx.room.migration.Migration; +import androidx.annotation.NonNull; /** * DB version & declare DAO diff --git a/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt b/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt index 7087940a6..a496eaf3b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.db -import android.arch.persistence.room.TypeConverter +import androidx.room.TypeConverter import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.keylesspalace.tusky.entity.Emoji diff --git a/app/src/main/java/com/keylesspalace/tusky/db/InstanceDao.kt b/app/src/main/java/com/keylesspalace/tusky/db/InstanceDao.kt index 8ed2d75d2..bc87d018f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/InstanceDao.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/InstanceDao.kt @@ -15,10 +15,10 @@ package com.keylesspalace.tusky.db -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 androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query @Dao interface InstanceDao { diff --git a/app/src/main/java/com/keylesspalace/tusky/db/InstanceEntity.kt b/app/src/main/java/com/keylesspalace/tusky/db/InstanceEntity.kt index 587b258c6..923cb0629 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/InstanceEntity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/InstanceEntity.kt @@ -15,9 +15,9 @@ package com.keylesspalace.tusky.db -import android.arch.persistence.room.Entity -import android.arch.persistence.room.PrimaryKey -import android.arch.persistence.room.TypeConverters +import androidx.room.Entity +import androidx.room.PrimaryKey +import androidx.room.TypeConverters import com.keylesspalace.tusky.entity.Emoji @Entity diff --git a/app/src/main/java/com/keylesspalace/tusky/db/TootDao.java b/app/src/main/java/com/keylesspalace/tusky/db/TootDao.java index d84721630..c121e1705 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/TootDao.java +++ b/app/src/main/java/com/keylesspalace/tusky/db/TootDao.java @@ -15,10 +15,10 @@ package com.keylesspalace.tusky.db; -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 androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; diff --git a/app/src/main/java/com/keylesspalace/tusky/db/TootEntity.java b/app/src/main/java/com/keylesspalace/tusky/db/TootEntity.java index 9c304a329..99e46be69 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/TootEntity.java +++ b/app/src/main/java/com/keylesspalace/tusky/db/TootEntity.java @@ -15,12 +15,12 @@ package com.keylesspalace.tusky.db; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.PrimaryKey; -import android.arch.persistence.room.TypeConverter; -import android.arch.persistence.room.TypeConverters; -import android.support.annotation.Nullable; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.PrimaryKey; +import androidx.room.TypeConverter; +import androidx.room.TypeConverters; +import androidx.annotation.Nullable; import com.keylesspalace.tusky.entity.Status; diff --git a/app/src/main/java/com/keylesspalace/tusky/di/AppInjector.kt b/app/src/main/java/com/keylesspalace/tusky/di/AppInjector.kt index 853f696bf..110131e45 100644 --- a/app/src/main/java/com/keylesspalace/tusky/di/AppInjector.kt +++ b/app/src/main/java/com/keylesspalace/tusky/di/AppInjector.kt @@ -18,9 +18,9 @@ package com.keylesspalace.tusky.di import android.app.Activity import android.app.Application import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentActivity -import android.support.v4.app.FragmentManager +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentActivity +import androidx.fragment.app.FragmentManager import com.keylesspalace.tusky.TuskyApplication import dagger.android.AndroidInjection import dagger.android.support.AndroidSupportInjection diff --git a/app/src/main/java/com/keylesspalace/tusky/di/AppModule.kt b/app/src/main/java/com/keylesspalace/tusky/di/AppModule.kt index 4690e0928..fcd12ee90 100644 --- a/app/src/main/java/com/keylesspalace/tusky/di/AppModule.kt +++ b/app/src/main/java/com/keylesspalace/tusky/di/AppModule.kt @@ -20,7 +20,7 @@ import android.app.Application import android.content.Context import android.content.SharedPreferences import android.preference.PreferenceManager -import android.support.v4.content.LocalBroadcastManager +import androidx.localbroadcastmanager.content.LocalBroadcastManager import com.keylesspalace.tusky.TuskyApplication import com.keylesspalace.tusky.appstore.EventHub import com.keylesspalace.tusky.appstore.EventHubImpl diff --git a/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt b/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt index 35a74e688..752a4f24a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt +++ b/app/src/main/java/com/keylesspalace/tusky/di/ViewModelFactory.kt @@ -2,8 +2,8 @@ package com.keylesspalace.tusky.di -import android.arch.lifecycle.ViewModel -import android.arch.lifecycle.ViewModelProvider +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelProvider import com.keylesspalace.tusky.viewmodel.AccountViewModel import com.keylesspalace.tusky.viewmodel.EditProfileViewModel import dagger.Binds diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/AccountListFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/AccountListFragment.java index 07ecdb36b..0668a73f2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/AccountListFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/AccountListFragment.java @@ -19,12 +19,12 @@ import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.snackbar.Snackbar; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/AccountMediaFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/AccountMediaFragment.kt index a9bf429f3..d1d8f92a2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/AccountMediaFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/AccountMediaFragment.kt @@ -15,19 +15,18 @@ package com.keylesspalace.tusky.fragment -import android.content.Intent import android.graphics.Color import android.os.Bundle -import android.support.v4.app.ActivityOptionsCompat -import android.support.v4.content.ContextCompat -import android.support.v4.view.ViewCompat -import android.support.v7.widget.GridLayoutManager -import android.support.v7.widget.RecyclerView +import androidx.core.app.ActivityOptionsCompat +import androidx.core.content.ContextCompat +import androidx.core.view.ViewCompat import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView +import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.RecyclerView import com.keylesspalace.tusky.R import com.keylesspalace.tusky.ViewMediaActivity import com.keylesspalace.tusky.di.Injectable @@ -166,7 +165,7 @@ class AccountMediaFragment : BaseFragment(), Injectable { currentCall?.enqueue(callback) } - swipe_refresh_layout.setColorSchemeResources(R.color.primary) + swipe_refresh_layout.setColorSchemeResources(R.color.tusky_blue) swipe_refresh_layout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(context, android.R.attr.colorBackground)) nothing_message.visibility = View.GONE @@ -231,8 +230,8 @@ class AccountMediaFragment : BaseFragment(), Injectable { NOT_FETCHING, INITIAL_FETCHING, FETCHING_BOTTOM, REFRESHING } - inner class MediaGridAdapter - : RecyclerView.Adapter() { + inner class MediaGridAdapter: + RecyclerView.Adapter() { var baseItemColor = Color.BLACK diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/BaseFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/BaseFragment.java index 3a9db6599..b674b8ba5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/BaseFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/BaseFragment.java @@ -16,8 +16,8 @@ package com.keylesspalace.tusky.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java index 95c070a20..60e540610 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java @@ -16,24 +16,24 @@ package com.keylesspalace.tusky.fragment; import android.app.Activity; -import android.arch.core.util.Function; -import android.arch.lifecycle.Lifecycle; +import androidx.arch.core.util.Function; +import androidx.lifecycle.Lifecycle; import android.content.Context; import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.TabLayout; -import android.support.v4.util.Pair; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.content.res.AppCompatResources; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SimpleItemAnimator; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; +import androidx.core.util.Pair; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.SimpleItemAnimator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -180,7 +180,7 @@ public class NotificationsFragment extends SFragment implements nothingMessageView = rootView.findViewById(R.id.nothing_message); swipeRefreshLayout.setOnRefreshListener(this); - swipeRefreshLayout.setColorSchemeResources(R.color.primary); + swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue); swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(context, android.R.attr.colorBackground)); // Setup the RecyclerView. recyclerView.setHasFixedSize(true); diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java index f91b5380e..1304db856 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java @@ -20,12 +20,12 @@ import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityOptionsCompat; -import android.support.v4.view.ViewCompat; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.PopupMenu; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.ActivityOptionsCompat; +import androidx.core.view.ViewCompat; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.PopupMenu; import android.text.Spanned; import android.view.Menu; import android.view.View; diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt index 044bf67c0..0a15503c3 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt @@ -18,8 +18,8 @@ package com.keylesspalace.tusky.fragment import android.content.Intent import android.os.Bundle import android.preference.PreferenceManager -import android.support.v7.widget.DividerItemDecoration -import android.support.v7.widget.LinearLayoutManager +import androidx.recyclerview.widget.DividerItemDecoration +import androidx.recyclerview.widget.LinearLayoutManager import android.util.Log import android.view.LayoutInflater import android.view.View diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java index 881101a96..8716fb604 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java @@ -15,28 +15,28 @@ package com.keylesspalace.tusky.fragment; -import android.arch.core.util.Function; -import android.arch.lifecycle.Lifecycle; +import androidx.arch.core.util.Function; +import androidx.lifecycle.Lifecycle; import android.content.Context; import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.TabLayout; -import android.support.v4.util.Pair; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.content.res.AppCompatResources; -import android.support.v7.recyclerview.extensions.AsyncDifferConfig; -import android.support.v7.recyclerview.extensions.AsyncListDiffer; -import android.support.v7.util.DiffUtil; -import android.support.v7.util.ListUpdateCallback; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SimpleItemAnimator; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; +import androidx.core.util.Pair; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.recyclerview.widget.AsyncDifferConfig; +import androidx.recyclerview.widget.AsyncListDiffer; +import androidx.recyclerview.widget.DiffUtil; +import androidx.recyclerview.widget.ListUpdateCallback; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.SimpleItemAnimator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -275,7 +275,7 @@ public class TimelineFragment extends SFragment implements private void setupSwipeRefreshLayout() { Context context = swipeRefreshLayout.getContext(); swipeRefreshLayout.setOnRefreshListener(this); - swipeRefreshLayout.setColorSchemeResources(R.color.primary); + swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue); swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(context, android.R.attr.colorBackground)); } diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt index 52a85eb2a..8e4250fe6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt @@ -19,7 +19,6 @@ import android.animation.Animator import android.animation.AnimatorListenerAdapter import android.content.Context import android.os.Bundle -import android.support.v4.view.ViewCompat import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -56,7 +55,7 @@ class ViewImageFragment : ViewMediaFragment() { override fun setupMediaView(url: String) { descriptionView = mediaDescription - ViewCompat.setTransitionName(photoView, url) + photoView.transitionName = url attacher = PhotoViewAttacher(photoView) // Clicking outside the photo closes the viewer. diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java index 23f971193..777001cfc 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java @@ -15,22 +15,22 @@ package com.keylesspalace.tusky.fragment; -import android.arch.core.util.Function; -import android.arch.lifecycle.Lifecycle; +import androidx.arch.core.util.Function; +import androidx.lifecycle.Lifecycle; import android.content.Context; import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.util.Pair; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SimpleItemAnimator; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.snackbar.Snackbar; +import androidx.core.util.Pair; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.SimpleItemAnimator; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -72,8 +72,8 @@ import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; -import static com.uber.autodispose.AutoDispose.*; -import static com.uber.autodispose.android.lifecycle.AndroidLifecycleScopeProvider.*; +import static com.uber.autodispose.AutoDispose.autoDisposable; +import static com.uber.autodispose.android.lifecycle.AndroidLifecycleScopeProvider.from; public final class ViewThreadFragment extends SFragment implements SwipeRefreshLayout.OnRefreshListener, StatusActionListener, Injectable { @@ -136,7 +136,7 @@ public final class ViewThreadFragment extends SFragment implements Context context = getContext(); swipeRefreshLayout = rootView.findViewById(R.id.swipe_refresh_layout); swipeRefreshLayout.setOnRefreshListener(this); - swipeRefreshLayout.setColorSchemeResources(R.color.primary); + swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue); swipeRefreshLayout.setProgressBackgroundColorSchemeColor( ThemeUtils.getColor(context, android.R.attr.colorBackground)); diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/AccountPreferencesFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/AccountPreferencesFragment.kt index 860951042..c97873fd6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/AccountPreferencesFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/AccountPreferencesFragment.kt @@ -19,11 +19,11 @@ import android.content.Intent import android.graphics.drawable.Drawable import android.os.Build import android.os.Bundle -import android.support.design.widget.Snackbar -import android.support.v14.preference.SwitchPreference -import android.support.v7.preference.ListPreference -import android.support.v7.preference.Preference -import android.support.v7.preference.PreferenceFragmentCompat +import com.google.android.material.snackbar.Snackbar +import androidx.preference.SwitchPreference +import androidx.preference.ListPreference +import androidx.preference.Preference +import androidx.preference.PreferenceFragmentCompat import android.util.Log import android.view.View import com.keylesspalace.tusky.AccountListActivity diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/NotificationPreferencesFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/NotificationPreferencesFragment.kt index bed19fbe3..104b9f3d7 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/NotificationPreferencesFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/NotificationPreferencesFragment.kt @@ -16,9 +16,9 @@ package com.keylesspalace.tusky.fragment.preference import android.os.Bundle -import android.support.v14.preference.SwitchPreference -import android.support.v7.preference.Preference -import android.support.v7.preference.PreferenceFragmentCompat +import androidx.preference.SwitchPreference +import androidx.preference.Preference +import androidx.preference.PreferenceFragmentCompat import android.view.View import com.keylesspalace.tusky.R import com.keylesspalace.tusky.db.AccountManager diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/PreferencesFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/PreferencesFragment.kt index 7923a8c17..2e4db0da6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/PreferencesFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/PreferencesFragment.kt @@ -16,7 +16,7 @@ package com.keylesspalace.tusky.fragment.preference import android.os.Bundle -import android.support.v7.preference.PreferenceFragmentCompat +import androidx.preference.PreferenceFragmentCompat import com.keylesspalace.tusky.PreferencesActivity import com.keylesspalace.tusky.R import com.keylesspalace.tusky.util.ThemeUtils diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/ProxyPreferencesFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/ProxyPreferencesFragment.kt index c562537b4..4c7c8726b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/ProxyPreferencesFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/ProxyPreferencesFragment.kt @@ -17,8 +17,8 @@ package com.keylesspalace.tusky.fragment.preference import android.content.SharedPreferences import android.os.Bundle -import android.support.v7.preference.EditTextPreference -import android.support.v7.preference.PreferenceFragmentCompat +import androidx.preference.EditTextPreference +import androidx.preference.PreferenceFragmentCompat import com.keylesspalace.tusky.R class ProxyPreferencesFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/TabFilterPreferencesFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/TabFilterPreferencesFragment.kt index dc86a94e3..094f8352b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/preference/TabFilterPreferencesFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/preference/TabFilterPreferencesFragment.kt @@ -17,8 +17,8 @@ package com.keylesspalace.tusky.fragment.preference import android.content.SharedPreferences import android.os.Bundle -import android.support.v7.app.AlertDialog -import android.support.v7.preference.PreferenceFragmentCompat +import androidx.appcompat.app.AlertDialog +import androidx.preference.PreferenceFragmentCompat import android.text.Editable import android.text.TextWatcher import android.widget.EditText diff --git a/app/src/main/java/com/keylesspalace/tusky/interfaces/ActionButtonActivity.java b/app/src/main/java/com/keylesspalace/tusky/interfaces/ActionButtonActivity.java index faf2352d4..089331a1c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/interfaces/ActionButtonActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/interfaces/ActionButtonActivity.java @@ -15,8 +15,8 @@ package com.keylesspalace.tusky.interfaces; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; public interface ActionButtonActivity { diff --git a/app/src/main/java/com/keylesspalace/tusky/network/InstanceSwitchAuthInterceptor.java b/app/src/main/java/com/keylesspalace/tusky/network/InstanceSwitchAuthInterceptor.java index afcda3de4..2dcedd873 100644 --- a/app/src/main/java/com/keylesspalace/tusky/network/InstanceSwitchAuthInterceptor.java +++ b/app/src/main/java/com/keylesspalace/tusky/network/InstanceSwitchAuthInterceptor.java @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.network; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.keylesspalace.tusky.db.AccountEntity; import com.keylesspalace.tusky.db.AccountManager; diff --git a/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.java b/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.java index a177a2e2b..01945b765 100644 --- a/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.java +++ b/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.java @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.network; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.keylesspalace.tusky.entity.AccessToken; import com.keylesspalace.tusky.entity.Account; diff --git a/app/src/main/java/com/keylesspalace/tusky/network/ProgressRequestBody.java b/app/src/main/java/com/keylesspalace/tusky/network/ProgressRequestBody.java index 69b314281..d559d3541 100644 --- a/app/src/main/java/com/keylesspalace/tusky/network/ProgressRequestBody.java +++ b/app/src/main/java/com/keylesspalace/tusky/network/ProgressRequestBody.java @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.network; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.io.IOException; import java.io.InputStream; diff --git a/app/src/main/java/com/keylesspalace/tusky/pager/AccountPagerAdapter.java b/app/src/main/java/com/keylesspalace/tusky/pager/AccountPagerAdapter.java index 4545f289b..fafdc05d2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/pager/AccountPagerAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/pager/AccountPagerAdapter.java @@ -15,9 +15,9 @@ package com.keylesspalace.tusky.pager; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; import com.keylesspalace.tusky.fragment.AccountMediaFragment; import com.keylesspalace.tusky.fragment.TimelineFragment; diff --git a/app/src/main/java/com/keylesspalace/tusky/pager/AvatarImagePagerAdapter.kt b/app/src/main/java/com/keylesspalace/tusky/pager/AvatarImagePagerAdapter.kt index a30f8fff0..a5950f8d5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/pager/AvatarImagePagerAdapter.kt +++ b/app/src/main/java/com/keylesspalace/tusky/pager/AvatarImagePagerAdapter.kt @@ -1,18 +1,19 @@ package com.keylesspalace.tusky.pager -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.app.FragmentPagerAdapter +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentPagerAdapter import com.keylesspalace.tusky.fragment.ViewMediaFragment +import java.lang.IllegalStateException class AvatarImagePagerAdapter(fragmentManager: FragmentManager, private val avatarUrl: String) : FragmentPagerAdapter(fragmentManager) { - override fun getItem(position: Int): Fragment? { + override fun getItem(position: Int): Fragment { return if (position == 0) { ViewMediaFragment.newAvatarInstance(avatarUrl) } else { - null + throw IllegalStateException() } } diff --git a/app/src/main/java/com/keylesspalace/tusky/pager/ImagePagerAdapter.kt b/app/src/main/java/com/keylesspalace/tusky/pager/ImagePagerAdapter.kt index 8ebc7a8a5..794c0dadd 100644 --- a/app/src/main/java/com/keylesspalace/tusky/pager/ImagePagerAdapter.kt +++ b/app/src/main/java/com/keylesspalace/tusky/pager/ImagePagerAdapter.kt @@ -1,25 +1,26 @@ package com.keylesspalace.tusky.pager -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.app.FragmentStatePagerAdapter +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentStatePagerAdapter import com.keylesspalace.tusky.entity.Attachment import com.keylesspalace.tusky.fragment.ViewMediaFragment +import java.lang.IllegalStateException import java.util.Locale class ImagePagerAdapter( - fragmentManager: FragmentManager, - private val attachments: List, - private val initialPosition: Int + fragmentManager: FragmentManager, + private val attachments: List, + private val initialPosition: Int ) : FragmentStatePagerAdapter(fragmentManager) { - override fun getItem(position: Int): Fragment? { + override fun getItem(position: Int): Fragment { return if (position >= 0 && position < attachments.size) { ViewMediaFragment.newInstance(attachments[position], position == initialPosition) } else { - null + throw IllegalStateException() } } diff --git a/app/src/main/java/com/keylesspalace/tusky/pager/TimelinePagerAdapter.java b/app/src/main/java/com/keylesspalace/tusky/pager/TimelinePagerAdapter.java index 64bada515..3e26f67b8 100644 --- a/app/src/main/java/com/keylesspalace/tusky/pager/TimelinePagerAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/pager/TimelinePagerAdapter.java @@ -15,9 +15,9 @@ package com.keylesspalace.tusky.pager; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; import com.keylesspalace.tusky.fragment.NotificationsFragment; import com.keylesspalace.tusky.fragment.TimelineFragment; diff --git a/app/src/main/java/com/keylesspalace/tusky/receiver/SendStatusBroadcastReceiver.kt b/app/src/main/java/com/keylesspalace/tusky/receiver/SendStatusBroadcastReceiver.kt index 415e557a4..73f00675a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/receiver/SendStatusBroadcastReceiver.kt +++ b/app/src/main/java/com/keylesspalace/tusky/receiver/SendStatusBroadcastReceiver.kt @@ -18,10 +18,10 @@ package com.keylesspalace.tusky.receiver import android.content.BroadcastReceiver import android.content.Context import android.content.Intent -import android.support.v4.app.NotificationCompat -import android.support.v4.app.NotificationManagerCompat -import android.support.v4.app.RemoteInput -import android.support.v4.content.ContextCompat +import androidx.core.app.NotificationCompat +import androidx.core.app.NotificationManagerCompat +import androidx.core.app.RemoteInput +import androidx.core.content.ContextCompat import android.util.Log import com.keylesspalace.tusky.ComposeActivity import com.keylesspalace.tusky.R @@ -68,7 +68,7 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() { val builder = NotificationCompat.Builder(context, NotificationHelper.CHANNEL_MENTION + senderIdentifier) .setSmallIcon(R.drawable.ic_notify) - .setColor(ContextCompat.getColor(context, (R.color.primary))) + .setColor(ContextCompat.getColor(context, (R.color.tusky_blue))) .setGroup(senderFullName) .setDefaults(0) // So it doesn't ring twice, notify only in Target callback @@ -102,7 +102,7 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() { val builder = NotificationCompat.Builder(context, NotificationHelper.CHANNEL_MENTION + senderIdentifier) .setSmallIcon(R.drawable.ic_notify) - .setColor(ContextCompat.getColor(context, (R.color.primary))) + .setColor(ContextCompat.getColor(context, (R.color.tusky_blue))) .setGroup(senderFullName) .setDefaults(0) // So it doesn't ring twice, notify only in Target callback diff --git a/app/src/main/java/com/keylesspalace/tusky/service/SendTootService.kt b/app/src/main/java/com/keylesspalace/tusky/service/SendTootService.kt index b68917d84..037216071 100644 --- a/app/src/main/java/com/keylesspalace/tusky/service/SendTootService.kt +++ b/app/src/main/java/com/keylesspalace/tusky/service/SendTootService.kt @@ -12,9 +12,9 @@ import android.net.Uri import android.os.Build import android.os.IBinder import android.os.Parcelable -import android.support.v4.app.NotificationCompat -import android.support.v4.app.ServiceCompat -import android.support.v4.content.ContextCompat +import androidx.core.app.NotificationCompat +import androidx.core.app.ServiceCompat +import androidx.core.content.ContextCompat import com.keylesspalace.tusky.R import com.keylesspalace.tusky.appstore.EventHub import com.keylesspalace.tusky.appstore.StatusComposedEvent @@ -89,7 +89,7 @@ class SendTootService : Service(), Injectable { .setContentText(notificationText) .setProgress(1, 0, true) .setOngoing(true) - .setColor(ContextCompat.getColor(this, R.color.primary)) + .setColor(ContextCompat.getColor(this, R.color.tusky_blue)) .addAction(0, getString(android.R.string.cancel), cancelSendingIntent(sendingNotificationId)) if (tootsToSend.size == 0 || Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { @@ -169,7 +169,7 @@ class SendTootService : Service(), Injectable { .setSmallIcon(R.drawable.ic_notify) .setContentTitle(getString(R.string.send_toot_notification_error_title)) .setContentText(getString(R.string.send_toot_notification_saved_content)) - .setColor(ContextCompat.getColor(this@SendTootService, R.color.primary)) + .setColor(ContextCompat.getColor(this@SendTootService, R.color.tusky_blue)) notificationManager.cancel(tootId) notificationManager.notify(errorNotificationId--, builder.build()) @@ -218,7 +218,7 @@ class SendTootService : Service(), Injectable { .setSmallIcon(R.drawable.ic_notify) .setContentTitle(getString(R.string.send_toot_notification_cancel_title)) .setContentText(getString(R.string.send_toot_notification_saved_content)) - .setColor(ContextCompat.getColor(this@SendTootService, R.color.primary)) + .setColor(ContextCompat.getColor(this@SendTootService, R.color.tusky_blue)) notificationManager.notify(tootId, builder.build()) diff --git a/app/src/main/java/com/keylesspalace/tusky/util/CollectionUtil.java b/app/src/main/java/com/keylesspalace/tusky/util/CollectionUtil.java index 21d4bb081..e5c64874a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/CollectionUtil.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/CollectionUtil.java @@ -14,7 +14,7 @@ * see . */ package com.keylesspalace.tusky.util; -import android.arch.core.util.Function; +import androidx.arch.core.util.Function; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/CustomEmojiHelper.java b/app/src/main/java/com/keylesspalace/tusky/util/CustomEmojiHelper.java index 04f3b04cf..2cf51ab95 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/CustomEmojiHelper.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/CustomEmojiHelper.java @@ -20,8 +20,8 @@ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.SpannedString; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/Either.java b/app/src/main/java/com/keylesspalace/tusky/util/Either.java index a080322a5..32c5406b5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/Either.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/Either.java @@ -14,8 +14,8 @@ * see . */ package com.keylesspalace.tusky.util; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * Created by charlag on 05/11/17. diff --git a/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java b/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java index 0f2e8db42..69ffb1dc1 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/EmojiCompatFont.java @@ -3,7 +3,7 @@ package com.keylesspalace.tusky.util; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.AsyncTask; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Log; import com.keylesspalace.tusky.R; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/HttpHeaderLink.java b/app/src/main/java/com/keylesspalace/tusky/util/HttpHeaderLink.java index fe0b257f5..27f3dffa6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/HttpHeaderLink.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/HttpHeaderLink.java @@ -10,7 +10,7 @@ package com.keylesspalace.tusky.util; import android.net.Uri; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/IOUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/IOUtils.java index 36321f6f2..7c3b68a7f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/IOUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/IOUtils.java @@ -17,7 +17,7 @@ package com.keylesspalace.tusky.util; import android.content.ContentResolver; import android.net.Uri; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import java.io.Closeable; import java.io.File; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/LinkHelper.java b/app/src/main/java/com/keylesspalace/tusky/util/LinkHelper.java index 4c68adc6f..0c23c132e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/LinkHelper.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/LinkHelper.java @@ -20,8 +20,8 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.preference.PreferenceManager; -import android.support.annotation.Nullable; -import android.support.customtabs.CustomTabsIntent; +import androidx.annotation.Nullable; +import androidx.browser.customtabs.CustomTabsIntent; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.method.LinkMovementMethod; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/ListUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/ListUtils.java index 5c9c34b08..ff644fe02 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/ListUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/ListUtils.java @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.util; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import java.util.ArrayList; import java.util.LinkedHashSet; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt b/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt index 951132bde..453b42d2a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt +++ b/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt @@ -25,8 +25,8 @@ import android.media.MediaMetadataRetriever import android.media.ThumbnailUtils import android.net.Uri import android.provider.OpenableColumns -import android.support.annotation.Px -import android.support.media.ExifInterface +import androidx.annotation.Px +import androidx.exifinterface.media.ExifInterface import android.util.Log import java.io.* diff --git a/app/src/main/java/com/keylesspalace/tusky/util/NotificationHelper.java b/app/src/main/java/com/keylesspalace/tusky/util/NotificationHelper.java index 8bc23da95..4257c52aa 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/NotificationHelper.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/NotificationHelper.java @@ -27,14 +27,14 @@ import android.graphics.BitmapFactory; import android.graphics.Color; import android.os.Build; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; -import android.support.v4.app.RemoteInput; -import android.support.v4.app.TaskStackBuilder; -import android.support.v4.content.ContextCompat; -import android.support.v4.text.BidiFormatter; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; +import androidx.core.app.RemoteInput; +import androidx.core.app.TaskStackBuilder; +import androidx.core.content.ContextCompat; +import androidx.core.text.BidiFormatter; import android.util.Log; import com.evernote.android.job.JobManager; @@ -278,7 +278,7 @@ public class NotificationHelper { .setSmallIcon(R.drawable.ic_notify) .setContentIntent(summary ? summaryResultPendingIntent : eventResultPendingIntent) .setDeleteIntent(deletePendingIntent) - .setColor(BuildConfig.DEBUG ? Color.parseColor("#19A341") : ContextCompat.getColor(context, R.color.primary)) + .setColor(BuildConfig.DEBUG ? Color.parseColor("#19A341") : ContextCompat.getColor(context, R.color.tusky_blue)) .setGroup(account.getAccountId()) .setAutoCancel(true) .setDefaults(0); // So it doesn't ring twice, notify only in Target callback diff --git a/app/src/main/java/com/keylesspalace/tusky/util/NotificationPullJobCreator.java b/app/src/main/java/com/keylesspalace/tusky/util/NotificationPullJobCreator.java index 69127ffbb..df4098129 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/NotificationPullJobCreator.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/NotificationPullJobCreator.java @@ -16,8 +16,8 @@ package com.keylesspalace.tusky.util; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.Log; import com.evernote.android.job.Job; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/OkHttpUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/OkHttpUtils.java index 91212c8f4..e9c342540 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/OkHttpUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/OkHttpUtils.java @@ -19,7 +19,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Build; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import com.keylesspalace.tusky.BuildConfig; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/PairedList.java b/app/src/main/java/com/keylesspalace/tusky/util/PairedList.java index a4f5e34e0..7bf6c63bf 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/PairedList.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/PairedList.java @@ -1,6 +1,6 @@ package com.keylesspalace.tusky.util; -import android.arch.core.util.Function; +import androidx.arch.core.util.Function; import java.util.AbstractList; import java.util.ArrayList; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/ResourcesUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/ResourcesUtils.java index f9bd8c267..4b7ac9dc0 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/ResourcesUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/ResourcesUtils.java @@ -16,7 +16,7 @@ package com.keylesspalace.tusky.util; import android.content.Context; -import android.support.annotation.AnyRes; +import androidx.annotation.AnyRes; /** * Created by remi on 1/14/18. diff --git a/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java b/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java index 5fe87c520..5a9cdc969 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java @@ -5,9 +5,9 @@ import android.content.ContentResolver; import android.content.Context; import android.net.Uri; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.content.FileProvider; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.FileProvider; import android.text.TextUtils; import android.util.Log; import android.webkit.MimeTypeMap; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/ThemeUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/ThemeUtils.java index bf00af231..b1329cba9 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/ThemeUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/ThemeUtils.java @@ -21,12 +21,12 @@ import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatDelegate; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatDelegate; import android.util.TypedValue; import android.widget.ImageView; diff --git a/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java b/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java index 39b08dad1..36ee6344c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/ViewDataUtils.java @@ -15,7 +15,7 @@ package com.keylesspalace.tusky.util; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.keylesspalace.tusky.entity.Notification; import com.keylesspalace.tusky.entity.Status; diff --git a/app/src/main/java/com/keylesspalace/tusky/view/ConversationLineItemDecoration.kt b/app/src/main/java/com/keylesspalace/tusky/view/ConversationLineItemDecoration.kt index 822ece56d..821f65c56 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/ConversationLineItemDecoration.kt +++ b/app/src/main/java/com/keylesspalace/tusky/view/ConversationLineItemDecoration.kt @@ -18,7 +18,7 @@ package com.keylesspalace.tusky.view import android.content.Context import android.graphics.Canvas import android.graphics.drawable.Drawable -import android.support.v7.widget.RecyclerView +import androidx.recyclerview.widget.RecyclerView import android.view.View import com.keylesspalace.tusky.R diff --git a/app/src/main/java/com/keylesspalace/tusky/view/EditTextTyped.kt b/app/src/main/java/com/keylesspalace/tusky/view/EditTextTyped.kt index 4160f8b20..1ee7e84af 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/EditTextTyped.kt +++ b/app/src/main/java/com/keylesspalace/tusky/view/EditTextTyped.kt @@ -16,10 +16,10 @@ package com.keylesspalace.tusky.view import android.content.Context -import android.support.text.emoji.widget.EmojiEditTextHelper -import android.support.v13.view.inputmethod.EditorInfoCompat -import android.support.v13.view.inputmethod.InputConnectionCompat -import android.support.v7.widget.AppCompatMultiAutoCompleteTextView +import androidx.emoji.widget.EmojiEditTextHelper +import androidx.core.view.inputmethod.EditorInfoCompat +import androidx.core.view.inputmethod.InputConnectionCompat +import androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView import android.text.InputType import android.text.method.KeyListener import android.util.AttributeSet diff --git a/app/src/main/java/com/keylesspalace/tusky/view/EndlessOnScrollListener.java b/app/src/main/java/com/keylesspalace/tusky/view/EndlessOnScrollListener.java index cf3ba61ff..fa786c6fc 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/EndlessOnScrollListener.java +++ b/app/src/main/java/com/keylesspalace/tusky/view/EndlessOnScrollListener.java @@ -15,8 +15,8 @@ package com.keylesspalace.tusky.view; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; public abstract class EndlessOnScrollListener extends RecyclerView.OnScrollListener { private static final int VISIBLE_THRESHOLD = 15; diff --git a/app/src/main/java/com/keylesspalace/tusky/view/ImageViewPager.java b/app/src/main/java/com/keylesspalace/tusky/view/ImageViewPager.java index 5a31e9c52..22e967afb 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/ImageViewPager.java +++ b/app/src/main/java/com/keylesspalace/tusky/view/ImageViewPager.java @@ -16,7 +16,7 @@ package com.keylesspalace.tusky.view; import android.content.Context; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; diff --git a/app/src/main/java/com/keylesspalace/tusky/view/LicenseCard.kt b/app/src/main/java/com/keylesspalace/tusky/view/LicenseCard.kt index 95b395deb..0d6364733 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/LicenseCard.kt +++ b/app/src/main/java/com/keylesspalace/tusky/view/LicenseCard.kt @@ -16,22 +16,20 @@ package com.keylesspalace.tusky.view import android.content.Context -import android.support.v7.widget.CardView import android.util.AttributeSet +import com.google.android.material.card.MaterialCardView import com.keylesspalace.tusky.R import com.keylesspalace.tusky.util.LinkHelper import com.keylesspalace.tusky.util.ThemeUtils import com.keylesspalace.tusky.util.hide import kotlinx.android.synthetic.main.card_license.view.* - class LicenseCard @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : CardView(context, attrs, defStyleAttr) { - +) : MaterialCardView(context, attrs, defStyleAttr) { init { inflate(context, R.layout.card_license, this) @@ -56,6 +54,5 @@ class LicenseCard } - } diff --git a/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java b/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java index 1e908b12b..bfb474eec 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java +++ b/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java @@ -23,10 +23,10 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.RectF; import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.content.res.AppCompatResources; -import android.support.v7.widget.AppCompatImageView; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.appcompat.widget.AppCompatImageView; import android.util.AttributeSet; import com.keylesspalace.tusky.R; @@ -58,7 +58,7 @@ public final class ProgressImageView extends AppCompatImageView { } private void init() { - circlePaint.setColor(ContextCompat.getColor(getContext(), R.color.colorPrimary)); + circlePaint.setColor(ContextCompat.getColor(getContext(), R.color.tusky_blue)); circlePaint.setStrokeWidth(Utils.dpToPx(getContext(), 4)); circlePaint.setStyle(Paint.Style.STROKE); @@ -82,7 +82,7 @@ public final class ProgressImageView extends AppCompatImageView { public void setChecked(boolean checked) { this.markBgPaint.setColor(ContextCompat.getColor(getContext(), - checked ? R.color.colorPrimary : R.color.description_marker_unselected)); + checked ? R.color.tusky_blue : R.color.description_marker_unselected)); invalidate(); } diff --git a/app/src/main/java/com/keylesspalace/tusky/view/RoundedImageView.java b/app/src/main/java/com/keylesspalace/tusky/view/RoundedImageView.java index b5f0733b8..7d60e72de 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/RoundedImageView.java +++ b/app/src/main/java/com/keylesspalace/tusky/view/RoundedImageView.java @@ -33,8 +33,8 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; -import android.support.annotation.DrawableRes; -import android.support.v7.widget.AppCompatImageView; +import androidx.annotation.DrawableRes; +import androidx.appcompat.widget.AppCompatImageView; import android.util.AttributeSet; import android.view.View; import android.view.ViewOutlineProvider; diff --git a/app/src/main/java/com/keylesspalace/tusky/view/SquareImageView.kt b/app/src/main/java/com/keylesspalace/tusky/view/SquareImageView.kt index 19a12b5fb..d0e730522 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/SquareImageView.kt +++ b/app/src/main/java/com/keylesspalace/tusky/view/SquareImageView.kt @@ -1,7 +1,7 @@ package com.keylesspalace.tusky.view import android.content.Context -import android.support.v7.widget.AppCompatImageView +import androidx.appcompat.widget.AppCompatImageView import android.util.AttributeSet /** diff --git a/app/src/main/java/com/keylesspalace/tusky/view/TootButton.kt b/app/src/main/java/com/keylesspalace/tusky/view/TootButton.kt index 088fc051e..333f41c9c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/TootButton.kt +++ b/app/src/main/java/com/keylesspalace/tusky/view/TootButton.kt @@ -17,8 +17,8 @@ package com.keylesspalace.tusky.view import android.content.Context import android.graphics.Color -import android.support.v7.widget.AppCompatButton import android.util.AttributeSet +import com.google.android.material.button.MaterialButton import com.keylesspalace.tusky.R import com.keylesspalace.tusky.entity.Status import com.mikepenz.google_material_typeface_library.GoogleMaterial @@ -29,48 +29,45 @@ class TootButton context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : AppCompatButton(context, attrs, defStyleAttr) { +) : MaterialButton(context, attrs, defStyleAttr) { private val smallStyle: Boolean = context.resources.getBoolean(R.bool.show_small_toot_button) init { if(smallStyle) { - setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_send_24dp, 0, 0, 0) + setIconResource(R.drawable.ic_send_24dp) } else { - compoundDrawablePadding = context.resources.getDimensionPixelSize(R.dimen.toot_button_drawable_padding) setText(R.string.action_send) + iconGravity = ICON_GRAVITY_TEXT_START } + val padding = resources.getDimensionPixelSize(R.dimen.toot_button_horizontal_padding) + setPadding(padding, 0, padding, 0) } fun setStatusVisibility(visibility: Status.Visibility) { if(!smallStyle) { - when (visibility) { + icon = when (visibility) { Status.Visibility.PUBLIC -> { setText(R.string.action_send_public) - setCompoundDrawables(null, null, null, null) + null } Status.Visibility.UNLISTED -> { setText(R.string.action_send) - setCompoundDrawables(null, null, null, null) + null } Status.Visibility.PRIVATE, Status.Visibility.DIRECT -> { - addLock() + setText(R.string.action_send) + IconicsDrawable(context, GoogleMaterial.Icon.gmd_lock).sizeDp(18).color(Color.WHITE) } else -> { - setCompoundDrawables(null, null, null, null) + null } } } } - private fun addLock() { - setText(R.string.action_send) - val lock = IconicsDrawable(context, GoogleMaterial.Icon.gmd_lock).sizeDp(18).color(Color.WHITE) - setCompoundDrawablesWithIntrinsicBounds(lock, null, null, null) - } - } diff --git a/app/src/main/java/com/keylesspalace/tusky/viewdata/StatusViewData.java b/app/src/main/java/com/keylesspalace/tusky/viewdata/StatusViewData.java index c7a2fc769..b6b481ebc 100644 --- a/app/src/main/java/com/keylesspalace/tusky/viewdata/StatusViewData.java +++ b/app/src/main/java/com/keylesspalace/tusky/viewdata/StatusViewData.java @@ -16,7 +16,7 @@ package com.keylesspalace.tusky.viewdata; import android.os.Build; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.Spanned; diff --git a/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountViewModel.kt index efeb03162..b1eab0dd5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountViewModel.kt @@ -1,7 +1,7 @@ package com.keylesspalace.tusky.viewmodel -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import com.keylesspalace.tusky.appstore.* import com.keylesspalace.tusky.entity.Account import com.keylesspalace.tusky.entity.Relationship diff --git a/app/src/main/java/com/keylesspalace/tusky/viewmodel/EditProfileViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/viewmodel/EditProfileViewModel.kt index ab4d366f0..02766ac82 100644 --- a/app/src/main/java/com/keylesspalace/tusky/viewmodel/EditProfileViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/viewmodel/EditProfileViewModel.kt @@ -15,8 +15,8 @@ package com.keylesspalace.tusky.viewmodel -import android.arch.lifecycle.MutableLiveData -import android.arch.lifecycle.ViewModel +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel import android.content.Context import android.graphics.Bitmap import android.net.Uri diff --git a/app/src/main/res/color/compound_button_color_dark.xml b/app/src/main/res/color/compound_button_color_dark.xml index c3a3d0710..bd00f6afd 100644 --- a/app/src/main/res/color/compound_button_color_dark.xml +++ b/app/src/main/res/color/compound_button_color_dark.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/color/compound_button_color_light.xml b/app/src/main/res/color/compound_button_color_light.xml index 8c113f771..3203ee04b 100644 --- a/app/src/main/res/color/compound_button_color_light.xml +++ b/app/src/main/res/color/compound_button_color_light.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/color/text_input_layout_box_stroke_color.xml b/app/src/main/res/color/text_input_layout_box_stroke_color.xml new file mode 100644 index 000000000..5b21f78fe --- /dev/null +++ b/app/src/main/res/color/text_input_layout_box_stroke_color.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-night/background_dialog_activity.xml b/app/src/main/res/drawable-night/background_dialog_activity.xml index 37a2b6c1d..31c659707 100644 --- a/app/src/main/res/drawable-night/background_dialog_activity.xml +++ b/app/src/main/res/drawable-night/background_dialog_activity.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/background_dialog_activity.xml b/app/src/main/res/drawable/background_dialog_activity.xml index 06b36455a..7a636d59a 100644 --- a/app/src/main/res/drawable/background_dialog_activity.xml +++ b/app/src/main/res/drawable/background_dialog_activity.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/favourite_active_dark.xml b/app/src/main/res/drawable/favourite_active_dark.xml index 2d53859ff..f1631599e 100644 --- a/app/src/main/res/drawable/favourite_active_dark.xml +++ b/app/src/main/res/drawable/favourite_active_dark.xml @@ -4,6 +4,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/app/src/main/res/drawable/favourite_active_light.xml b/app/src/main/res/drawable/favourite_active_light.xml index cb9ff4ecf..7efda3965 100644 --- a/app/src/main/res/drawable/favourite_active_light.xml +++ b/app/src/main/res/drawable/favourite_active_light.xml @@ -4,6 +4,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/app/src/main/res/drawable/ic_check_circle.xml b/app/src/main/res/drawable/ic_check_circle.xml index 1503448ec..7ff119e72 100644 --- a/app/src/main/res/drawable/ic_check_circle.xml +++ b/app/src/main/res/drawable/ic_check_circle.xml @@ -4,5 +4,5 @@ android:width="18dp" android:viewportWidth="24" android:viewportHeight="24"> - + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_person_add_24dp.xml b/app/src/main/res/drawable/ic_person_add_24dp.xml index 2f4b9dd0c..dc849f045 100644 --- a/app/src/main/res/drawable/ic_person_add_24dp.xml +++ b/app/src/main/res/drawable/ic_person_add_24dp.xml @@ -4,6 +4,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/app/src/main/res/drawable/reblog_active.xml b/app/src/main/res/drawable/reblog_active.xml index c23ed9a95..d27942e55 100644 --- a/app/src/main/res/drawable/reblog_active.xml +++ b/app/src/main/res/drawable/reblog_active.xml @@ -4,6 +4,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/app/src/main/res/drawable/reblog_private_active.xml b/app/src/main/res/drawable/reblog_private_active.xml index cb1e326c0..43169d141 100644 --- a/app/src/main/res/drawable/reblog_private_active.xml +++ b/app/src/main/res/drawable/reblog_private_active.xml @@ -4,6 +4,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/app/src/main/res/layout-sw640dp/fragment_timeline.xml b/app/src/main/res/layout-sw640dp/fragment_timeline.xml index a76a40e66..43b82f3a4 100644 --- a/app/src/main/res/layout-sw640dp/fragment_timeline.xml +++ b/app/src/main/res/layout-sw640dp/fragment_timeline.xml @@ -5,23 +5,23 @@ android:layout_height="match_parent" android:background="?attr/tab_page_margin_drawable"> - - - - + - + \ No newline at end of file diff --git a/app/src/main/res/layout-sw640dp/fragment_view_thread.xml b/app/src/main/res/layout-sw640dp/fragment_view_thread.xml index 2d6dad873..184930d41 100644 --- a/app/src/main/res/layout-sw640dp/fragment_view_thread.xml +++ b/app/src/main/res/layout-sw640dp/fragment_view_thread.xml @@ -4,18 +4,18 @@ android:layout_height="match_parent" android:background="?attr/tab_page_margin_drawable"> - - - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 1e608f899..82ef0f915 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -1,5 +1,5 @@ - - @@ -24,19 +24,20 @@ android:focusableInTouchMode="true" android:gravity="center" android:orientation="vertical" - android:paddingBottom="16dp" - android:paddingTop="16dp"> + android:paddingTop="16dp" + android:paddingBottom="16dp"> + android:textIsSelectable="true" + android:textSize="16sp" />