android-emulator

How to add another layout number of time to my already created LinerLayout?

北城余情 提交于 2019-12-22 01:00:42
问题 Here is my Prent layout (main.xml) <!-- ============================================================ --> <!-- All Employees are added here (added and More then one) --> <!-- ============================================================ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myLayout" android:orientation="vertical" android:layout_gravity="center_vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android

Android Emulator Stuck With Black Screen

风格不统一 提交于 2019-12-21 23:22:35
问题 I'm just new with Android Development, and running the default blank project. I have Android Studio 2.1.2. The problem is the emulator stuck with the black screen although HAXM works well: "HAX is working and emulator runs in fast virt mode" Most solutions suggest to uncheck "use host gpu" in AVD Manager, yet it seems this feature no longer appear in the new version of Android Studio. I run macOS El Capitan. 回答1: After an update to Android Studio this weekend (maybe Gradle?), the AVD emulator

Change buttons' order of DatePickerDialog for Android 4.0.3

99封情书 提交于 2019-12-21 23:09:45
问题 I created an DatePickerDialog : DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), this, year, month, day); and show it On Android 4.0.3 (API 15) device, it looks like this: As you see above, the " cancel " button is displaying on the left-hand side while the " Set " button is on the right-hand side. But on Android 2.3.3, the button order is the other way around. So, how can I change the buttons' order of DatePickerDialog in order to show " Set " button on left-hand side,

Create a socket in android code(not in android application) getting Permission Denied

巧了我就是萌 提交于 2019-12-21 21:29:09
问题 I am trying to open a socket in the android source code. Specifically, right now, I am in the DisplayDevice.cpp file, but the location of the socket code may change. Right now after I do: int fd = socket(AF_INET, SOCK_STREAM, 0); fd gets returned as -1, and when i check the error message it is listed as Permission Denied. I have looked around a lot for this, most answers involve adding the internet permission to the AndroidManifest file. This will not work for me as the code I am adding is

Run apk on android emulator

蓝咒 提交于 2019-12-21 20:49:11
问题 I want to run APK on android emulator and I followed next steps: Copied apk to platform-tools directory Run cmd.exe as administrator Navigated to the platform-tools directory Run emulator from AVD manager In command line entered adb devices (it showed my emulator in list) I entered adb insall name.apk in command line after this I got message as below: I found this link how to run APK on emulator. And other tutorial also show how it works. In case when we entered adb install after few seconds

Preventing “flickering” when calling Drawable.draw()

只愿长相守 提交于 2019-12-21 20:36:26
问题 I have a little experimentation app (essentially a very cut-down version of the LunarLander demo in the Android SDK), with a single SurfaceView . I have a Drawable "sprite" which I periodically draw into the SurfaceView 's Canvas object in different locations, without attempting to erase the previous image. Thus: private class MyThread extends Thread { SurfaceHolder holder; // Initialised in ctor (acquired via getHolder()) Drawable sprite; // Initialised in ctor Rect bounds; // Initialised in

How to install android system image (for Emulator) externally in Android Studio?

落花浮王杯 提交于 2019-12-21 20:27:36
问题 I have downloaded (externally from IDM) Android N System Image from this link. Now where should i paste, install the file or what should i do with the file? I want Android N to show in my Android Emulator list (list which appears after clicking the run button in Android Studio). 回答1: Unpack this zip into folder {sdk_dir}/system-images/android-24/default/ After it you must create new virtual device from run dialog usiing this system image. 回答2: Unpack to {SDK_PATH}/system-images/android-24

how to set anchor tag mailto: attribute in webview, android

蓝咒 提交于 2019-12-21 19:43:24
问题 I tried to set anchor tag mailto attribute like <a href='mailto:info@company.com'>info@company.com</a> in webview. when i run the app on simulator and click on the link it is showing "Unsupported Action .." How i can set mailto attribute work out in android webview.... Thanks 回答1: WebView does not support advanced HTML tags... what you will have to do is: Set a webclient to your webview and override the url loading When you detect a link with mailto try to send the email. I'm gonna give you a

License error with android 4.4 emulator

廉价感情. 提交于 2019-12-21 17:52:12
问题 I updated today the sdk to the new version and I've got a problem with the license. When my application starts with the new Google API lev. 19, I receive a "License has stopped" error. From logcat I can see this kind of error: 11-01 06:47:57.120: E/AndroidRuntime(991): FATAL EXCEPTION: main 11-01 06:47:57.120: E/AndroidRuntime(991): Process: com.android.vending, PID: 991 11-01 06:47:57.120: E/AndroidRuntime(991): java.lang.RuntimeException: Unable to instantiate application com.android

Newbie: How to change tab font size?

微笑、不失礼 提交于 2019-12-21 17:29:15
问题 I follow the android develops tutorial of tab layout to implement a simple tab layout. Based on that tutorial, I got an question in my mind, that's how to change the tab font size?? I tried to change the tab font size by adding the attribute android:textSize="8dip" in <TabWidget ...> of the layout xml file : <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="8dip" /> but it does not take any effect. Anyone can