본문 바로가기

개발도구

[안드로이드] TextView 의 설정 [ android:textAppearance] textAppearance textAppearanceButton textAppearanceInverse textAppearanceLarge textAppearanceLargeInverse textAppearanceMedium textAppearanceMediumInverse textAppearanceSearchResultSubtitle (API Level : 5) textAppearanceSearchResultTitle (API Level : 5) textAppearanceSmall textAppearanceSmallInverse duplicateParentState android:duplicateParentState When this attribute is.. 더보기
[안드로이드] GridView 활용 How to create Icon With text like home screen, here is my example screen: To do something like this we need to use GridView and make The Icon with text using the XML layout and then using LayoutInflater to read the XML and put it into the Adapter. Lets begin with the icon.xml(we put it into /res/layout/) that will be the view to show ImageView and Text together. 01 10 14 15 22 23 Here we put the.. 더보기
[안드로이드] xml 없이 직접 코딩하기 순서 없이 그냥 막 넣어 놨씁니다. 필요한 것들만 쓰면 됨. LinearLayout layout = new LinearLayout(getApplicationContext()); layout.setOrientation(LinearLayout.VERTICAL); layout.setBackgroundColor(Color.WHITE); LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT); layoutParams.setMargins(0,0,0,0); layoutParams.weight = 1.0f; .. 더보기
[안드로이드] HTML 문서 보일때 <BR> 처리 RSS 나 HTML 로 문서 내용을 불러 왔을때 을 처리하는 방법을 나눌려고 합니다. PHP 경우 nl2br 을 사용해 nl 을 br 로 바꿔주는 작업을 합니다. galleryView.contentView.setText(description); fromHtml 을 사용해주려 햇는데 안 하여도 BR 테그를 잘 읽고 있어 아래 는 적용하지 않았습니다. 참고) // galleryView.contentView.setText(Html.fromHtml(description)); - fromHtml은 혹 HTML 문서를 호출할때 필요할때 사용하도록 합니다. 더보기
[안드로이드] 버튼 클릭시 스피너 사용하기 - 다이어로그! DialogInterface private void openNewGameDialog() { new AlertDialog.Builder(this) .setItems(R.array.SNS , new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dia, int i) { startGame(i); } }) .show(); } private void startGame(int i){ Log.d("sado", "clicked on"+i); } array.xml 트위터 페이스북 미투데이 카카오톡 더보기
[안드로이드] EXCEPTION: main - Unable to start activity ComponentInfo 대체로 Activity 또는 콤포넌트를 찾지 못하는 경우 발생하게 된다. 확인경로 ) 1. 대게는 Activity를 Manifast 파일에 등록을 시키지 않았을 경우 혹은 오타 2. 만약 안드로이드 콤포넌트를 확장해서 재정의한 경우라면 생성자를 모두 정의하지 않았을 경우에도 발생할 수 있다. 저의 경우는 class 에서 먼저 정의 하고(xml 없는 상태에서 정의하면 에러가 난다.) , 그 후에 xml 파일을 만들어 넣어도 이미 에러난 상태만 유지하고 있어서 반대로 xml 만든후 class에 코딩하니 잘 된다. 3. Activity를 정의한 경우라면 Manifast파일에 제대로 추가했는지 확인 4. 콤포넌트를 확장해 사용한 경우라면 모든 생성자를 오버라이딩 해주었는지 확인 더보기
[안드로이드] Toast 와 Log 를 찍어 보자 Toast 와 Log 는 기본적으로 문자형만 받기 때문에 형변환은 필수 이다. Toast t = Toast.makeText(getApplicationContext()," font size : " + Integer.toString(defaltSize) , Toast.LENGTH_SHORT); // 정의 t.setGravity(Gravity.CENTER, 0, 0); // 정렬 t.show(); // 보여줌 Log.d("111", Integer.toString(defaltSize)); 더보기
[안드로이드] String - >int 형변환 Integer.toString(position+1) 더보기
[php] php 예약어 - htmlspecialchars, nl2br, strip_tags echo() : 문자열 출력 함수 print() : 문자열 출력 함수 printf( ) : 문자열을 format 에 맞춰 출력 sprintf( ) : format 된 문자열을 리턴 explode( 'separator', 'string' ) : 문자열을 특정 문자열 기준( separator ) 으로 나누어 배열 형태로 리턴 each() : 배열에서 현재의 키(key)와 값(value) 쌍을 반환하고 배열 커서를 전진시킨다. 배열의 내부 포인터가 배열의 끝을 벗어나면 FALSE를 반환한다. 예) 여기서는 문자열 $string을 " "로 나누어 배열 $arr 에 넣고 while() 문에서 each()를 사용하여 배열의 끝까지 echo()문이 반복 실행된다. >> 실행결과 $arr[0] : 사과 $arr[1] .. 더보기
[안드로이드] textview bold 볼드 만들기 android:layout_width="wrap_content"                        android:layout_height="wrap_content"                         android:gravity="left"                        android:layout_marginLeft="10dip"                        android:layout_weight="100"                        android:textSize="10px"                        android:textStyle="bold" 볼드 만들기                        android:textColor="#00.. 더보기