android-studio

Android Studio: Part of Design View Hidden

三世轮回 提交于 2020-01-07 03:12:29
问题 This is a new one for me. In Design view I am unable to see the first 150 pixels of the design view window-- including the buttons/options to the left of the AppTheme button. I've tried the Pan and Zoom tool, which seems to do nothing. It shows the full view and blueprint view filling the Pan and Zoom tool interface. Any idea how to fix this: 回答1: "Window" -> "Restore Default Layout" worked for me. 回答2: I had the same problem. Just drag the mouse where your projects are to the far left of the

Lenovo P70-A have ADB connection (Android Studio) but not stoping on any breakpoints

雨燕双飞 提交于 2020-01-07 03:11:05
问题 Lenovo P70-A Android 4.4.4 P70-A_S134_150729_16G-ROW Windows 10 Android Studio v2.0 Preview 4 Lenovo Smart Assistant v1.03 Dev options turned on. USB bridge is enabled. Install from unknown sources is enabled. I successfully connect the phone to the development environment, I can do compiling and runing an application from Android Studio. I can see the logs in LogCat. But when I'm run an app in the debug mode, the debugger is detached. In the console writes: Connected to the target VM,

How to add a single file to paths in Android studio 1.3+ with experimental gradle plugin (NDK)?

蓝咒 提交于 2020-01-07 03:05:45
问题 There are a lot of examples with adding a whole source folder to paths like a cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString() in new experimental gradle plugin for AS 1.3+ Is there a way to add single source file to it? 回答1: The snippet you're showing is adding an include directory, not sources. It will add headers, not .c/.cpp files. I haven't found a way to add a single source. The plugin will look for all the sources inside jni folders. You can add a jni folder using jni

Android, import external library to NDK

醉酒当歌 提交于 2020-01-07 02:59:08
问题 i am making an Android Shapefile reader app on Android with the use of NDK. I want to use C++ to parse shape files. I found library "Shapefile C Library". Github: https://github.com/sw897/shapelib. I am using Android studio and have no idea how to import it to my Android project so i could use functions described in: http://shapelib.maptools.org/shp_api.html Any tips? 回答1: First, start hacking away at the Hello-JNI example from Google: https://github.com/googlesamples/android-ndk/tree/master

Android Studio : Compress Video and Audio [closed]

独自空忆成欢 提交于 2020-01-07 02:57:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Working to compress Video and Audio files in Android Studio. I need Useful suggestion and links. I went through some of these links but didn't found much helpful . How to compress video in android` , Is there possibility to compress audio and video file in android programmatically?, FFmpegFrameGrabber crashes 100%

Upgrading Realm from “0.86.0” to “2.1.0”

断了今生、忘了曾经 提交于 2020-01-07 02:48:22
问题 I've use Realm in My Simple Application, My Previous Version of Realm was 0.86.0 , to I'm planning to Upgrade it to latest version which is 2.1.0 I was Creating RealmProxy To Dealing with all operations of realm Like This package devs.lo.fff.utils; import android.content.Context; import java.io.Closeable; import java.lang.ref.WeakReference; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashSet; import java.util.List; import java.util.Set

Error:(7, 34) No resource found that matches the given name (at 'colorAccent' with value '@color/accentColor')

女生的网名这么多〃 提交于 2020-01-06 23:47:47
问题 Were running the sample file, the above error occurs. I do not know how to solve. 回答1: Add follwing resource to your colors.xml <color name="colorAccent">YOUR_COLOR</color> This may resolve your issue. 来源: https://stackoverflow.com/questions/37178610/error7-34-no-resource-found-that-matches-the-given-name-at-coloraccent-wi

How can i change the UI when in portrait and landscape

拥有回忆 提交于 2020-01-06 21:24:11
问题 I understand there are already questions here on using orientation and landscape layouts however what I want to do is a bit different. I am aiming to change the UI entirely when rotated to landscape e.g when portrait it displays regular information but when rotated shows a table. Would this involve having two separate activities and using an if statement to start the activity depending on orientation? I have tried using a simple landscape layout but when I change the orientation it closes on

Is there any shortcut on Android Studio to get the HEX value of color from text or something like this?

老子叫甜甜 提交于 2020-01-06 21:20:16
问题 I don't want to remember the color codes during coding. Is there is any shortcut to get the color codes from the color name or anything else to get the color code on Android Studio ? 回答1: You can use a colors.xml where you store your colors. Then you can access them later in xml as @color/myGreen . Here is a example xml: <?xml version="1.0" encoding="utf-8"?> <resources> <color name="my_green">#00cc00</color> </resources> If you need the color again as int you can use this code: int color =

How to receive data via Bluetooth on Android?

感情迁移 提交于 2020-01-06 21:08:08
问题 I read many topics, but I couldn't find good answer. I'm working on Android application that uses Bluetooth to send and receive data from Microcontroller. I have already finished sending part and it works fine, but I have problem with receiving data on Android. I'm using this library: https://android-arsenal.com/details/1/690#!description It doesn't have properly tutorial (or at least I don't see it), it just says about receiving data on android this: //Listener for data receiving bt