Highlight All Words that is searched via EditText

Hello I want to know how to highlight all Words that is inputted in the EditText and will appear in the TextView this post is related to this one Highlight Textview Using EditText

How can I change the duration for an Android AnimationDrawable animation on-the-fly?

I’m new to ANDROID platform. I’m using the following to animate a set of 16 “frames” using AminationDrawable in my app: In the XML file I have: <animation-list xmlns:android=”http://schemas.android.com/apk/res/android” android:oneshot=”false”> <item android:drawable=”@drawable/image_1″ android:duration=”200″ /> <item android:drawable=”@drawable/image_1_25″ android:duration=”200″ /> <item android:drawable=”@drawable/image_1_5″ android:duration=”200″ /> <item android:drawable=”@drawable/image_1_75″ android:duration=”200″ /> <item android:drawable=”@drawable/image_2″ android:duration=”200″ /> <item android:drawable=”@drawable/image_2_25″ android:duration=”200″ /> <item […]

Multiple Selection Spinner

I have a spinner that acts like a filter for searching among several categories. But the problem is that the spinner allows only one category to select from. Is there a way to obtain a multiple selection behavior for the spinner, or what other alternatives exists?

How to create a custom LayoutParams to be used on a custom layout?

I’m fairly proficient at creating complex custom layouts based on ViewGroup. The only thing I’m missing is the ability to create my custom LayoutParams. I really need the ability to get the margins and why not create other extra params to pass in to the parent. How can I go about creating a custom LayoutParam […]

Android BLE: onCharacteristicRead() appears to be blocked by thread

I’m implementing a series of characteristic reads against a BLE device. Because readCharacteristic() executes asynchronously, and because we have to wait until it completes before issuing another “read” call, I used a lock to wait() and then in ‘onCharacteristicRead() I notify() the lock to get things going again. When I wait() after calling readCharacteristic(), I […]

How to get the icon of other applications (Android)

What I’m doing is getting a list of all the current running processes on the phone. Which I have done by, private List<RunningAppProcessInfo> process; private ActivityManager activityMan; … activityMan = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); process = activityMan.getRunningAppProcesses(); this works fine. When I call the processName field like process.get(i).processName; I get a name like com.android.mail for example. what I’m […]

Android NDK, keeping live C++ objects

I’ve got a following problem. I want to write an Android application, which uses my legacy C++ classes. I have to keep a C++ object alive during the whole application lifetime. I wrote a similar application in C# and solved the problem by passing a pointer to a C++ class to C# and storing it […]

file.lastModified() is never what was set with file.setLastModified()

I do have a problem with millis set and read on Android 2.3.4 on a Nexus One. This is the code: File fileFolder = new File(Environment.getExternalStorageDirectory(), appName + “/” + URLDecoder.decode(folder.getUrl())); if (fileFolder != null && !fileFolder.exists()) { fileFolder.setLastModified(1310198774); fileFolder.mkdirs(); fileFolder.setLastModified(1310198774); } if (fileFolder != null && fileFolder.exists()) { long l = fileFolder.lastModified(); } In […]

Android Studio – How to disable the scrolling code preview overlay?

In Android Studio (and IntelliJ IDEA), when you hover your cursor in the scrollbar area of the editing window, the cursor changes to a pointing hand and displays a 10-line preview of the code in that location in the file. Here’s a screenshot: As you move your cursor up and down that scrollbar area, the […]

Class 0 SMS (flash SMS) on Android

As I know that Nokia and some others phone (like iPhone) are able to sent and receive class 0 SMS , is it possible for android ? Do Android have the API? What is flash SMS? Flash SMS is an SMS which is displayed on the phone screen immediately upon arrival. Unless you choose to […]

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