onShowFileChooser() from android webview works only once

firstly, sorry to my english. you should return empty Uri[]{} to file receive mUploadMessageForAndroid5.onReceiveValue(new Uri[]{}); my code can choose take photo or local image: private static final int REQUEST_GET_THE_THUMBNAIL = 4000; private static final long ANIMATION_DURATION = 200; public final static int FILECHOOSER_RESULTCODE = 1; public final static int FILECHOOSER_RESULTCODE_FOR_ANDROID_5 = 2; //JS webView.getSettings().setJavaScriptEnabled(true); //set … Read more

Status Bar Color not showing – 5.0 Lollipop Android Studio: (AppCompat-v7:r21)

Please read this: For this to take effect, the window must be drawing the system bar backgrounds with android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS but android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS must not be set (Source) In case of you don’t know how to add that flag: getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);

How to mimic the Material-design raised button style, even for pre-Lollipop (minus the special effects)?

Updated Answer: It is recommended that you rely on Google’s appcompat library to backport material design styles to your app. It seems to no longer backport the raised button (instead using flat buttons), but still adequately backports a button that matches the material design style. It is my recommendation that you go with this approach. … Read more

android:Theme.Material.Light requires API level 21 (current min is 8)

For this you need to have 2 values folders. One that exists by default, and another, you have to create in your res folder and name it values-v21. In the default values folder, in styles.xml, use a theme other than Material theme. And in the styles.xml of values-v21 folder that you created, use Material theme. … Read more

Datepicker dialog without calendar visualization in lollipop [spinner mode]?

DatePickerDialog uses the dialog theme specified by your activity theme. This is a fully-specified theme, which means you need to re-specify any attributes — such as the date picker style — that you’ve set in your activity theme. <style name=”MyAppTheme” parent=”android:Theme.Material”> <item name=”android:dialogTheme”>@style/MyDialogTheme</item> <item name=”android:datePickerStyle”>@style/MyDatePicker</item> </style> <style name=”MyDialogTheme” parent=”android:Theme.Material.Dialog”> <item name=”android:datePickerStyle”>@style/MyDatePicker</item> </style> <style name=”MyDatePicker” parent=”android:Widget.Material.DatePicker”> … Read more

Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version L declared in library com.android.support:appcompat-v7:21.0.0-rc1

compileSdkVersion ‘android-L’ BOOM. Done. LAST EDIT: As of Android 5.0 release, this is no longer an issue, just target API level 21 directly. Edit for clarity: Indeed as David_E specified below, this solution only works for L version, if you try to deploy the app on a device below L (ex <=4.4.4) it will complain … Read more

How to change the color of overscroll edge and overscroll glow

The overscroll glow color inherits the primary color value set by android:colorPrimary in your entire app. But If you need to specify different value simply use android:colorEdgeEffect (only available for API 21 and above). <style name=”MyAppTheme” parent=”…”> <item name=”android:colorEdgeEffect”>@color/my_color</item> </style>

AppCompat v7 Toolbar onOptionsItemSelected not called

I know this question has been answered but I found the real cause of the problem after 2 days of frustration. Take a look at the ActionBarDrawerToggle documentation: https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.html Notice the two constructors there. My mistake was that I was using the second constructor that was taking a toolbar as a parameter. It took me … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)