[android] Toast.LENGTH_LONG, Toast.LENGTH_SHORT 몇 초? Toast.LENGTH_LONG, Toast.LENGTH_SHORT 몇 초? - framework source code 에 의하면.. private static final int LONG_DELAY = 3500; // 3.5 seconds private static final int SHORT_DELAY = 2000; // 2 seconds 참고하세요~ 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 12. 10. [android] EditText hint text single line 설정하기. EditText hint text single line 설정하기. - EditText 를 사용할 떄 hintText 가 길 경우 singleLine="true" 를 줘도 잘 먹히지 않는다. single line 으로 나오지 않는다는 말이다. 이 때 ellipsize 옵션을 함께 주면 해결된다. 2012. 12. 7. [android] mapView setCenter() 버그, 이슈. mapView setCenter() 가 버그, 이슈. - mapView 를 사용하여 MapController.setCenter( GeoPoint ) 를 사용하는 경우 처음 생성시에는 center 지정을 잘 하지만, 다른 Activity 로 이동하여 map 을 조작하고, 해당 activity로 돌아와서 다시 center 를 지정하는 경우, center 가 제대로 작용되지 않습니다. 새로운 activity 에서의 map 사이즈를 기준 center 가 유지되는 것으로 추정됩니다. - "우선" 해결책은 MapController.animateTo( GeoPoint ) 를 사용해주면 강제적으로 맞추어줄 순 있지만, animation 을 원하지 않는 경우에는 어쩔 수 없겠군요 우선은.. 급한대로 이 방법으로 불부터 .. 2012. 12. 5. [android] baselineAligned ( horizontal LinearLayout text 의 align 맞추는 기능 ) baselineAligned ( horizontal LinearLayout text 의 align 맞추는 기능 ) LinearLayout 에서 orientation 을 horizontal 로 주게 되면, 첫번째 컴포넌트의 첫번째 텍스트 라인을 기준으로 나머지 컴포넌트들을 정렬시킨다. 이 기능은 performance 를 위해 disable 될 수 있다. android:baselineAligned="false" 를 주면 해결된다. 요즘은 lint 에서 자동으로 특수한 목적이 아니라면 끄는 것이 강조되고 있다. 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 12. 3. [android] text 상단 여백 제거방법 - setIncludeFontPadding text 상단 여백 제거방법 - setIncludeFontPadding - font size( text size ) 가 커짐에 따라 글씨 자체에 상단 여백이 나타나는 현상을 확인하였다. 이는 여백의 공간이 font 자체에 포함되며 font size 가 커짐에 따라 그 여백 공간도 같이 커지는 현상으로 design 적용할 때 상당한 난해함을 불러일이키곤 한다. - 이를 해결하는 방법이 있으니, 바로 font의 여백을 무시하는 방법이다. setIncludeFontPadding( false ); or android:includeFontPadding="false" 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 12. 3. [android] Window Backgrounds & UI Speed 출처 : 안드로이드 개발자 article Android LayoutTricks #1 (성능개선) Android Layout Tricks #2 : Reusing Layouts ( 성능개선 ) Android Layout Tricks #3 : Optimize by merging Android Layout Tricks #4 : Optimize with stubs ( 성능 최적화 ) Window Backgrounds & UI Speed - Activity 의 최상단 view 인 DecorView 는 기본적으로 ColorDrawable 이 setting 되어 있기 때문에, Activity 에 배경을 전부 덮어버리는 background 를 사용하는 경우, 쓸데없이 ColorDrawable 이 더 그려지는 효과가 있다.. 2012. 11. 28. [android] Android Layout Tricks #4 : Optimize with stubs ( 성능 최적화 ) 출처 : 안드로이드 개발자 article Android LayoutTricks #1 (성능개선) Android Layout Tricks #2 : Reusing Layouts ( 성능개선 ) Android Layout Tricks #3 : Optimize by merging Window Backgrounds & UI Speed Android Layout Tricks #4 : Optimize with stubs * 원문에서는 Tricks #3 으로 제공되지만, 다른 article 과의 연관성을 고려하여 #4 로 명명하였다. - android 는 ViewStub 이라는 특별한 widget 을 제공한다. 이 녀석은 거의 쓰이지 않는 view 들에 대해 이점을 제공한다. - ViewStub 은 매우 가벼운 vie.. 2012. 11. 28. [android] Android Layout Tricks #3 : Optimize by merging 출처 : 안드로이드 개발자 article Android LayoutTricks #1 (성능개선) Android Layout Tricks #2 : Reusing Layouts ( 성능개선 ) Android Layout Tricks #4 : Optimize with stubs ( 성능 최적화 ) Window Backgrounds & UI Speed Android Layout Tricks #3 : Optimize by merging - 여기서는 태그에 대해 다룬다. - 태그는 view tree 의 level 을 줄여서 android layouting 을 최적화시킬 수 있다. - Title bar 가 있는 경우 기본 View tree 는 다음과 같이 구성된다. - 빨간박스가 Title bar 쪽이고 왼쪽 Fra.. 2012. 11. 28. [android] Android Layout Tricks #2 : Reusing Layouts ( 성능개선 ) 출처 : 안드로이드 개발자 article Android LayoutTricks #1 (성능개선) Android Layout Tricks #3 : Optimize by merging Android Layout Tricks #4 : Optimize with stubs ( 성능 최적화 ) Window Backgrounds & UI Speed Android Layout Tricks #2 : Reusing Layouts - Android XML layout file 에서 모든 tag 는 실제 class instance 와 mapping 된다. ( 그 class 는 모두 View 의 subclass 여야 한다. ) UI Toolkit 에서는 View 에 mapping 되지 않는 3가지 특별한 tag 를 제공하는데,.. 2012. 11. 28. 반응형 이전 1 ··· 77 78 79 80 81 82 83 ··· 125 다음