How to correctly show a popup menu below a TextView, similar to Spinner?

Background I had to create a spinner-like view, which has this behavior: textView that has the selected item text in it, with an arrow icon on the right that indicates whether it’s in “open” state. upon clicking the view, a popup menu appears below it (not on top), showing a list of items to choose […]

RecyclerView adapter taking wrong values

I have a RecyclerView wich shows two kinds of Views one represents an User publication and another that represents an Event publication. Both have elements in common, for example a TextView that shows a time stamp. So I created a PublicationViewHolder that takes this TextView time stamp into a variable and load it. My issue […]

Find all devices connected in a wifi network

I am trying to make an app here, which will detect all the devices connected in that WiFi network. I have done enough google and come up with an App which can detect IP Addresses of the devices connected in the WiFi network of the app. Now I want few more things. Can I find […]

How to retrieve more than 1000 rows from

I have been using Parse to retrieve a data for a list view. Unfortunately they limit requests to 100 by default to a 1000 max. I have well over that 1000 max in my class. I found a link on the web which shows a way to do it on iOS but how would you […]

Settings activity doesn't open on tablet

I have set up correctly the pref_general, values for it, and the code to run the intent: @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id […]

How do I add elements dynamically to a view created with XML

I’m trying to add dynamic content to a view that has been created with XML. I have a view “profile_list” that has a ScrollView that I like to add some elements to. Here is some code of what I’m trying to do. // Find the ScrollView ScrollView sv = (ScrollView) this.findViewById(; // Create a LinearLayout […]

Android Espresso Issue – Dependency conflict

I’m trying to integrate espresso into my application for ui testing. Here are my dependencies in Gradle dependencies { compile fileTree(dir: ‘libs’, include: [‘*.jar’]) compile ‘’ compile ‘’ compile ‘com.github.bumptech.glide:okhttp-integration:1.3.1@aar’ compile ‘com.squareup.okhttp:okhttp:2.0.0’ compile ‘de.hdodenhof:circleimageview:1.3.0’ compile ‘’ compile ‘’ androidTestCompile ‘’ androidTestCompile ‘’ compile ‘’ androidTestCompile ‘’ compile project(‘:common’) compile project(‘:service’) } So all my espresso […]

Detect when Android v2 maps has loaded

I’m writing a app that would take 9 snapshots of the map around an area when the user presses a button. In loop, using this to move and save: map.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(mStartLat + (mMultiOffsetX + mWidth), mStartLng + (mMultiOffsetY + mHeight)), mZoom)); map.snapshot(this); and in onSnapshotReady: final String fileName = Environment.getExternalStorageDirectory().getAbsolutePath() + String.format(“/test_maps/map_%f_%f.png”, Double.valueOf(mStartLat + (mMultiOffsetX […]

Replacing a character by another character in a string in android?

Simply i want to replace a character with another in android.. My code: et = (EditText) findViewById(; String str = et.getText().toString(); str.replace(‘ ‘,’_’); et.setText(str); System.out.println(str); But here the “space” is not replaced by “underscore”.. I also tried other character too.. please help!!

Disable onMarkerClickListener completely in Maps API v2

I want to disable clicking/tapping on map markers. I know you can disable default behavior by setting up an empty map.setOnMarkerClickListener and return true; However, this still takes the tap as clicking on the marker. I want to pass the tap on to the onMapClickListener. In my app, tapping the map moves a marker around, […]

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