Pasting into Genymotion Android Emulator

Is there any way to copy and paste from outside the VM into the Genymotion Emulator?

FloatingActionButton with text instead of image

I’m trying to figure out how can be modified FloatingActionButton from android support library. Can it be used with the text instead of image? Something like this one: I see it extends ImageButton so I think not. Am I right? Is this correct in terms of Material Design in general?

How to send and receive broadcast message

I am trying to pass data between two activities that are inside of tabs. I am trying to use the sendBroadcast. With breakpoints set I never reach the OnReceive. manifest : <activity android:name=”.WebResults” android:label=”@string/app_name”> <intent-filter> <action android:name=”com.toxy.LOAD_URL” /> </intent-filter> </activity> Activity Sender: Intent intent=new Intent(getApplicationContext(),WebResults.class); intent.setAction(“com.toxy.LOAD_URL”); intent.putExtra(“url”,uri.toString()); sendBroadcast(intent); Activity Reciever : @Override public void onCreate(Bundle […]

Get battery level before broadcast receiver responds for Intent.ACTION_BATTERY_CHANGED

I have a broadcast receiver in my program to get react to the battery level like so: private BroadcastReceiver mBatInfoReceiver = new BroadcastReceiver(){ @Override public void onReceive(Context arg0, Intent intent) { int level = intent.getIntExtra(“level”, 0); // do something… } } registerReceiver(this.mBatInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); However this code has to wait for the battery status to […]

How can I be notified when a Snackbar has dismissed itself?

I’m using a Snackbar from the library. I’m using it to undo deletions. To make my life easier, I’m going to make the UI look like things are actually deleted from the data source, and if the undo button in the snack bar is not pressed, actually perform the deletions from the data source. […]

change the name of android project

Is there any posibility that I could change the name of my project as it appears in Package Explorer.I’m using Eclipse IDE.I tried to edit the string.xml in res/value folder but that won’t change it in the Explorer View. Thank u!

how to change focus color of EditText in Android

How can I change the focus color (orange) on an EditText box? The focus color is a small rim around the entire control and is bright orange when the control has focus. How can I change the color of that focus to a different color? Can anyone help me in sorting out this issue? Thanks […]

Recycle ImageView's Bitmap

I have something like this: Bitmap.Config conf = Bitmap.Config.ARGB_8888; WeakReference<Bitmap> bm = new WeakReference<Bitmap>(Bitmap.createBitmap(3000 + 3000, 2000, conf)); Canvas canvas = new Canvas(bm.get()); canvas.drawBitmap(firstBitmap, 0, 0, null); canvas.drawBitmap(bm, firstBitmap.getWidth(), 0, null); imageView.setImageBitmap(bm); And I apply this on more than 10 imageView’s which are created one by one. Whenever I create new ImageView, I want to […]

Tutorials for OpenSL ES for Android

I’ve been trying to look into using the OpenSL ES library that is available for doing native audio with android 2.3, but it appears that the header files and the 600 page pdf of the spec are the only available documentation. Where should I be looking for examples, tutorials, or a brief overview of the […]

How can I make links in fromHTML clickable? (Android)

This seems like a trivial problem, but is has me kind of stumped. I want to load an HTML string using Html.fromHtml(), and have any links in the string to be clickable and open in the browser. Basic example: textView.setText(Html.fromHtml(“<a href=\”\”>This is a link</a>”)); With this snippet, the text is formatted as if it were […]

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