viewpagerindicator

Android项目实战系列—基于博学谷(七)课程模块(上)

女生的网名这么多〃 提交于 2020-11-10 07:53:27
由于这个模块内容较多,分为上、中、下 三篇博客分别来讲述,请耐心阅读。 课程模块分为四个部分 [x] 课程列表 [ ] 课程详情 [ ] 视频播放 [ ] 播放记录 课程模块(上)主要讲述课程列表部分 一、水平滑动广告栏界面 1、创建水平滑动广告栏界面 在 res/layout 文件夹下,创建一个布局文件,命名为 main_adbanner 。 2、导入界面图片 将广告栏界面所需图片 default_img、banner_1.png 、 banner_2.png、banner_3.png 导入到 drawable 文件夹。 3、界面代码——main_adbanner.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="160dp" android:id="@+id/rl_adBanner" android:background="#eeeeee"> <!-- 如果没有android.support.v4包可以手动导入 -->

Horizontal RecylerView look as ViewPager

蹲街弑〆低调 提交于 2020-01-31 19:02:11
问题 I try to convert horizontal RecylerView into ViewPager . (work like horizontal RecylerView look like ViewPager) I'm working on existing project where horizontal RecylerView is already in use and work perfectly as per requirement, but i need to change design of it as RecylerView is horizontal only one item at time should be shown so for user better understanding i need to add one linear layout below item which shows indicator (just like ViewPager) of total items in RecylerView. purpose of

Intercepting touch events in ViewPagerIndicator

我只是一个虾纸丫 提交于 2020-01-30 09:41:46
问题 I am using Jake Wharton's ViewPagerIndicator on my FragmentActivity which contains a viewpager. I am having difficulty intercepting onTouch events. I know the the ViewPagerIndicator intercepts all touch events to the ViewPager, but I have had no success with setting an onTouchListener to either my ViewPager or my ViewIndicator. Here's my basic setup: public class MainActivity extends FragmentActivity { mPager = (ViewPager)findViewById(R.id.pager); adapter = new ViewSliderAdapter

java.lang.IllegalStateException: ViewPager has not been bound (Using JakeWharton ViewPager Indicator)

余生长醉 提交于 2020-01-23 06:51:39
问题 I have two view pagers in a screen.One ViewPager uses JakeWharton' circleindicator and second one uses TabPage Indicator. I need to download the data from backend using Async call.Once the data is download i should be displaying the data in the viewpagers. Here is the Code snippet of my activity. ViewPager pager1; ViewPager pager2; public onCreate(){ //I Set Up ContentView //Locate ViewPagers & Indicators //pager1 = ... //pager2= ... //Locate Indicators CallAsyncTask().execute(); } private

Viewpager with circle and title indicator

浪尽此生 提交于 2020-01-06 08:26:20
问题 I'm using Viewpager and the Circle and Title view pager from JakeWharton The viewpager with the circle indicator is working fine, but while using the view pager with both circle and title indicator both indicators are not working. Here is a screenshow of the issue: So is it possible to use both indicators at the same time, and if so how can I do that? Also does anyone knows how can I style the title indicator? Right now it shows a blue line and no text.. Here is my code: adapter = new

Divider not working for TitlePageIndicator with viewpagerindicator & actionbarsherlock

半世苍凉 提交于 2020-01-03 08:06:30
问题 I noticed with the latest version of ViewPagerIndicator, ICS style dividers are supported, I tried to follow the issue and solution, but no matter what I do I can't get the divider to show up on my options on the actionbar for the TitlePageIndicator. I added the IcsLayout as the container, put divider, showDividers, and other properties, but am still getting nothing. Here's my layout (oddly enough, if I switch the IcsLayout to the viewpager indicator one, the app crashes): <com

customize padding and margin in IconPageIndicator

隐身守侯 提交于 2020-01-02 02:23:27
问题 I am trying to implement a custom IconPageIndicator - viewpager. I want to customize the margins and paddings of the icons displayed in com.viewpagerindicator.IconPageIndicator. So I wrote my custom IconPageIndicator and CustomLinearLayout. I changed the dividerPadding variable in CustomLinearLayout. Here is the code. But this doesn't seem to work. The margins and paddings are still the same. Any help? class CustomLinearLayout extends LinearLayout { private static final int[] LL = new int[] {

how to swipe only a portion of the layout

冷暖自知 提交于 2020-01-01 19:31:15
问题 I'm using ViewPagerIndicator Library by Jake Wharton and I'm trying to have the same browsing as Tinder and a lot of recent android apps(Talking about the starting screen)...I mean only the top part of the layout is swipeable, and a smaller part at the bottom shows Fb/Twitter/G+ login buttons. here is a screenshot of what I wish to have : http://i.imgur.com/QK91rBW.png I already read this Question, but I think it does not answer my need. Can you guys help me please ? 回答1: Well since you'll be

Indicate after swiping the last page in ViewPager

情到浓时终转凉″ 提交于 2020-01-01 15:59:10
问题 I have created a view pager with circle page indicator. Its working fine. Here is my new requirement : When i'am in last/first page and try to swipe for next/previous page, my screen should move at least 30% towards the swiped direction and come back to its original position as there are no more pages to navigate? Of course i have page indicators at top which tells where am i in available pages. I hope my requirement is clear. How can i achieve it ? Please help me. Thanks in advance. 回答1:

Android ViewPager Refresh fragment

邮差的信 提交于 2019-12-29 07:03:07
问题 In my app there's 2 tabs (Android Design Support Library) this is the Fragment with ViewPagerAdapter: public class ListaCanali extends Fragment { public static TabLayout tabLayout; public static ViewPager viewPager; public static int int_items = 2 ; @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View v =inflater.inflate(R.layout.lista_canali, container,false); //Titolo Fragment ((MainActivity) getActivity())