SSL certificate is not trusted – on mobile only

My site is working great over SSL in my desktops (chrome) I have a green lock near the address bar saying “Identity verified” But using a mobile mobile browser (Chrome/Safari)I see the following message – “The identity of this website has not been verified” and the lock (in chrome near the address bar) has a […]

How to Set Opacity (Alpha) for View in Android

I have a button as in the following: <Button android:text=”Submit” android:id=”@+id/Button01″ android:layout_width=”fill_parent” android:layout_height=”wrap_content”> </Button> In my onCreate() event, I am calling Button01 like this: setContentView(R.layout.main); View Button01 = this.findViewById(; Button01.setOnClickListener(this); There is a background in the application, and I want to set an opacity on this submit button. How can I set an opacity for […]

Programmatically go back to the previous fragment in the backstack

Say I have an activity that has fragments added programmatically: private void animateToFragment(Fragment newFragment, String tag) { FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.replace(, newFragment, tag); ft.addToBackStack(null); ft.commit(); } What is the best way to return to the previous fragment that was visible? I found Trigger back-button functionality on button click in Android but I’m thinking simulating […]

Install an apk file from command prompt?

I want to install a file using the windows command line. First I want to build after compiling all the .jar files to create an .apk file for an android application without using Eclipse. Does anyone know how this can be done without the use of eclipse & only by making use of command line.

Get boolean from database using Android and SQLite

How can I obtain the value of a boolean field in an SQLite database on Android? I usually use getString(), getInt(), etc. to get the values of my fields, but there does not seem to be a getBoolean() method.

Display the current time and date in an Android application

How do I display the current date and time in an Android application?

Include .so library in apk in android studio

This question already has an answer here: Android studio, gradle and NDK 23 answers

How set background drawable programmatically in Android

To set Background: RelativeLayout layout =(RelativeLayout)findViewById(; layout.setBackgroundResource(R.drawable.ready); Is the best way to do it?

How to change the decimal separator of DecimalFormat from comma to dot/point?

I have this little crazy method that converts BigDecimal values into nice and readable Strings. private String formatBigDecimal(BigDecimal bd){ DecimalFormat df = new DecimalFormat(); df.setMinimumFractionDigits(3); df.setMaximumFractionDigits(3); df.setMinimumIntegerDigits(1); df.setMaximumIntegerDigits(3); df.setGroupingSize(20); return df.format(bd); } It however, also produces a so called grouping separator “,” that makes all my values come out like this: xxx,xxx I do need […]

How to draw border on just one side of a linear layout?

I’m able to draw border to a linear layout, but it is getting drawn on all sides. I want to restrict it to right side only, like you do in CSS (border-right:1px solid red;). I’ve tried this, but it still draws on all sides: <?xml version=”1.0″ encoding=”utf-8″?> <layer-list xmlns:android=”” > <item> <shape android:shape=”rectangle” > <stroke […]

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