본문 바로가기
[Android] 이미지와 텍스트 함께 배치하기. ( 신문기사처럼 ) [Android] 이미지와 텍스트 함께 배치하기. ( 신문기사처럼 ) http://gmariotti.blogspot.de/2014/03/snippet-align-textview-around-image.html LeadingMarginSpan.LeadingMarginSpan2 를 이용하면 가능하다. class MyLeadingMarginSpan2 implements LeadingMarginSpan.LeadingMarginSpan2 { private int margin;private int lines; MyLeadingMarginSpan2(int lines, int margin) {this.margin = margin;this.lines = lines;} /** * Apply the margin * * @p.. 2014. 4. 11.
[android] flood fill algorithm performance tests. android, flood fill algorithm performance tests. 위와 같은 공룡의 엉덩이, 발, 그리고 꼬리에 이르는 부분을 FloodFill algorithm 을 적용하여 색칠해보았다.avg 값은 5회의 결과를 평균 낸 값이다. 1. Very Intuitive and Simple Flood Fill Algorithm Recursive method call 을 이용하여, 한 점을 기준으로 동,서,남,북 pixel 에 대해 recursive call 을 호출하는 방식이다. private void floodFill3(Bitmap bitmap, Point fillStartPoint, int targetColor, int replacementColor){Queue queue = new L.. 2014. 4. 11.
[android] ~Jelly Bean WebView vs. Kitkat WebView. [android] ~Jelly Bean WebView vs. Kitkat WebView. http://stefanodacchille.github.io/blog/2014/02/23/webview-explorations/ Hit test result. WebView 에서 어떤 element 를 touch 했을 경우,WebView.getHitTestResult() 를 호출하면 hitTestResult object 가 return 된다. HitTestResult 에는 element type 과 url 값이 들어있다.예를 들어 tag 를 touch 했을 때는 WebView.HitTestResult.SRC_ANCHOR_TYPE 이 type 으로 return 된다. 기존 WebView 는 이 녀석이 지원하지 않는 e.. 2014. 4. 10.
[android] baselineAligned 속성의 정체. android, baselineAligned 속성의 정체. LinearLayout 에 포함되는, TextView 들은 글씨들의 first line 을 align 하도록 기본 설정이 되어 있다. 그래서 위와 같이 한줄짜리 text 를 가진 버튼들 중간에두줄짜리 text 를 가진 버튼이 추가되면 위와 같은 layout 이 보여진다. 이는 LinearLayout 을 상속하는 TableLayout, RadioGroup, SearchView 들과TextView 를 상속하는 Button, CheckBox, RadioButton, EditText 들도 이에 해당한다고 보면 된다. 따라서 이런 현상을 없애려면, 기본 true 로 되어있는 android:baselineAligned 값을 false 로 전환해주면 된다. .. 2014. 4. 10.
[Android] Google Play Services 4.3 Release. [Android] Google Play Services 4.3 Release. http://android-developers.blogspot.kr/2014/03/google-play-services-43.html Google Analytics API, Tag Manager, Address API 가 추가되었다.기존의 API 들이 더 업그레이드 되었다. Google Analytics and Google Tag Manager Stand alone 으로 있던 Google Analytics 가 Google Play Service 로 들어왔다.Google Tag Manager 는 Google Play 에 릴리즈 된 앱의 업데이트 없이 색상을 비롯한 앱의 특성을 바꿀 수 있다. Drive API 다음과 같은 기능들.. 2014. 4. 9.
[android] how to input xml percentage sign android, how to input xml percentage sign %% Android, how to input xml percentage sign, percentage sign, xml, % 2014. 4. 9.
Android Transition Animation (TransitionManager, Transition, Scene) Tutorial Android Transition Animation (TransitionManager, Transition, Scene) Tutorial 기본 참조 : http://blog.stylingandroid.com/archives/2143 Layout 의 변화에 대한 animation 을 지원한다.Layout 에 add, remove, move, resize, show, hide 등에 대한 기본 animation 을 지원한다. private ViewGroup mLayout1; @Overridepublic View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.in.. 2014. 4. 8.
[android] AutoCompleteTextView 때문에 Filterable 을 적용한 경우 example. android, AutoCompleteTextView 때문에 Filterable 을 적용한 경우 example. AutoCompleteTextView 때문에 Filterable 을 적용한 경우, 어떤 sequence 로 함수들이 불릴까? 1. getFilter ( 1회만 불림 ) 2. 글자 하나당 performFiltering, publishResults 가 순차적으로 불림. 3. publishResults 에서 notifyDataSetChanged 가 불리면getCount 를 부르면서 일반적인 list drawing 이 진행됨. private static class AutoCompleteAdapter extends BaseAdapter implements Filterable{ private List m.. 2014. 4. 8.
[android] compat version mapfragment xml example. android, compat version mapfragment xml example. Android, CLASS, com.google.android.gms.maps.MapFragment, com.google.android.gms.maps.SupportMapFragment, compat, compat version mapfragment xml example., fragment, map, map v2, map:cameraTargetLat, map:cameraTargetLng, map:cameraZoom, V2, xmlns 2014. 4. 7.
반응형