bring back gallery circle indicator

This commit is contained in:
Andrew Dolgov 2017-06-02 15:26:20 +03:00
parent 2c676e263f
commit 522a6a6c7d
2 changed files with 9 additions and 4 deletions

View File

@ -27,6 +27,8 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import me.relex.circleindicator.CircleIndicator;
public class GalleryActivity extends CommonActivity { public class GalleryActivity extends CommonActivity {
private final String TAG = this.getClass().getSimpleName(); private final String TAG = this.getClass().getSimpleName();
@ -35,7 +37,7 @@ public class GalleryActivity extends CommonActivity {
private String m_title; private String m_title;
private ArticleImagesPagerAdapter m_adapter; private ArticleImagesPagerAdapter m_adapter;
public String m_content; public String m_content;
private ProgressBar m_progress; //private ProgressBar m_progress;
private ViewPager m_pager; private ViewPager m_pager;
private enum GalleryEntryType { TYPE_IMAGE, TYPE_VIDEO }; private enum GalleryEntryType { TYPE_IMAGE, TYPE_VIDEO };
@ -178,7 +180,7 @@ public class GalleryActivity extends CommonActivity {
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
m_progress = (ProgressBar) findViewById(R.id.article_images_progress); //m_progress = (ProgressBar) findViewById(R.id.gallery_check_progress);
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().hide(); getSupportActionBar().hide();
@ -290,6 +292,9 @@ public class GalleryActivity extends CommonActivity {
m_pager.setAdapter(m_adapter); m_pager.setAdapter(m_adapter);
m_pager.setPageTransformer(true, new DepthPageTransformer()); m_pager.setPageTransformer(true, new DepthPageTransformer());
CircleIndicator indicator = (CircleIndicator) findViewById(R.id.gallery_pager_indicator);
indicator.setViewPager(m_pager);
} }

View File

@ -28,7 +28,7 @@
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/article_images_progress" android:id="@+id/gallery_check_progress"
android:progress="0" android:progress="0"
android:indeterminate="false" android:indeterminate="false"
android:visibility="gone" android:visibility="gone"
@ -47,7 +47,7 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:visibility="invisible" /> android:visibility="visible" />
<include layout="@layout/toolbar" android:id="@+id/toolbar" /> <include layout="@layout/toolbar" android:id="@+id/toolbar" />