android-support-library

Is TabLayout supposed to replace PagerTabStrip? Is there any “pro” to PagerTabStrip?

☆樱花仙子☆ 提交于 2019-12-04 16:31:29
OK, so I see PagerTabStrip has a bug - https://code.google.com/p/android/issues/detail?id=183127 Therefore, is TabLayout a better choice especially for now? Is there any downside to TabLayout? Some quirkiness where you might have to set all 3 items? I see TabLayout versus pagerTabStrip for convenience and functionality but that didn't really get answers... 来源: https://stackoverflow.com/questions/32770917/is-tablayout-supposed-to-replace-pagertabstrip-is-there-any-pro-to-pagertabst

Android recylerview v.23.2.0 & design library v.23.2.0 are broken

一笑奈何 提交于 2019-12-04 16:11:52
问题 After update to v23.2.0 recyclerview items have strange behavior: very big with empty space. After update to design library 23.2.0 menu overflow icon became black (app has dark action bar). UPDATE On my nexus 5 overflow icon & recycler view row are fixed, but on Galaxy Tab 4 overflow icon is still black. UPDATE 2 If you have problems with empty spacing, fix layout parameters for your views (match_parent -> wrap_content), cause RecyclerView will now size itself based on the size of its

attribute insetForeground has already be defined

大城市里の小女人 提交于 2019-12-04 16:03:42
问题 after updating to the new com.android.support:design:22.2.0 I got this error: "attribute insetForeground has already be defined" keep in mind that i'm using @romannurik ScrimInsetsFrameLayout.java 回答1: just change insetForeground attribute in your attrs.xml to a different name 回答2: To elaborate on Omar's answer, The Android design support library introduced NavigationDrawer that is used together with DrawerLayout to provide means of implementing navigation etc. See here: Android Design

Android Swipe View with Tabs Without Using the V4 support library

坚强是说给别人听的谎言 提交于 2019-12-04 15:26:41
问题 I've created a swipe view with tabs as described in the android documentation several times before. In fact, stepping through the Eclipse project wizard pretty much sets you up with the basic ui using a ViewPager. My question is this: The application I'm building will only be supporting as far back as Android 4.0 (API level 14). So, I was considering ditching the support package altogether. However, I couldn't seem to find an example of a Swipe View with Tabs not using the ViewPager (which is

cannot access DialogStyle

青春壹個敷衍的年華 提交于 2019-12-04 15:22:39
问题 After updating android-support library to 22.2.0 project stopped compiling. error: cannot access DialogStyle class file for android.support.v4.app.DialogFragment$DialogStyle not found Consult the following stack trace for details. com.sun.tools.javac.code.Symbol$CompletionFailure: class file for android.support.v4.app.DialogFragment$DialogStyle not found Can't find how to work around this issue. Previously used version was 22.1.1 回答1: Try this, it resolved my issue: compile ('com.android

java.lang.NoSuchFieldError: android.support.v7.appcompat

谁说我不能喝 提交于 2019-12-04 13:53:44
问题 I updated my support library from r20 to r21, now when I run my app I get this error in super.onCreate of my main activity : java.lang.NoSuchFieldError: android.support.v7.appcompat.R$styleable.Theme_windowActionBar at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:145) at android.support.v7.app.ActionBarActivityDelegateBase.onCreate(ActionBarActivityDelegateBase.java:139) at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:123

Toolbar button gravity for extended toolbar

丶灬走出姿态 提交于 2019-12-04 13:42:36
问题 Im trying to set the position of my back navigation icon in my extended toolbar as follows: <android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" app:theme="@style/Toolbar" android:minHeight="@dimen/action_bar_height" app:buttonGravity="top" android:gravity="top" android:background="?attr/colorPrimary" />

ListView: Prevent a view from recycling

删除回忆录丶 提交于 2019-12-04 13:01:24
问题 I have a ListView wich use recycled views. I'm trying to prevent a view from recycle. So I use setHasTransientState: android.support.v4.view.ViewCompatJB.setHasTransientState(View view, boolean hasTransientState) It works very well on Jellybean version but it doesn't do anything on Api < 16. Is there a way to make it work or there is different approach for pre Jellybean ? I found out how to set a RecyclerListener like @Daniel Chow suggested. listView.setRecyclerListener(new RecyclerListener()

Android viewpager: weird bug when adding/removing page

南笙酒味 提交于 2019-12-04 12:59:28
I dont know how to explain this, so i uploaded a video in Youtube. Everything works fine when i am adding pages. Also removing page works if i start at the end of the list and move progressively to the first page, but if i remove somewhere between 0-end and after that i add page, i am getting a blank page. Fragment is created but view is not. Is there something wrong with my code? Yes, i have seen this question, returning POSITION_NONE is not an option, because application i am working on downloads content from web and displays it in listview, so recreating fragments everytime when user

Toolbar : overflow menu button always showing

对着背影说爱祢 提交于 2019-12-04 12:51:06
问题 Problem : after updating the support library and using Toolbars, the overflow menu button is always showing on devices with and without hardware menu button What I Need : I want the overflow menu button to show only when the device has no hardware menu button menu.xml <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" > <item android:id="@+id/action_settings" app:showAsAction="never" android:title="@string/action_settings"/>