React native custom view, no propType for native prop

I’m trying to implement a native view in react-native, but having some problems with the props. I have a class CustomView extending the android.view.View and its ViewManager extending com.facebook.react.uimanager.SimpleViewManager. The binding with React is done in this way: ‘use strict’; var { requireNativeComponent, PropTypes } = require(‘react-native’); var iface = { name: ‘CustomView’, propTypes: { […]

Javascript: Any workarounds for getting Chrome for Android to fire off touchmove and touchend event listeners other than using event.preventDefault()?

When using event listeners with the touchmove and touchend events, I can’t get Chrome for Android to acknowledge those events unless I first use event.preventDefault(); earlier in the code. If I’m not wanting to block the default scroll functionality, is there any other workaround I can use to get Chrome for Android to acknowledge these […]

DrawableCompat setTint not working on API 19

I am using the DrawableCompat for tinting drawable as below , tinting doesn’t seem to be working on API 19. I am using the support lib version 23.3.0 Drawable drawable = textView.getCompoundDrawables()[drawablePosition]; if (drawable != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { drawable.setTint(color); } else { DrawableCompat.setTint(DrawableCompat.wrap(drawable), color); } }

Xamarin – Visual Studio stuck at zipalign.exe

When trying to deploy an app in Android Device, VS is stuck here: 1>C:\Users\George\AppData\Local\Android\android-sdk\build-tools\23.0.1\zipalign.exe 4 “C:\Users\George\Documents\Visual Studio 2015\Projects\SGUotA-Xamarin\BBXamarin\BBXamarin\BBXamarin.Droid\bin\Debug\BBXamarin.Droid-Signed-Unaligned.apk” “bin\Debug\BBXamarin.Droid-Signed.apk” Can anyone propose a solution for this? screenshot of the problem

The efficiency about android canvas drawing

I’ve been wondering if canvas has a limit boundary. I mean if I use functions such asdrawline(), drawbitmap(), drawcircle(), does android really draw something on the canvas and waste some CPU cycles?? because after all the drawing functions, the actual picture print on the screen is decided by the screen size. And if I draw […]

Building an Android Project from Command Line with Eclipse

I created a “Hello World” Android Project in Eclipse (Indigo) on Windows 7 64-bit. It’s using Android SDK 1.6. It builds from the IDE without any problems. Now I want to build it from the command line. I found this question: Opening an eclipse project through command prompt or batch file and Headless Building with […]

What is android:layout_gravity=“clip_vertical” exactly

the property android:layout_gravity=”clip_vertical|horizontal” does the following as mentioned in the sdk documentation: Additional option that can be set to have the top and/or bottom edges of the child clipped to its container’s bounds. The clip will be based on the vertical gravity: a top gravity will clip the bottom edge, a bottom gravity will clip […]

Allocation Tracker: How to use it to detect memory leaks?

I have two activities: A and B. Starting in A, I go to activity B. Then I call finish() on B and get back to A. Every time I repeat this process allocated memory is increased by 0.1 MB. So I want to find out what’s causing this leak. I have tried to use the […]

Android, Gradle. How to build application and run tests from test application

I have android project and android test project inside it, located under folder tests. Structure of these project is eclipse like +-src | – res | – libs | – tests |….. I use gradle. All i want is to build app, run unit tests and get reports of them. But i don’t understand how […]

Fit image in webview

I am planning to display images from SD card in a webview in order to take advantage of he built in zoom capabilities of webview. However, I am facing an issue with displaying images that are bigger than screen size (e.g. 1800×1200) to fit the screen initially, like in an ImageView. I want the image […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.