rename headlines list to a separate id for clarity
This commit is contained in:
parent
33acb40c3a
commit
3e078aa1d7
@ -1,6 +1,7 @@
|
||||
package org.fox.ttrss;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -10,6 +11,7 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.Fragment;
|
||||
@ -318,7 +320,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
}
|
||||
|
||||
|
||||
ListView list = (ListView)view.findViewById(R.id.headlines);
|
||||
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
||||
|
||||
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
||||
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
||||
@ -425,7 +427,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
if (!append) {
|
||||
if (getView() != null) {
|
||||
Log.d(TAG, "scroll hack");
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines);
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines_list);
|
||||
m_autoCatchupDisabled = true;
|
||||
list.setSelection(0);
|
||||
m_autoCatchupDisabled = false;
|
||||
@ -450,7 +452,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
if (isDetached()) return;
|
||||
|
||||
if (getView() != null) {
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines);
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines_list);
|
||||
|
||||
if (list != null) {
|
||||
list.setEmptyView(getView().findViewById(R.id.no_headlines));
|
||||
@ -851,7 +853,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||
@Override
|
||||
public void onLoadingComplete(String arg0,
|
||||
View arg1, Bitmap arg2) {
|
||||
// TODO Auto-generated method stub
|
||||
@ -991,7 +994,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
m_activeArticle = article;
|
||||
m_adapter.notifyDataSetChanged();
|
||||
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines);
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines_list);
|
||||
|
||||
if (list != null && article != null) {
|
||||
int position = m_adapter.getPosition(article);
|
||||
|
@ -300,7 +300,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
||||
|
||||
m_cursor = createCursor();
|
||||
|
||||
ListView list = (ListView)view.findViewById(R.id.headlines);
|
||||
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
||||
|
||||
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
||||
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
||||
@ -318,34 +318,12 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
||||
m_adapter = new ArticleListAdapter(getActivity(), R.layout.headlines_row, m_cursor,
|
||||
new String[] { "title" }, new int[] { R.id.title }, 0);
|
||||
|
||||
/* if (!m_activity.isCompatMode()) {
|
||||
AnimationSet set = new AnimationSet(true);
|
||||
|
||||
Animation animation = new AlphaAnimation(0.0f, 1.0f);
|
||||
animation.setDuration(500);
|
||||
set.addAnimation(animation);
|
||||
|
||||
animation = new TranslateAnimation(
|
||||
Animation.RELATIVE_TO_SELF, 50.0f,Animation.RELATIVE_TO_SELF, 0.0f,
|
||||
Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF, 0.0f
|
||||
);
|
||||
animation.setDuration(1000);
|
||||
set.addAnimation(animation);
|
||||
|
||||
LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
|
||||
|
||||
list.setLayoutAnimation(controller);
|
||||
} */
|
||||
|
||||
list.setAdapter(m_adapter);
|
||||
list.setOnItemClickListener(this);
|
||||
list.setOnScrollListener(this);
|
||||
list.setEmptyView(view.findViewById(R.id.no_headlines));
|
||||
registerForContextMenu(list);
|
||||
|
||||
//if (m_activity.isSmallScreen())
|
||||
// view.findViewById(R.id.headlines_fragment).setPadding(0, 0, 0, 0);
|
||||
|
||||
getActivity().setProgressBarIndeterminateVisibility(false);
|
||||
|
||||
return view;
|
||||
@ -732,7 +710,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
||||
try {
|
||||
m_adapter.notifyDataSetChanged();
|
||||
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines);
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines_list);
|
||||
|
||||
Log.d(TAG, articleId + " position " + getArticleIdPosition(articleId));
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<ListView
|
||||
android:id="@+id/headlines"
|
||||
android:id="@+id/headlines_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layoutAnimation="@anim/layout_headline"
|
||||
android:dividerHeight="0dp"
|
||||
|
Loading…
Reference in New Issue
Block a user