android-support-library

Android App Crashes on FragmentTransaction.replace

杀马特。学长 韩版系。学妹 提交于 2019-12-12 16:51:46
问题 I'm attempting to create a dynamic UI using the support.v4 library to insert fragments into a framelayout I have defined for my main activity. Here is my activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" android:baselineAligned="false" > <LinearLayout android:layout_width="0dp" android:layout_height="fill

Compatibility for Java library methods that require Android API level 9?

蹲街弑〆低调 提交于 2019-12-12 16:16:20
问题 Some Java library methods like DecimalFormat.setRoundingMode have a @since 1.6 entry in their documentation. /** ... * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { ... } When I tried to use this method compiled under Android 4.2.2 and JDK 1.6 with my android:minSdkVersion set to 7 as shown, myNumberFormat.setRoundingMode(RoundingMode.DOWN); Android Lint underlined setRoundingMode in red for me and told me that Call requires API level 9 (current min is 7): java.text

How to implement more than 2 level navigation in com.android.support:leanback-v17

若如初见. 提交于 2019-12-12 15:11:27
问题 In regular android application I can use navigation drawer for navigate between top level views (sections of app) What should be used in tv apps? I see only possibility for two level of content organizing Categories -> Movies But in our app we have several sections (Live channels, On demand Movies, Recorded shows etc) with categories in most of them. Is it possible using standard android.support.v17.leanback.app.BrowseFragment and android.support.v17.leanback.app.DetailsFragment? 回答1: In

Crash in AlertDialog builder when android support library updated to 24

拥有回忆 提交于 2019-12-12 14:55:26
问题 The code was working fine before, but when I updated support library to 24, It crashes when displaying alert dialog. Couldn't find any help as it is updated recently. Code: AlertDialog.Builder builderSingle; builderSingle = new AlertDialog.Builder(mContext); //set buttons and title code builderSingle.show(); Logcat: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.internal.widget.DialogTitle" on path: DexPathList[[zip file "/data/app/com.abc-2/base.apk"]

Cannot cast to LayerDrawable anymore (after upgrading v7)

♀尐吖头ヾ 提交于 2019-12-12 12:33:12
问题 I'm using last version of the support libraries, 22.1.1. I used to go like: mRatingBar = (RatingBar) getActivity().findViewById(R.id.rating); LayerDrawable layer = (LayerDrawable) mRatingBar.getProgressDrawable(); but after upgrading it crashes at line 2 with a ClassCastException : android.support.v4.graphics.drawable.DrawableWrapperHoneycomb cannot be cast to android.graphics.drawable.LayerDrawable at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:973) at android

Cheesesquare: enterAlways produces wrong layout

笑着哭i 提交于 2019-12-12 11:14:32
问题 Adding enterAlways to the scroll flags of the Cheesesquare demo: <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:contentScrim="?attr/colorPrimary" app:layout_scrollFlags="scroll|exitUntilCollapsed|enterAlways"> results in a wrong layout: During scrolling down, the header comes in correctly but it doesn't stop in the correct position.

How to use android.support.transition.Transition/TransitionSet as a fragment shared element enter/return transition?

房东的猫 提交于 2019-12-12 11:04:52
问题 Google has just released android.support.transition package which provides backport to its transition-framework, which is really awesome. https://developer.android.com/reference/android/support/transition/package-summary.html Unfortunately, when trying to use the Transition/TransitionSet object from this package as a shared element for fragment transaction, the application fails on following error : E/AndroidRuntime: FATAL EXCEPTION: main Process: gregor.martin.loginregisteractivity, PID:

Where do I find android.support.v7.mediarouter.R$attr?

隐身守侯 提交于 2019-12-12 10:58:09
问题 Short version I'm getting an unhandled exception when instantiating an android.support.v7.app.MediaRouteButton object. I get: NoClassDefFoundError: android.support.v7.mediarouter.R$attr Where is this class? Or if it's auto-generated, how do I get it to auto-generate? Longer version I am following along with the tutorial for Android app development for chromecast found here: https://developers.google.com/cast/cast_2nd-screen_app_tutorial I am developing using the ADT bundled eclipse, on ubuntu

Workaround for Using Different Versions of Android Support Libraries

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 09:53:46
问题 This is in reference to a warning message appearing in build.gradle file: All com.android.support libraries must use the exact same version specification (mixing versions may lead to runtime crashes) I'm well aware of this and use identical versions in my own code / build. However this isn't the case when it comes to some 3rd party libraries that I use. Sometimes 3rd party libraries use older versions, and some other ones use newer versions - so updating your version of support libraries will

Android Support Toolbar: Resizing won't realign menu items

人盡茶涼 提交于 2019-12-12 09:43:15
问题 I try to resize the Android Support Toolbar of my Activity on orientation change as it is too big in landscape mode. It's not automatically resized as I'm using android:configChanges="orientation|screenSize" on my activity and thus the activity won't be recreated. The toolbar XML is like this: <android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/my_awesome_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize