Category Archives: Math

How to use NumberFormat Class in Android? – Rounding a number in android, formatting, getting decimal values etc in android.

By | October 14, 2012

[java] package com.coderzheaven.numberformattest; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Locale; import; import android.os.Bundle; import android. widget. TextView; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setPadding(10, 10, 10, 10); NumberFormat numberFormat = new DecimalFormat("##"); String str = numberFormat.format(-01234.567); // -1235 tv.setText(str + "\n\n"); str = numberFormat.format(00); // 0… Read More »

How to find your Google Plus ID

By | September 27, 2012

This is so simple 1. Go to your Google + account ( 2. Click on the Profile icon on the Left. 3. If you look at the URL in the address bar, it should look something like this: 4. The long numerical string in the URL is your Google+ ID. Here is CoderzHeaven’s from the URL above:… Read More »