diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java | 32 | ||||
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java | 25 |
2 files changed, 15 insertions, 42 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 3365b3f0..9f17abb7 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -50,16 +50,6 @@ import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; -import androidx.core.app.ActivityCompat; -import androidx.core.app.ActivityOptionsCompat; -import androidx.core.view.ViewCompat; -import androidx.recyclerview.widget.DefaultItemAnimator; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.ItemTouchHelper; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; - import com.amulyakhare.textdrawable.TextDrawable; import com.amulyakhare.textdrawable.util.ColorGenerator; import com.bumptech.glide.Glide; @@ -90,6 +80,15 @@ import java.util.HashMap; import java.util.List; import java.util.TimeZone; +import androidx.core.app.ActivityCompat; +import androidx.core.app.ActivityOptionsCompat; +import androidx.core.view.ViewCompat; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import icepick.State; import jp.wasabeef.glide.transformations.CropCircleTransformation; @@ -110,8 +109,6 @@ public class HeadlinesFragment extends StateSavedFragment { private boolean m_refreshInProgress = false; @State int m_firstId = 0; @State boolean m_lazyLoadDisabled = false; - private int m_amountScrolled; - private int m_scrollToToggleBar; private SharedPreferences m_prefs; @@ -313,8 +310,6 @@ public class HeadlinesFragment extends StateSavedFragment { getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics); m_maxImageSize = (int) (128 * metrics.density + 0.5); - m_scrollToToggleBar = m_activity.getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_height_material); - Log.d(TAG, "maxImageSize=" + m_maxImageSize); View view = inflater.inflate(R.layout.fragment_headlines, container, false); @@ -428,15 +423,6 @@ public class HeadlinesFragment extends StateSavedFragment { m_fab.hide(); } - /*if (m_activity.isSmallScreen()) { - View layout = inflater.inflate(R.layout.headlines_heading_spacer, m_list, false); - m_adapter.addHeaderView(layout); - - m_swipeLayout.setProgressViewOffset(false, 0, - m_activity.getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_height_material) + - m_activity.getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_padding_end_material) + 15); - }*/ - m_list.setOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrollStateChanged(RecyclerView recyclerView, int newState) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index aab2d5db..6cf273e0 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -43,13 +43,6 @@ import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; -import androidx.core.app.ActivityCompat; -import androidx.core.app.ActivityOptionsCompat; -import androidx.core.view.ViewCompat; -import androidx.cursoradapter.widget.SimpleCursorAdapter; -import androidx.fragment.app.Fragment; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; - import com.amulyakhare.textdrawable.TextDrawable; import com.amulyakhare.textdrawable.util.ColorGenerator; import com.bumptech.glide.Glide; @@ -76,6 +69,12 @@ import java.util.HashMap; import java.util.List; import java.util.TimeZone; +import androidx.core.app.ActivityCompat; +import androidx.core.app.ActivityOptionsCompat; +import androidx.core.view.ViewCompat; +import androidx.cursoradapter.widget.SimpleCursorAdapter; +import androidx.fragment.app.Fragment; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import jp.wasabeef.glide.transformations.CropCircleTransformation; public class OfflineHeadlinesFragment extends Fragment implements OnItemClickListener, AbsListView.OnScrollListener { @@ -355,18 +354,6 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis m_list = view.findViewById(R.id.headlines_list); - View fab = view.findViewById(R.id.headlines_fab); - fab.setVisibility(View.GONE); - - if (m_activity.isSmallScreen()) { - View layout = inflater.inflate(R.layout.headlines_heading_spacer, m_list, false); - m_list.addHeaderView(layout); - - m_swipeLayout.setProgressViewOffset(false, 0, - m_activity.getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_height_material) + - m_activity.getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_padding_end_material)); - } - if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) { WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); |