upgrade SwipeRefreshLayout to 1.1.0 (#1866)

main
Konrad Pozniak 4 years ago committed by Alibek Omarov
parent 21579dfdc9
commit cf3295749b
  1. 2
      app/build.gradle
  2. 2
      app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt
  3. 1
      app/src/main/java/com/keylesspalace/tusky/components/conversation/ConversationsFragment.kt
  4. 1
      app/src/main/java/com/keylesspalace/tusky/components/report/fragments/ReportStatusesFragment.kt
  5. 2
      app/src/main/java/com/keylesspalace/tusky/components/scheduled/ScheduledTootActivity.kt
  6. 3
      app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchFragment.kt
  7. 1
      app/src/main/java/com/keylesspalace/tusky/fragment/AccountMediaFragment.kt
  8. 1
      app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java
  9. 3
      app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java
  10. 2
      app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java
  11. 2
      app/src/main/res/values/styles.xml

@ -126,7 +126,7 @@ dependencies {
implementation "androidx.appcompat:appcompat:1.2.0-rc01" implementation "androidx.appcompat:appcompat:1.2.0-rc01"
implementation "androidx.fragment:fragment-ktx:1.2.5" implementation "androidx.fragment:fragment-ktx:1.2.5"
implementation "androidx.browser:browser:1.2.0" implementation "androidx.browser:browser:1.2.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.1.0" implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation "androidx.exifinterface:exifinterface:1.2.0" implementation "androidx.exifinterface:exifinterface:1.2.0"
implementation "androidx.cardview:cardview:1.0.0" implementation "androidx.cardview:cardview:1.0.0"

@ -356,8 +356,6 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI
swipeToRefreshLayout.isRefreshing = isRefreshing == true swipeToRefreshLayout.isRefreshing = isRefreshing == true
}) })
swipeToRefreshLayout.setColorSchemeResources(R.color.tusky_blue) swipeToRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeToRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(this,
android.R.attr.colorBackground))
} }
private fun onAccountChanged(account: Account?) { private fun onAccountChanged(account: Account?) {

@ -102,7 +102,6 @@ class ConversationsFragment : SFragment(), StatusActionListener, Injectable, Res
viewModel.refresh() viewModel.refresh()
} }
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue) swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(swipeRefreshLayout.context, android.R.attr.colorBackground))
} }
private fun onTopLoaded() { private fun onTopLoaded() {

@ -101,7 +101,6 @@ class ReportStatusesFragment : Fragment(), Injectable, AdapterHandler {
private fun setupSwipeRefreshLayout() { private fun setupSwipeRefreshLayout() {
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue) swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(swipeRefreshLayout.context, android.R.attr.colorBackground))
swipeRefreshLayout.setOnRefreshListener { swipeRefreshLayout.setOnRefreshListener {
snackbarErrorRetry?.dismiss() snackbarErrorRetry?.dismiss()

@ -59,8 +59,6 @@ class ScheduledTootActivity : BaseActivity(), ScheduledTootActionListener, Injec
swipeRefreshLayout.setOnRefreshListener(this::refreshStatuses) swipeRefreshLayout.setOnRefreshListener(this::refreshStatuses)
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue) swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(
ThemeUtils.getColor(this, android.R.attr.colorBackground))
scheduledTootList.setHasFixedSize(true) scheduledTootList.setHasFixedSize(true)
scheduledTootList.layoutManager = LinearLayoutManager(this) scheduledTootList.layoutManager = LinearLayoutManager(this)

@ -58,9 +58,6 @@ abstract class SearchFragment<T> : Fragment(),
private fun setupSwipeRefreshLayout() { private fun setupSwipeRefreshLayout() {
swipeRefreshLayout.setOnRefreshListener(this) swipeRefreshLayout.setOnRefreshListener(this)
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue) swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(
ThemeUtils.getColor(swipeRefreshLayout.context, android.R.attr.colorBackground)
)
} }
private fun subscribeObservables() { private fun subscribeObservables() {

@ -188,7 +188,6 @@ class AccountMediaFragment : BaseFragment(), RefreshableFragment, Injectable {
refresh() refresh()
} }
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue) swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue)
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(view.context, android.R.attr.colorBackground))
} }
statusView.visibility = View.GONE statusView.visibility = View.GONE

@ -219,7 +219,6 @@ public class NotificationsFragment extends SFragment implements
swipeRefreshLayout.setOnRefreshListener(this); swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue); swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue);
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(context, android.R.attr.colorBackground));
loadNotificationsFilter(); loadNotificationsFilter();

@ -409,11 +409,8 @@ public class TimelineFragment extends SFragment implements
private void setupSwipeRefreshLayout() { private void setupSwipeRefreshLayout() {
swipeRefreshLayout.setEnabled(isSwipeToRefreshEnabled); swipeRefreshLayout.setEnabled(isSwipeToRefreshEnabled);
if (isSwipeToRefreshEnabled) { if (isSwipeToRefreshEnabled) {
Context context = swipeRefreshLayout.getContext();
swipeRefreshLayout.setOnRefreshListener(this); swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue); swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue);
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(ThemeUtils.getColor(context,
android.R.attr.colorBackground));
} }
} }

@ -141,8 +141,6 @@ public final class ViewThreadFragment extends SFragment implements
swipeRefreshLayout = rootView.findViewById(R.id.swipeRefreshLayout); swipeRefreshLayout = rootView.findViewById(R.id.swipeRefreshLayout);
swipeRefreshLayout.setOnRefreshListener(this); swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue); swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue);
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(
ThemeUtils.getColor(context, android.R.attr.colorBackground));
recyclerView = rootView.findViewById(R.id.recyclerView); recyclerView = rootView.findViewById(R.id.recyclerView);
recyclerView.setHasFixedSize(true); recyclerView.setHasFixedSize(true);

@ -77,6 +77,8 @@
<item name="minTouchTargetSize">32dp</item> <!-- this affects RadioButton size --> <item name="minTouchTargetSize">32dp</item> <!-- this affects RadioButton size -->
<item name="elevationOverlayEnabled">false</item> <!-- disable the automatic tinting of surfaces with elevation in dark mode --> <item name="elevationOverlayEnabled">false</item> <!-- disable the automatic tinting of surfaces with elevation in dark mode -->
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorSurface</item>
</style> </style>
<style name="ViewMediaActivity.AppBarLayout" parent="ThemeOverlay.AppCompat"> <style name="ViewMediaActivity.AppBarLayout" parent="ThemeOverlay.AppCompat">

Loading…
Cancel
Save