android-support-library

Fragment with ViewPager inside Fragment and FragmentStatePagerAdapter results in Exception (with complete example)

天涯浪子 提交于 2019-12-19 05:38:09
问题 I have a simple Fragment with a ViewPager. I'm using the up to date support library, v4 rev18! If I show the sub fragment the first time, everything works fine, if I go back and show it again, the app crashes with the following exception: I have a complete example which shows, WHEN the following exception is occuring: java.lang.NullPointerException at android.support.v4.app.FragmentManagerImpl.getFragment(FragmentManager.java:569) at android.support.v4.app.FragmentStatePagerAdapter

Import app compat dependency in all libraries

狂风中的少年 提交于 2019-12-19 04:53:27
问题 I have 2 modules in my application, I want to modify both of them to use AppCompat Widgets for which I have to extend them with same. The problem is that I do not want to add appcompat dependency to each of them, So how could I possibly add Dependency to both modules and my app. If I do add compile 'com.android.support:appcompat-v7:23.1.1' to every module, would it affect the application size? 回答1: Using compile 'com.android.support:appcompat-v7:23.1.1' in every module doesn't mean to add it

Android Status Bar transparent with Navigation Drawer - Appbar elevation

风流意气都作罢 提交于 2019-12-19 04:21:44
问题 I am working on an app with Material Design Guidelines. I have a boilerplate app created by Android Studio. For some reason the status bar has a little gradient at the bottom which creates an illusion of Appbar (Toolbar) being on a higher elevation than status bar. I took a look on Chris Bane's Cheesesquare app for reference and it doesn't look like he is doing anything special to achieve that. Here are the screenshots for reference - Boilerplate app Cheesesquare app Notice that Cheesesquare

Back button very slow

馋奶兔 提交于 2019-12-19 04:12:14
问题 I have an android app with a TabActivity holding 4 tabs - a list view, a map view, another list and a webview. From the list view I can tap an item and it starts another activity, pressing back returns to the tab activity. However, once the map view tab has been visited, navigating to the second activity from the list view and then pressing the back button results in a hang of about 3-4 seconds. Once the map view has been visited, this problem never goes away until the app is exited. Some

Android, Logcat gives error about SearchView class

限于喜欢 提交于 2019-12-19 03:44:23
问题 i have installed the support library to get the action bar worked also in android pre API 11 When i start the application, the logcat give this error: 08-20 19:54:41.600: I/dalvikvm(9828): Failed resolving Landroid/support/v7/widget/SearchView$5; interface 809 'Landroid/view/View$OnLayoutChangeListener;' 08-20 19:54:41.600: W/dalvikvm(9828): Link of class 'Landroid/support/v7/widget/SearchView$5;' failed 08-20 19:54:41.600: E/dalvikvm(9828): Could not find class 'android.support.v7.widget

Android AppCompat revision 21 force Holo theme

南笙酒味 提交于 2019-12-19 02:39:13
问题 in my project I was using appcompat-v7 (revision 20), and my project was targeting android API level 19 (KitKat), so I could use Holo theme. I accidentally updated "Android Support Library" to revision 21, so I had to change the target in manifest to API level 21 (Lollipop). Because of this, my app's default theme changed to Material (e.g. checkboxes are green). Is there a way to force using Holo theme again? Manifest.xml: <manifest xmlns:android="http://schemas.android.com/apk/res/android"

getAdapterPosition() not returning position of item in RecyclerView

和自甴很熟 提交于 2019-12-19 00:39:50
问题 This is a sort of follow-up or complement to this post. I am trying to get the position of an item in my RecyclerView, but none of the methods I have tried have worked. I called getAdapterPosition() in my PersonViewHolder constructor and assigned its value to the integer position, which is used in the UnitOneFragment class to do something accordingly (see onClick() method). But whatever that something is, it doesn't happen and my guess is because the getAdapterPosition() method doesn't work

Android - Renderscript Support Library - Error loading RS jni library

两盒软妹~` 提交于 2019-12-18 17:32:31
问题 I am trying to include the Renderscript support library into my project. I am getting the following error. android.support.v8.renderscript.RSRuntimeException: Error loading RS jni library: java.lang.UnsatisfiedLinkError: Couldn't load rsjni: findLibrary returned null I am not using any Renderscript jar files, I am attempting to use it via Gradle. Here are my Gradle.build files TOP LEVEL buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' }

Using buildToolsVersion 23 fails because Multiple dex files define 'AnimRes'

此生再无相见时 提交于 2019-12-18 14:57:08
问题 Before you claim DUPLICATE please read the question. This only occurs with the latest version of the build tools. Older versions do not display this problem. I've already tried the solutions offered on other questions here for multiple definitions of @AnimRes . None have helped so far, which is why I posted a new question. Same symptoms, different cause, different solution. I can build without problem when using buildToolsVersion 22.0.1 , but when I switch to buildToolsVersion 23 the build

How to add source + javadoc for android-support-v7?

China☆狼群 提交于 2019-12-18 12:49:42
问题 I added to my project support library android-support-v7-appcompat, but I can't add source and javadoc for it. I downloaded https://android.googlesource.com/platform/frameworks/support/+/master package with source and in Eclipse I set Source attachment to v7/appcompat/, but it doesn't work. Can someone help me? E: my solution is, I have two projects in Eclipse "android-support-v7-appcompat" (original lib from android-sdk\extras\android\support\v7\appcompat) and "android-support-v7-appcompat