nshmura / recyclertablayout Goto Github PK
View Code? Open in Web Editor NEWAn efficient TabLayout library implemented with RecyclerView.
License: Apache License 2.0
An efficient TabLayout library implemented with RecyclerView.
License: Apache License 2.0
Plz help me
where is the asset/color.json ?
Hi,
While swiping left page title color's looks wrong.
I have following the example of customview01 by using the this DemoCustomView01Activity.class
then in adapter DemoCustomView01Adapter which I used picasso to load image by
Picasso.with(context).load(item.getUrl()).into(holder.image); I think will load image into imageview.
But the result it was not..anybody can help me about this one please
06-29 10:47:50.354 23962-23962/cn.com.kpcq.xunjian.jinan E/CrashHandler: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/internal/widget/TintManager;
at com.nshmura.recyclertablayout.RecyclerTabLayout$DefaultAdapter.onCreateViewHolder(RecyclerTabLayout.java:479)
at com.nshmura.recyclertablayout.RecyclerTabLayout$DefaultAdapter.onCreateViewHolder(RecyclerTabLayout.java:435)
line 479
if (mTabBackgroundResId != 0) {
tabTextView.setBackgroundDrawable(
479 TintManager.getDrawable(tabTextView.getContext(), mTabBackgroundResId));
}
Hi. I have tried to change text size of each tab. How can I chance it?.
Here my code. I thought I can set it through "tabTextAppearance". But it did not affect :(
android:id="@+id/home_screen_recycler_tab_layout"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/engly_light_purple"
app:rtl_tabIndicatorColor="@color/subtitle_dark_purple"
app:rtl_tabIndicatorHeight="50dp"
app:rtl_tabSelectedTextColor="@color/white"
app:rtl_tabTextAppearance="@dimen/home_screen_home_catagories"
Is it possible to change Tab Text's Typeface?
How can i make adapter to load Another fragment ?
Attempt to invoke virtual method 'int gs.c()' on a null object reference
at com.nshmura.recyclertablayout.RecyclerTabLayout$DefaultAdapter.getItemCount(RecyclerTabLayout.java:544)
Please provide solution..
可以动态添加Tab,滑动Tab
android.view.InflateException: Binary XML file line #19: Binary XML file line #19: Error inflating class com.nshmura.recyclertablayout.RecyclerTabLayout
Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class com.nshmura.recyclertablayout.RecyclerTabLayout
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:647)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.hyphenate.chatuidemo.ui.PacketsFragment.onCreateView(PacketsFragment.java:50)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2343)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:794)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3221)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3171)
at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:192)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:552)
at com.hyphenate.chatuidemo.ui.BaseActivity.onStart(BaseActivity.java:36)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)
at android.app.Activity.performStart(Activity.java:7157)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2937)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 2: TypedValue{t=0x2/d=0x7f03004d a=4}
at android.content.res.TypedArray.getColor(TypedArray.java:477)
at com.nshmura.recyclertablayout.RecyclerTabLayout.getAttributes(RecyclerTabLayout.java:101)
at com.nshmura.recyclertablayout.RecyclerTabLayout.(RecyclerTabLayout.java:85)
at com.nshmura.recyclertablayout.RecyclerTabLayout.(RecyclerTabLayout.java:78)
the line 19 is "<com.nshmura.recyclertablayout.RecyclerTabLayout"
First of thanks for useful Widget!!!
I have a problem, after setting app:rtl_tabBackground="@color/darkRed"
indicator disapears. Before setting tabBackground all works Perfectly.
Do i miss something in readme?
because of your gradle build different and i don not know how to configure it ,
at last , i create new project with gradle denpendice and copy the demo code ...
I want to send tablayout's current position to recyclerview in recyclertablayout but instantiateItem doesn't give current position.
Best regards
i set color from xml: rtl_tabSelectedTextColor="@android:color/white", but selected tab color always is black
I am getting this warning , may be you want to look at it
W/View: requestLayout() improperly called by com.nshmura.recyclertablayout.RecyclerTabLayout{10a88d34 VFED.... ......ID 30,0-1050,144 #7f0e0093 app:id/recycler_tab_layout} during layout: running second layout pass
Android SDK : 24.0.1
how to set all Infinite selected tab?
currently just indicator one item.
i need indicator all the same tab item
I don't know if it's possible, but I have some ideas. ;-)
How about to add badges to tablayout or make the tablayout/viewpager not swipeable,...
tab多行文本,怎么设置,字体大小不一样
The recent version doesnt work well with the FragmentStateAdapter
.. it was working fine in 1.1.0 . Some thing has changed . Our app has infinite loop logic in place and is working with 1.1.0. When we upgrade to 1.5.0 ,No matter how you set the currentItem()
the first tab always appears on the first position instead of being centered and wont display any fragment content. I checked the demo code and it is same as mine except the demo is presented with PageAdapter
. Is there any one facing this issue or figured the root issue ?
Excuse me,If i want to set the tab item with same width ,how to solve it ?
If you set current pager item that is outside TabLayout (selectedView == null), tabs dont scroll to that item position. This happens when using 23.3.0 support library and only at view initialization. Once you move pager, tabs jump to the correct position.
Support Library 23.3.0 LinearLayoutManager has a new feature called setAutoMeasureEnabled which is default enabled. This seems to cause this issue on init.
The solution is to set it to false in the RecyclerTabLayout constructor when setting LinearLayoutManager.
/.../
mIndicatorPaint = new Paint();
mLinearLayoutManager = new LinearLayoutManager(getContext());
mLinearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
mLinearLayoutManager.setAutoMeasureEnabled(false);
setLayoutManager(mLinearLayoutManager);
setItemAnimator(null);
/.../
Hello, I'm using this infinite loop demo. And I want to change unselected tab text color. I know that there is an attribute called "rtl_tabSelectedTextColor". Is there something to achieve this?
hi, thanks for your great library
can you add rtl support to this library ?
everything is ok, but Indicator moves reverse .
Initial tab position (use getCenterPosition() ) works fine,
but initial tab indicator is wrong, indicates previous one.
with RecyclerTabLayout v1.3.0 and FragmentStatePagerAdapter.
( v1.2.0 or previous versions, works fine)
Thanks.
On the android4.4.4 system, the default font color set on the style file is invalid
How to set different tabwidth for every Tab.
i think textview style lines = 1 or singleLine =true ,can it?
I currently use the loop method to infinitely scroll through tabs. It all works fine when I switch between fragments when swiping the viewpager itself, however, when I switch from the last to the first tab or the last to the previous tab by clicking on the tabs in the RecyclerTabLayout, some lag occurs.
I want to set textAllCaps = false i tried to set it in style but its not working because it is already set to true in your style
Sometimes when I change position of ViewPager I see that current tab at RecyclerTabLayout stay the same. I've figure out after some debugging where is problem.
See at method updateCurrentIndicatorPosition
. This method don't change adapter's indicatorPosition
if dx
is 0. So RecyclerTabLayout
's position and ViewPager
's position do not match.
I have a RecyclerTabLayout with only two tabs and texts not too long. I'd like to know if it's possible to center-align tabs, since right now they appear left aligned
TintManager was removed which breaks RecyclerTabLayout.
Hi, see bug in video: https://www.dropbox.com/s/jrl7ttava4hr5l0/recyclertablayout_bug.mp4?dl=0
version 1.1.0 not have this bug
hi,
i want to custom viewPager each other , could you explain for me??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.