Android

Javaコード:
@Override
public void onAttachedToWindow() {
//TODO Auto-generated method stub
this.getWindo ...

Android

Javaコード:
private PackageManager mPackageManager;
mPackageManager = getPackageManager();
Drawable d = mPac ...

Android

TextView下線を付ける:
mTextView.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG|Paint.ANTI_ALIAS_FLAG);

TextView枠線を ...

Android

Javaコード:
public boolean onTouchEvent(MotionEvent event) {
//touchメソッドを実行
super.onTouchEvent(event);
r ...

Android

サンプルコード:
PowerManager mPowerManager = (PowerManager) getSystemService(POWER_SERVICE);
PowerManager.WakeLock m ...

Android

サンプルコード:
DecimalFormat formater = new DecimalFormat(“#0.##”);
System.out.println(formater.format( ...

Android

Javaコード:
public class ServiceReceiver extends BroadcastReceiver {
public void onReceive(Context context, Inte ...

Android

サンプルコード:
if(searchTask.getStatus() == AsyncTask.Status.RUNNING){
searchTask.cancel(true);
}
searchTas ...

Android

PopupWindowを表示:
public void showPopupWindow(){
Context context = PopupWindowCalendar.this;
LayoutInflater ...

Android

Javaコード:
public static Bitmap drawableToBitmap(Drawable drawable) {
Bitmap bitmap = Bitmap.createBitmap(