bring back articlepager viewpagerindicator
This commit is contained in:
parent
1967cd39bb
commit
70d366bcc5
@ -35,4 +35,5 @@ dependencies {
|
|||||||
compile 'ch.acra:acra:4.5.0'
|
compile 'ch.acra:acra:4.5.0'
|
||||||
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'
|
||||||
}
|
}
|
||||||
|
@ -84,17 +84,18 @@
|
|||||||
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" exported="" name="cardview-v7-21.0.0" level="project" />
|
<orderEntry type="library" exported="" name="cardview-v7-21.0.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
|
|
||||||
<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="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="support-annotations-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" />
|
||||||
<orderEntry type="library" exported="" name="circleindicator-1.1.1" level="project" />
|
<orderEntry type="library" exported="" name="circleindicator-1.1.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="universal-image-loader-1.9.3" level="project" />
|
<orderEntry type="library" exported="" name="universal-image-loader-1.9.3" level="project" />
|
||||||
<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="support-annotations-21.0.3" level="project" />
|
||||||
<orderEntry type="module" module-name="taskerlocaleapi" exported="" />
|
<orderEntry type="module" module-name="taskerlocaleapi" exported="" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="320"
|
android:versionCode="321"
|
||||||
android:versionName="1.95" >
|
android:versionName="1.96" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="15"
|
android:minSdkVersion="15"
|
||||||
|
@ -16,6 +16,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
|
import com.viewpagerindicator.UnderlinePageIndicator;
|
||||||
|
|
||||||
import org.fox.ttrss.types.Article;
|
import org.fox.ttrss.types.Article;
|
||||||
import org.fox.ttrss.types.ArticleList;
|
import org.fox.ttrss.types.ArticleList;
|
||||||
@ -92,8 +93,12 @@ public class ArticlePager extends Fragment {
|
|||||||
|
|
||||||
pager.setAdapter(m_adapter);
|
pager.setAdapter(m_adapter);
|
||||||
|
|
||||||
|
UnderlinePageIndicator indicator = (UnderlinePageIndicator)view.findViewById(R.id.article_pager_indicator);
|
||||||
|
indicator.setViewPager(pager);
|
||||||
|
|
||||||
pager.setCurrentItem(position);
|
pager.setCurrentItem(position);
|
||||||
pager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
|
||||||
|
indicator.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int arg0) {
|
public void onPageScrollStateChanged(int arg0) {
|
||||||
|
@ -15,6 +15,8 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.viewpagerindicator.UnderlinePageIndicator;
|
||||||
|
|
||||||
import org.fox.ttrss.R;
|
import org.fox.ttrss.R;
|
||||||
|
|
||||||
public class OfflineArticlePager extends Fragment {
|
public class OfflineArticlePager extends Fragment {
|
||||||
@ -168,8 +170,12 @@ public class OfflineArticlePager extends Fragment {
|
|||||||
|
|
||||||
pager.setAdapter(m_adapter);
|
pager.setAdapter(m_adapter);
|
||||||
|
|
||||||
|
UnderlinePageIndicator indicator = (UnderlinePageIndicator)view.findViewById(R.id.article_pager_indicator);
|
||||||
|
indicator.setViewPager(pager);
|
||||||
|
|
||||||
pager.setCurrentItem(position);
|
pager.setCurrentItem(position);
|
||||||
pager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
|
||||||
|
indicator.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int arg0) {
|
public void onPageScrollStateChanged(int arg0) {
|
||||||
|
@ -8,8 +8,15 @@
|
|||||||
android:id="@+id/article_pager"
|
android:id="@+id/article_pager"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_above="@+id/article_pager_indicator"
|
||||||
android:layout_alignParentBottom="true">
|
android:layout_alignParentTop="true"></android.support.v4.view.ViewPager>
|
||||||
</android.support.v4.view.ViewPager>
|
|
||||||
|
<com.viewpagerindicator.UnderlinePageIndicator
|
||||||
|
android:id="@+id/article_pager_indicator"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignParentLeft="true" />
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user