android-support-library

Renderscript via the support library

巧了我就是萌 提交于 2019-12-12 07:14:53
问题 Seems to me that android has an android.support.v8 package that contains Renderscript support. The thing is, this doesn't seem documented anywhere - the support library docs don't say anything about a v8 package, just v4 and v13. Is that package supported on all devices with API level 8 and above and can it be safely used in production? 回答1: PSA for Googlers: RenderScript is now part of the Android Support Library. You can use it on Android 2.2+. 回答2: Its not yet production quality. 回答3: My

Android: TabLayout indocator hanging between tabs

时光怂恿深爱的人放手 提交于 2019-12-12 05:44:12
问题 I'm using android support library (23.1.1) to create a tab layout. I followed the tutorial here, it uses AppCompatActivity. The problem is that the indicator of the TabLayout is handing between the two tabs and not moving smoothly when swiping. When searching for a solution I found similar problem that the indicator bounces between tabs, and its solution was to use newer version of the library. I'm using the latest version and facing this problem. 回答1: Get the SlidingTabStrip file here -

Add local android support library to a gradle build without using SDK Deployer to add to mavenLocal

一个人想着一个人 提交于 2019-12-12 04:43:32
问题 I'm having trouble figuring out how to add android support library to a gradle build, without using SDK Deployer to add the library to mavenLocal . The main problem is how to configure the build to use the location on a local file system to resolve support library dependencies specified in the build file. 回答1: Figured this out. In case anyone else is trying to do the same, you need to add the local support library location to the gradle build repositories configuration in your build.gradle

VectorDrawable to Bitmap: Bitmap.setHasAlpha(boolean)' on a null object reference

自作多情 提交于 2019-12-12 04:31:48
问题 I'm trying to get Bitmap from VectorDrawable (xml image): VectorDrawable vectorDrawable = (VectorDrawable) ContextCompat.getDrawable(mContext, R.drawable.test); Bitmap bitmap = UtilMethods.getBitmapFromVector(vectorDrawable); But app crashes on Bitmap.createBitmap method with Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Bitmap.setHasAlpha(boolean)' on a null object reference error public static Bitmap getBitmapFromVector(VectorDrawable

TextInputLayout & TextInputEditText hint

耗尽温柔 提交于 2019-12-12 03:53:12
问题 This is my xml code to make a input text for user phone number but when it unfocused the hint label showed with larger text size my question is how to make the hint label activated like password even when there is no text in the field. <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:textColorHint="@color/colorText"> <android.support.design.widget.TextInputEditText android:layout_width="match_parent" android:layout

How to set the about page library in android studio

落花浮王杯 提交于 2019-12-12 03:46:04
问题 I am trying to set the about page library with compile 'com.github.medyo:android-about-page:1.0.2' But I am getting a run time error I have set as it is given in the github here is my java code: import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import mehdi.sakout.aboutpage.AboutPage; import mehdi.sakout.aboutpage.Element; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) {

Calling SupportFragmentManager from PauseHandler implementation

对着背影说爱祢 提交于 2019-12-12 03:16:45
问题 I am trying to implement the PauseHandler described here: https://stackoverflow.com/a/8122789/1977132 My activity is an ActionBarActivity, the code in the processMessage method which brings up a dialog gives the error Cannot resolve method 'getSupportFragmentManager' Following the suggestion here: https://stackoverflow.com/a/27425568/1977132 I tried to change it to getFragmentManager() but then I get the error Cannot resolve method 'show(android.app.FragmentManager(), java.lang.String' I have

Vectors throwing Resources$NotFoundException after updating support library from 23.v to 24.v

天大地大妈咪最大 提交于 2019-12-12 03:04:35
问题 Everything was working fine while on support lib 23 but after updating support lib to ver 24, i am getting crash exceptions on pre-lollipop devices for layer-list which have vector drawable in them which ultimately leads to Resources$NotFoundException. Any idea why? FYI, everything else is working fine, eg. vector in imageview, runtime vector drawable usage and yes i have configured gradle properly. Adding stack trace for better understanding. Fatal Exception: java.lang.RuntimeException:

Unmarshalling unknown type code 6881391 at offset 4752 After Upgrading to Support Libraries 23.2.0

。_饼干妹妹 提交于 2019-12-12 02:49:33
问题 My app has been working well at Support Libraries 23.1.1. However, after upgrading to Support Libraries 23.2.0, it starts to crash. The crash happens when I navigate from an activity back to the main activity (for example, I open the about activity from main activity's actionbar menu, then press back button to go back to main activity, then it crashes). The crash log is here: FATAL EXCEPTION: main Process: com.myapp.blah.blah, PID: 22124 java.lang.RuntimeException: Unable to start activity

Android: Proguard error in eclipse

冷暖自知 提交于 2019-12-11 23:22:11
问题 I am trying to built the signed apk of my app. But i am getting the error pop up as Proguard returned with error code 1. See console And error log in console as : [2016-04-15 11:36:44 - MyApp] Proguard returned with error code 1. See console [2016-04-15 11:36:44 - MyApp] Note: there were 85 duplicate class definitions. [2016-04-15 11:36:44 - MyApp] Warning: org.acra.ErrorReporter: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang