add some listview animations to headlines
This commit is contained in:
parent
f7a9bffcaa
commit
17327f1457
@ -36,4 +36,6 @@ dependencies {
|
|||||||
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.1.0@aar'
|
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.1.0@aar'
|
||||||
compile 'me.relex:circleindicator:1.1.1@aar'
|
compile 'me.relex:circleindicator:1.1.1@aar'
|
||||||
compile 'com.viewpagerindicator:library:2.4.1'
|
compile 'com.viewpagerindicator:library:2.4.1'
|
||||||
|
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
|
||||||
|
compile files('libs/nineoldandroids-2.4.0.jar')
|
||||||
}
|
}
|
||||||
|
BIN
org.fox.ttrss/libs/nineoldandroids-2.4.0.jar
Normal file
BIN
org.fox.ttrss/libs/nineoldandroids-2.4.0.jar
Normal file
Binary file not shown.
@ -90,6 +90,7 @@
|
|||||||
<orderEntry type="library" exported="" name="jsoup-1.6.1" level="project" />
|
<orderEntry type="library" exported="" name="jsoup-1.6.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="view-pager-transforms-1.1.0" level="project" />
|
<orderEntry type="library" exported="" name="view-pager-transforms-1.1.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="library-2.4.1" level="project" />
|
<orderEntry type="library" exported="" name="library-2.4.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="nineoldandroids-2.4.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="gson-2.3" level="project" />
|
<orderEntry type="library" exported="" name="gson-2.3" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
|
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
|
||||||
<orderEntry type="library" exported="" name="acra-4.5.0" level="project" />
|
<orderEntry type="library" exported="" name="acra-4.5.0" level="project" />
|
||||||
@ -98,6 +99,7 @@
|
|||||||
<orderEntry type="library" exported="" name="dashclock-api-r1.1" level="project" />
|
<orderEntry type="library" exported="" name="dashclock-api-r1.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="fab-0.0.5" level="project" />
|
<orderEntry type="library" exported="" name="fab-0.0.5" level="project" />
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
|
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="lib-core-3.1.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
|
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
|
||||||
<orderEntry type="module" module-name="taskerlocaleapi" exported="" />
|
<orderEntry type="module" module-name="taskerlocaleapi" exported="" />
|
||||||
</component>
|
</component>
|
||||||
|
@ -47,6 +47,7 @@ import android.widget.TextView;
|
|||||||
import com.amulyakhare.textdrawable.TextDrawable;
|
import com.amulyakhare.textdrawable.TextDrawable;
|
||||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
|
import com.amulyakhare.textdrawable.util.ColorGenerator;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
|
import com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter;
|
||||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||||
import com.nostra13.universalimageloader.core.assist.FailReason;
|
import com.nostra13.universalimageloader.core.assist.FailReason;
|
||||||
@ -376,8 +377,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_adapter = new ArticleListAdapter(getActivity(), R.layout.headlines_row, (ArrayList<Article>)m_articles);
|
m_adapter = new ArticleListAdapter(getActivity(), R.layout.headlines_row, (ArrayList<Article>)m_articles);
|
||||||
|
SwingBottomInAnimationAdapter animationAdapter = new SwingBottomInAnimationAdapter(m_adapter);
|
||||||
|
|
||||||
|
animationAdapter.setAbsListView(m_list);
|
||||||
|
m_list.setAdapter(animationAdapter);
|
||||||
|
|
||||||
m_list.setAdapter(m_adapter);
|
|
||||||
m_list.setOnItemClickListener(this);
|
m_list.setOnItemClickListener(this);
|
||||||
m_list.setOnScrollListener(this);
|
m_list.setOnScrollListener(this);
|
||||||
registerForContextMenu(m_list);
|
registerForContextMenu(m_list);
|
||||||
@ -474,12 +478,10 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
if (!append) {
|
if (!append) {
|
||||||
if (getView() != null) {
|
if (getView() != null) {
|
||||||
Log.d(TAG, "scroll hack");
|
Log.d(TAG, "scroll hack");
|
||||||
ListView list = (ListView)getView().findViewById(R.id.headlines_list);
|
|
||||||
m_autoCatchupDisabled = true;
|
m_autoCatchupDisabled = true;
|
||||||
list.setSelection(0);
|
m_list.setSelection(0);
|
||||||
m_autoCatchupDisabled = false;
|
m_autoCatchupDisabled = false;
|
||||||
list.setEmptyView(null);
|
//m_articles.clear();
|
||||||
m_adapter.clear();
|
|
||||||
m_adapter.notifyDataSetChanged();
|
m_adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user