gilgoldzweig / easytabs Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://gilgoldzweig.github.io/EasyTabs/
License: MIT License
Home Page: https://gilgoldzweig.github.io/EasyTabs/
License: MIT License
hi
i found a bug when setting current page of viewpager programatically.
i have this piece of code:
`EasyTabsBuilder.with(mTabs)
.addTabs(tabsArray)
.setTabLayoutScrollable(true)
.Build();
mTabs.getViewPager().setCurrentItem(tabToSelect);`
the content is fine, it shows the tabToSelect
fragment. however the tablayout is not scrolling and still showing original position.
notice that the content says "10" - thats the content for tab number 10, but the tab layout is still in the initial position
I am using EasyTabs in two different fragments, say Frag1 and Frag2. When I switch between Frag1 and Frag2 by selecting an option from navigation drawer, I see fragments which I have added to EasyTabs of Frag1 in Frag2.
On debugging, I found that the FragmentManager holds 'active' and 'added' fragments of the old fragment Frag1 even when I switched to Frag2.
NOTE: While starting the application for the first time, Frag1 loads perfectly with its fragments for each tab. Issue occurs when I want to switch from Frag1 to Frag2.
What am I missing here?
Hello.
I have been using EasyTabs for quite a while now and it truly is a great work. But recently I have used it in a fragment, but the problem is that whenever I switch to other fragments and then come back to the fragment containing the tabs, the tabs just disappears along with whatever were in them. It is just blank. What can I do to resolve this? Please respond as soon as possible.
Thank you!!
Hey, How to change Tab text sizes? I have defined the style with custom size and set test app:tabTextAppearance to this view but size remains same, can you please help?
Is there any method I can send the user to a certain position?
Hi!
Pls screenshot or video.
I import the library to my app by gradle.
I got this building error :
"Manifest merger failed : Attribute application@allowBackup value=(false)".
I think you should remove allowBackup attribute from your library. (Lib should not have that attribute).
Thank you very much for the great lib.
@gilgoldzweig
Looks like a great library, setup tabs without adapter code in no time, Although I m unable to use it.
Here is my xml layout
<?xml version="1.0" encoding="utf-8"?>
<nl.psdcompany.duonavigationdrawer.views.DuoDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="coutloot.businessmanager.departments.inventory.inventory_home">
<nl.psdcompany.duonavigationdrawer.views.DuoMenuView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:tag="@string/tag_menu" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:tag="@string/tag_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</android.support.v7.widget.Toolbar>
<goldzweigapps.tabs.View.EasyTabs
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
</nl.psdcompany.duonavigationdrawer.views.DuoDrawerLayout>
here is error which m getting for nothing written in my java class
FATAL EXCEPTION: main
Process: coutloot.businessmanager, PID: 28364
java.lang.RuntimeException: Unable to start activity ComponentInfo{coutloot.businessmanager/coutloot.businessmanager.departments.inventory.inventory_home}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class goldzweigapps.tabs.View.EasyTabs
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2449)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class goldzweigapps.tabs.View.EasyTabs
at android.view.LayoutInflater.inflate(LayoutInflater.java:543)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at coutloot.businessmanager.departments.inventory.inventory_home.onCreate(inventory_home.java:24)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class goldzweigapps.tabs.View.EasyTabs
at android.view.LayoutInflater.createView(LayoutInflater.java:649)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:768)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:842)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at coutloot.businessmanager.departments.inventory.inventory_home.onCreate(inventory_home.java:24)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:623)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:768)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:842)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at coutloot.businessmanager.departments.inventory.inventory_home.onCreate(inventory_home.java:24)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.ClassCastException: goldzweigapps.tabs.View.EasyTabs cannot be cast to android.support.design.widget.TabLayout
at goldzweigapps.tabs.View.EasyTabs.<init>(EasyTabs.java:35)
at java.lang.reflect.Constructor.newInstance(Native Method)
Create a custome view instead of extending tab layout and view pager
the title may be a bit misleading... the bug is actually in the class FragmentPagerAdapter
which you extend. this class has a bug where sometimes the ViewPager will display old fragments with old information.
luckily there is a very easy solution for this:
instead of extending FragmentPagerAdapter
, you need to extend FragmentStatePagerAdapter
currently i have copied a few of the library classes to my own project so i can make that change.
please apply this fix at the library level.
hi.
trying to use this library but i get error:
Error:(48, 13) Failed to resolve: tech.goldzweigapps:EasyTabs:1.1
here is my gradle file:
`apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "or_dvir.hotmail.com.githubbrowser"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
android.packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/asl2.0'
exclude 'META-INF/asl2.0.txt'
}
repositories { maven { url "https://jitpack.io" } }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
compile 'com.octo.android.robospice:robospice:1.4.14'
compile 'com.octo.android.robospice:robospice-spring-android:1.4.14'
compile 'com.android.support:design:25.0.0'
compile 'tech.goldzweigapps:EasyTabs:1.1'
}
`
I don't think I need to say much.
I would like to be able to maximise a tab and have it fill the whole screen, as I am making a web browser.
thanks.
please add to the readme file that setting setTabLayoutScrollable(true)
means that tabs will NOT be distributed evenly. (and if set to false
, then they will be)
see title
Hi, How can i recreate my fragment or update it?
Enabling icon fading only support up to 15 icons
I'm trying to use FragmentTransaction#replace
on one tab created by EasyTabs, but I can't make it work. Right now, I am able to create the desired Fragment above the Fragment create by EasyTabs using this code, where R.id.easytabs_host
is the view id of the EasyTabs component in the layout:
final FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.replace(R.id.easytabs_host, resultFragment).addToBackStack(null).commit();
What's the containerViewId
I should use to make it work?
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.