armcha / LuseenBottomNavigation

BottomNavigationView Designed according Google guideLine
1.01k stars 180 forks source link

Android4.2 #19

Open TheMrCoder opened 8 years ago

TheMrCoder commented 8 years ago

it works well on Android 5.0 but failed on Android 4.2(un show)。i don't know why,could anyone give me a hand ,thanks very much!

fg2q1q3q commented 8 years ago

the same with you,4.2 failed!

dmytroKarataiev commented 8 years ago

Can confirm, Galaxy s4 API 17 doesn't work with this library.

MR-Syn commented 7 years ago

So, min SDK is not 15 as written on Android Arsenal, but 18 instead? Thanks

ChristopheVersieux commented 6 years ago

Works on API 15, but not 17. so MinSDK is not an issue.

dmytroKarataiev commented 6 years ago

I've made some changes locally a long time ago to fix this. Can you post a stacktrace so I'll find the fix and post a PR?

ChristopheVersieux commented 6 years ago

For me, issue is only in tablet mode, working fine on phone mode (app:bnv_tablet="true")

You can try in the emulator, nothing in logcat.

API 15: OK API 17: NOT OK Every other API: OK

Layout:

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     xmlns:ads="http://schemas.android.com/apk/res-auto"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:baselineAligned="false"
     android:id="@+id/root"
     android:fitsSystemWindows="true"
     android:orientation="horizontal">

     <LinearLayout
         android:layout_width="320dp"
         android:layout_height="wrap_content"
          android:gravity="center"
         android:orientation="vertical" >

         <com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView
             android:id="@+id/bottomNavigation"
             android:layout_width="wrap_content"
             android:layout_height="0dp"
             android:layout_weight="1"
             app:bnv_tablet="true"
             app:bnv_active_text_size="@dimen/bottom_navigation_text_size_inactive"/>

         <com.google.android.gms.ads.AdView
             android:id="@+id/adView"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             ads:adSize="BANNER"
             ads:adUnitId="@string/banner_ad_unit_id" />
     </LinearLayout>

     <FrameLayout
         android:id="@+id/content_frame"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_margin="@dimen/multipane_half_padding" />
 </LinearLayout>
ChristopheVersieux commented 6 years ago

New finding: Do not display issue on API 17 is caused by: android:layout_width="wrap_content" (for tablet mode) android:layout_width="Somethingdp" is fine.