android-api-levels

android gridlayout not showing in emulator API 22

旧城冷巷雨未停 提交于 2019-12-23 22:37:45
问题 I have an app that functions exactly as desired on an actual device Nexus 6P running API 23 and an emulated 6P, 5 & 4 running API 24, but is showing odd behaviour wrt GridLayout on emulated Nexus 5 & 4 running API 22. The app only has a single activity with multiple RelativeLayout s that are programmatically set .VISIBLE & .INVISIBLE . In one such RelativeLayout I have 2 GridLayout s as follows. When emulating API 22, the bottom GridLayout does not show but the top one always does

why android ndk standalone toolchain do not support arm64 with api 19 but android ndk cmake does

╄→гoц情女王★ 提交于 2019-12-23 19:21:09
问题 I used to build arm64-v8a lib of api level 19 use android.toolchain.cmake comes with Android NDK r16b like this. ${CMAKE} \ -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \ -DANDROID_NDK=$ANDROID_NDK_HOME \ -DANDROID_ABI="arm64-v8a" \ -DANDROID_NATIVE_API_LEVEL="android-19" \ -DANDROID_STL="c++_shared" \ -DANDROID_CPP_FEATURES="rtti exceptions" \ .. Now i want to pack my lib use conan which cross compile android lib use standalone toolchain. Its seems to be impossible to make standalone toolchain

Android - Tinting ProgressBar on pre-Lollipop devices

坚强是说给别人听的谎言 提交于 2019-12-18 15:24:51
问题 My app's minimum API-level is 19 (KitKat), and contains a layout with a horizontal ProgressBar . I'm using android:progressTint attribute to tint the bar to a custom color. It works pretty well on Lollipop (API 21) and above, but below (for example on API 19) it doesn't; it shows up in a different color. The reason is that this attribute is only used in API level 21 and higher as Android Studio states. So I'm wondering what can be a good alternative for tinting the ProgressBar on pre-Lollipop

Environment.getExternalStorageDirectory() deprecated in API level 29 java

假装没事ソ 提交于 2019-12-18 14:56:20
问题 Working on android Java, recently updated SDK to API level 29 now there is a warning shown which states that Environment.getExternalStorageDirectory() is deprecated in API level 29 My code is private void saveImage() { if (requestPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) { final String folderPath = Environment.getExternalStorageDirectory() + "/PhotoEditors"; File folder = new File(folderPath); if (!folder.exists()) { File wallpaperDirectory = new File(folderPath);

Environment.getExternalStorageDirectory() deprecated in API level 29 java

谁都会走 提交于 2019-12-18 14:56:17
问题 Working on android Java, recently updated SDK to API level 29 now there is a warning shown which states that Environment.getExternalStorageDirectory() is deprecated in API level 29 My code is private void saveImage() { if (requestPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) { final String folderPath = Environment.getExternalStorageDirectory() + "/PhotoEditors"; File folder = new File(folderPath); if (!folder.exists()) { File wallpaperDirectory = new File(folderPath);

Pick up the Android version in the browser by Javascript

三世轮回 提交于 2019-12-17 10:10:19
问题 I'm building a web app and wanting to disable transitions effects on Android devices under version 3.0. Is there anyway to pick up the Android version number by Javascript in the browser? If so how? 回答1: function getAndroidVersion(ua) { ua = (ua || navigator.userAgent).toLowerCase(); var match = ua.match(/android\s([0-9\.]*)/i); return match ? match[1] : undefined; }; getAndroidVersion(); //"4.2.1" parseInt(getAndroidVersion(), 10); //4 parseFloat(getAndroidVersion()); //4.2 回答2: Use below

Get Android API level of phone currently running my application [duplicate]

大兔子大兔子 提交于 2019-12-17 02:40:10
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Programmatically obtain the Android API level of a device? How do I get the Api level of the phone curently running my application? I am sure its simple but I can not find it as all my searches bring up tons of junk. 回答1: Check android.os.Build.VERSION, which is a static class that holds various pieces of information about the Android OS a system is running. If you care about all versions possible (back to

List of Android permissions normal permissions and dangerous permissions in API 23? [duplicate]

时光怂恿深爱的人放手 提交于 2019-12-16 22:35:27
问题 This question already has answers here : Android permission doesn't work even if I have declared it (13 answers) Closed last year . Which permissions need for requesting permissions at run time of API 23? 回答1: As of API level 23, the following permissions are classified as PROTECTION_NORMAL: ACCESS_LOCATION_EXTRA_COMMANDS ACCESS_NETWORK_STATE ACCESS_NOTIFICATION_POLICY ACCESS_WIFI_STATE BLUETOOTH BLUETOOTH_ADMIN BROADCAST_STICKY CHANGE_NETWORK_STATE CHANGE_WIFI_MULTICAST_STATE CHANGE_WIFI

Default Style Resource pre API Level 21

佐手、 提交于 2019-12-12 04:23:37
问题 I am looking to create a custom ViewGroup to be used in a library; which contains a few ImageButton objects. I would like to be able to apply a style each ImageButton ; but I cannot figure out how to apply a style programmatically other than by applying a attribute resource to the defStyleAttr parameter; like so: mImageButton = new ImageButton( getContext(), // context null, // attrs R.attr.customImageButtonStyle); // defStyleAttr The issue with this is that the only way to change the style

Newbie Android Error: java.lang.NoClassDefFoundError: android.content.ClipboardManager

放肆的年华 提交于 2019-12-11 03:17:00
问题 In my Android app, I happen to use the following code to copy text from a TextView. buttonCopy.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String copyText; copyText = textBox2.getText().toString(); myClip = ClipData.newPlainText("text", copyText); myClipboard.setPrimaryClip(myClip); Toast.makeText(getApplicationContext(), "Copied", Toast.LENGTH_SHORT).show(); } }); The minimum API level that I set for my app is API level 10. But I understand that