검색결과 리스트
안드로이드/android에 해당되는 글 27건
- 2013.05.08 Checkbox 이미지 활용하기
- 2013.05.08 android:launchMode singleTop과 singleTask 의 차이점
- 2013.04.16 위젯 사이즈
- 2013.04.05 webview 클립보드 (Copy & paste) 에 내용 넣기
- 2013.03.27 Button drawableLeft 자바에서 설정하기
글
Checkbox 이미지 활용하기
체크박스를 예쁘게 또는 기능 적으로 이미지의 힘을 빌려야 할떄가 있다
특히 3.0 이하에서는 더욱더 그렇다
얼릉 4.0 이하는 사라져야 하는데...
// layout
<CheckBox android:id="@+id/cchkbox" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_marginLeft="3dp"
android:padding="10dp"
android:focusable="false" android:clickable="false" android:button="@drawable/checkbox_sel" />
// drawable/checkbox_sel.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false" android:drawable="@drawable/checkbox_dis" />
<item android:state_checked="true" android:drawable="@drawable/checkbox_ena" />
<item android:drawable="@drawable/checkbox_dis" />
</selector>
// JAVA
CheckBox ivChk = (CheckBox) findViewById(R.id.cchkbox);
ivChk.setChecked(true); // @drawable/checkbox_ena 이 녀석이 활성화 될거임(체크된 상태)
ivChk.setChecked(false); // @drawable/checkbox_dis 이 녀석이 활성화 될거임(체크되지 않은 상태)
'안드로이드 > android' 카테고리의 다른 글
액션 텝 메뉴 옵션메뉴가 하단에 펼치지게 하기 (0) | 2013.06.25 |
---|---|
android action bar swipe fragment listview setonitemclicklistener not working (1) | 2013.05.19 |
android:launchMode singleTop과 singleTask 의 차이점 (0) | 2013.05.08 |
위젯 사이즈 (0) | 2013.04.16 |
webview 클립보드 (Copy & paste) 에 내용 넣기 (0) | 2013.04.05 |
설정
트랙백
댓글
글
android:launchMode singleTop과 singleTask 의 차이점
메니페스트에
<activity android:name=".Test" android:launchMode="singleTop" android:label="@string/app_name" />
1. startActivityForResult 에 대해 반응을 보인다.
startActivityForResult(i, Global.LAUNCHED_ACTIVITY_VIEW);
protected void onActivityResult(int requestCode, int resultCode, Intent data){}
2. 나를 여러번 호출하더라도 나를 최상단에 놓기 때문에 같은 페이지로 이전 화면이 쌓이질 안는다
<activity android:name=".Test" android:launchMode="singleTask" android:label="@string/app_name" />
1. startActivityForResult 에 대해 실행이 불가능하다 왜냐 자신 왜에 어느것도 이전에 존재할 수 없기 때문이다
2. 나를 여러번 호출하더라도 나를 최상단에 놓기 때문에 같은 페이지로 이전 화면이 쌓이질 안는다
'안드로이드 > android' 카테고리의 다른 글
android action bar swipe fragment listview setonitemclicklistener not working (1) | 2013.05.19 |
---|---|
Checkbox 이미지 활용하기 (0) | 2013.05.08 |
위젯 사이즈 (0) | 2013.04.16 |
webview 클립보드 (Copy & paste) 에 내용 넣기 (0) | 2013.04.05 |
Button drawableLeft 자바에서 설정하기 (0) | 2013.03.27 |
설정
트랙백
댓글
글
위젯 사이즈
// rex/xml/ <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="60dp"
android:minHeight="60dp"
android:label="@string/name"
android:updatePeriodMillis="86400000"
android:initialLayout="@layout/widget_1x1.xml"
>
</appwidget-provider>
android:minWidth="60dp"
android:minHeight="60dp"
1x1 : 60dp x 60dp
1x3 : 60dp x 180dp
2x1 : 120dp x 60dp
2x2 : 200dp x 200dp
3x1 : 180dp x 60dp
4x1 : 240dp x 60dp
'안드로이드 > android' 카테고리의 다른 글
Checkbox 이미지 활용하기 (0) | 2013.05.08 |
---|---|
android:launchMode singleTop과 singleTask 의 차이점 (0) | 2013.05.08 |
webview 클립보드 (Copy & paste) 에 내용 넣기 (0) | 2013.04.05 |
Button drawableLeft 자바에서 설정하기 (0) | 2013.03.27 |
view getId() string 문자 알아보기(EntryName) (0) | 2013.03.26 |
설정
트랙백
댓글
글
webview 클립보드 (Copy & paste) 에 내용 넣기
webview.setOnLongClickListener(gestureListener);
View.OnLongClickListener gestureListener = new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
_ALERT_CODE_=700;
Log.i(TAG,v.getClass().getSimpleName()+"");
if(v instanceof WebView){
alert.showConfirm(
"", // title
getResources().getString(R.string.copy_contents),// message
getResources().getString(R.string.alert_ok), // button1 타이틀
getResources().getString(R.string.alert_cancel) // button2 타이틀
);
}
return false;
}
};
private Runnable onClipBoard=new Runnable() {
public void run() {
// if (!clipboardManager.getText().toString().equalsIgnoreCase(description)) {
// Toast.makeText(getApplicationContext(),
// "selected Text = " + clipboardManager.getText().toString(),
// Toast.LENGTH_LONG).show();
// clipboardManager.setText(description);
// } else {
try{
webview.postDelayed(onClipBoard, 1000);
}catch(ActivityNotFoundException e){ e.printStackTrace(); }
catch(Exception e){ e.printStackTrace(); }
// }
}
};
'안드로이드 > android' 카테고리의 다른 글
android:launchMode singleTop과 singleTask 의 차이점 (0) | 2013.05.08 |
---|---|
위젯 사이즈 (0) | 2013.04.16 |
Button drawableLeft 자바에서 설정하기 (0) | 2013.03.27 |
view getId() string 문자 알아보기(EntryName) (0) | 2013.03.26 |
GridView stretchMode (0) | 2013.02.22 |
설정
트랙백
댓글
글
Button drawableLeft 자바에서 설정하기
Drawable img = getContext().getResources().getDrawable( R.drawable.smiley );
img.setBounds( 0, 0, 60, 60 );
txtVw.setCompoundDrawables( img, null, null, null );
or
Drawable img = getContext().getResources().getDrawable( R.drawable.smiley );
txtVw.setCompoundDrawablesWithIntrinsicBounds( img, null, null, null );
// 아이콘 정렬
setCompoundDrawablesWithIntrinsicBounds( 왼쪽, 위, 오른쪽, 아래 );
'안드로이드 > android' 카테고리의 다른 글
위젯 사이즈 (0) | 2013.04.16 |
---|---|
webview 클립보드 (Copy & paste) 에 내용 넣기 (0) | 2013.04.05 |
view getId() string 문자 알아보기(EntryName) (0) | 2013.03.26 |
GridView stretchMode (0) | 2013.02.22 |
shape 레이아웃 모서리 둥글게 하기 (0) | 2013.01.25 |