버튼의 배경 속성
background 이용
void setBackgroundColor (int color)
void setBackgroundDrawable(Drawable d)
void setBackgroundResource (int resid)

nine patch
확장할 부분과 그대로 출력할 부분을 조각으로 나누어 지정
포멧 : PNG
확장자 : .9.png


이미지 원래 모양 외에 바깥쪽에 1픽셀 너비의 투명한 영역이 추가로 존재
이 영역에 검은색 점을찍어 확장 및 테스트배치 영역에 대한 정보를 기록
위쪽, 왼쪽에는 이미지가 확장될 때 반복될 부분을 지정
아래쪽 오른쪽에는 내용물이 배치될 영역을 지정

android- sdk / tools / draw9patch.bat파일


참고할만한 블로그
http://sje0114121.blog.me/150106034371

'안드로이드' 카테고리의 다른 글

AppWidget  (0) 2011.07.28
Broadcast Receiver  (0) 2011.07.26
Data Base  (0) 2011.07.25
broadcast receiver java code로 등록  (0) 2011.07.25
MediaPlayer  (0) 2011.07.19

  • Cursor android.database.sqlite.SQLiteDatabase.query(boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)

    • boolean distinct : 결과 값에 대한 유일한 값만 가져올지에 대한 여부
    • String table : 쿼리할 테이블 명
    • String[] columns : 쿼리대상 열명
    • String selection : 쿼리의 조건절을 구성
    • String[] selectionArgs : selection에 들어간 ? 와일드문자를 대체할 문자열
    • String groupBy  : 데이터를 묶을 그룹 조건 정의
    • String having : groupBy 지정된 경우 그룹 조건 정의
    • String orderBy : 결과의 정렬 조건
    • String limit : 결과 값의 행 개수를 제한을 정의


  •  

    '안드로이드' 카테고리의 다른 글

    Broadcast Receiver  (0) 2011.07.26
    나인패치  (0) 2011.07.26
    broadcast receiver java code로 등록  (0) 2011.07.25
    MediaPlayer  (0) 2011.07.19
    Activity Cycle  (0) 2011.07.12

    등록
    public void on Resume(){
    super.onResume();
    restterReceiver(br,filter)'
    }

    해제
    public void onPause(){
    super.onPause();
    unregisterReceiver(br);
    }

    => Receiver  Activity 등록하면 Activity 활성화 상태에서만 cast 반응

    => BroadcastReceiver class 상속하여 onReceiver method 오버라이딩 하고 manifest 추가하면 Activity상태와 무관하게 cast요청을 감지.

    '안드로이드' 카테고리의 다른 글

    나인패치  (0) 2011.07.26
    Data Base  (0) 2011.07.25
    MediaPlayer  (0) 2011.07.19
    Activity Cycle  (0) 2011.07.12
    startActivityForResult()  (0) 2011.07.12

    + Recent posts