목록분류 전체보기 (486)
설.현.아빠
//상단에 선언 private boolean isTwoClickBack = false; . . @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(event.getAction() == KeyEvent.ACTION_DOWN){ if(keyCode == KeyEvent.KEYCODE_BACK){ if(!isTwoClickBack){ Toast.makeText(this, "'뒤로'버튼을 한번더 클릭 하시면 종료됩니다." , Toast.LENGTH_SHORT).show(); CntTimer timer = new CntTimer(2000, 1); timer.start(); }else{ finish(); return true; } } } ret..
별 버그가 다있네...ㅋ EllipsizingTextView index_summary = (EllipsizingTextView)convertView.findViewById(R.id.index_summary); index_summary.setText(item.getString("summary")); index_summary.setMaxLines(3); 아래 파일을 추가하고, 위처럼 사용하면 된다. package com.fobikr.SuperStarK.View; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.graphics.Canvas; import android.text.Layo..
AudioManager am=(AudioManager)getSystemService(Context.AUDIO_SERVICE); if(am.isMusicActive()) { long eventtime = SystemClock.uptimeMillis(); Intent downIntent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); KeyEvent downEvent = new KeyEvent(eventtime, eventtime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, 0); downIntent.putExtra(Intent.EXTRA_KEY_EVENT, downEvent); sendOrderedBroadca..
android:background="@drawable/popup_event_check" android:button="@android:color/transparent" 이런 식으로 처리를 하면 된다^^
*. 설치된 어플 목록 PackageInfo를 통해 가져오기 - 1 List appinfo = getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES); for(int i = 0 ; i
http://rednine.tistory.com/416
Bitmap -> Drawable Bitmap bitmap = new Bitmap (...); Drawable drawable = new BitmapDrawable(bitmap); Drawable -> Bitmap Bitmap bitmap = Bitmap.createBitmap(width, height, true); Drawable iconDrawable = packageManager.getActivityIcon(resolveInfo.activityInfo); Canvas canvas = new Canvas(bitmap); drawable.setBounds(0, 0, width, height); drawable.draw(canvas); 에러날때는 아래를 참조 http://blog.vizpei.kr/105..