Re: [android-developers] Re: VectorDrawable/BitmapDrawable in custom view.

2015-02-23 Thread Sérgio Faria
Maybe if you move face.png to drawable-nodpi-v17 it will work If it doesn't work you can use the inflate method to force it. 2015-02-23 21:44 GMT+00:00 Nathan nathan.d.mel...@gmail.com: No ideas? In Android Wear, it is definitely using the vector drawable. In Nexus, 9, it is definitely using

Re: [android-developers] Re: NullPointerException in java.io.File.fixSlashes?

2015-02-19 Thread Sérgio Faria
. // Remove duplicate adjacent slashes. 204. boolean lastWasSlash = false; 205. char[] newPath = origPath.toCharArray(); On Thursday, February 19, 2015 at 9:59:30 AM UTC, Fran wrote: Except I am not doing it... On Wed, Feb 18, 2015, 15:26 Sérgio Faria sergi...@gmail.com javascript: wrote

Re: [android-developers] Re: NullPointerException in java.io.File.fixSlashes?

2015-02-18 Thread Sérgio Faria
Given the stack above, it seems you're doing new File(null) https://android.googlesource.com/platform/libcore/+/android-2.3.4_r1/luni/src/main/java/java/io/File.java 2015-02-18 11:45 GMT+00:00 Fran fmmar...@gmail.com: It seems this problem persists more than three years after. I am

Re: [android-developers] can I get DhcpInfo - for Ethernet? instead of WiFi?

2014-08-21 Thread Sérgio Faria
If you're willing to go the JNI route, here are some pointers: http://man7.org/linux/man-pages/man3/getifaddrs.3.html https://github.com/kmackay/android-ifaddrs https://stackoverflow.com/questions/4951257/using-c-code-to-get-same-info-as-ifconfig 2014-08-21 11:37 GMT+01:00 Mihai Badea

Re: [android-developers] Menu icon position

2014-07-31 Thread Sérgio Faria
2014-07-31 5:08 GMT+01:00 TreKing treking...@gmail.com: For example, this won't be there on device with Menu Buttons, despite it being phased out. You have ViewConfigurator#hasPermanentMenuKey()

Re: [android-developers] ObjectAnimator starting with a frame jump on Android 4.4 (nexus 5) but not in 4.1 device

2014-07-13 Thread Sérgio Faria
My guess would be that you're starting the animation before the view is ready. You can use an old Animation or try to start the Animator in OnPreDrawListener or in onResume(). 2014-07-13 10:44 GMT+01:00 saex elpablos...@gmail.com: I have a simple activity that shows an animation with

Re: [android-developers] ObjectAnimator starting with a frame jump on Android 4.4 (nexus 5) but not in 4.1 device

2014-07-13 Thread Sérgio Faria
it, and not working :( El domingo, 13 de julio de 2014 12:34:53 UTC+2, Sérgio Faria escribió: My guess would be that you're starting the animation before the view is ready. You can use an old Animation or try to start the Animator in OnPreDrawListener or in onResume(). 2014-07-13 10:44 GMT+01:00

Re: [android-developers] Re: IllegalAccessError occur in a receiver,when a new version apk replaced a older one!

2014-07-13 Thread Sérgio Faria
On Dalvik you'll get that error if you use a custom ClassLoader that loads classes from other ClassLoader(s) (eg. the API of a plugin). If you're using this, you have two options: either dont export the symbols or remove them at runtime[1] (you'll need to move the class definitions and zero out

[android-developers] Re: How to open or register a new file extension in Android?

2013-09-09 Thread Sérgio Faria
I don't see this getting fixed unless Google opens up the system mime registry. (I haven't found any documented API to extend what's returned from e.g. MimeTypeMap mapper = MimeTypeMap.getSingleton(); String kmlmime = mapper.getMimeTypeFromExtension(gpx); Have a look at

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-04 Thread Sérgio Faria
I'm of the same opinion as Nobu Games, it might be a concurrency issue. Canvas works because it runs on the UI Thread. Edvinas, try this (in your sample): // replace x and y with a single volatile variable or use synchronized private volatile long mCoords; //... public boolean

[android-developers] Re: Customized Soft keyboard

2012-06-27 Thread Sérgio Faria
Have a look at KeyboardViewhttps://developer.android.com/reference/android/inputmethodservice/KeyboardView.html. You define the keyboard using a XML file like this: Keyboard xmlns:android=http://schemas.android.com/apk/res/android; android:keyHeight=50dp android:keyWidth=16.66%p

[android-developers] Re: How to enable Bluetooth programmatically

2012-06-15 Thread Sérgio Faria
You were doing some thing like thi and doesn't work? BluetoothAdapter.getDefaultAdapter().enable(); Remeber that you need the android.Manifest.permission.BLUETOOTH_ADMIN permission. Sometimes Bluez fails to start it the first time, you can try to enable after some delay, it should end up

[android-developers] Re: Controlling a SAXParser using buttons

2012-06-15 Thread Sérgio Faria
I think a FileChannelhttps://developer.android.com/reference/java/nio/channels/FileChannel.htmlis quite close to what you need. Get the FileChannel from a RandomAccessFilehttps://developer.android.com/reference/java/io/RandomAccessFile.htmlthen you can use the

[android-developers] Re: How to resize width fragment

2012-06-12 Thread Sérgio Faria
This is completely untested code, but should work (with some typos fixed): -First wrap the fragment in a FrameLayout like this: FrameLayout android:id=@+id/fragMenuFrame android:layout_width=200dp android:layout_height=match_parent fragment