본문 바로가기
[android] Browser 의 링크를 통해 내 앱 실행시키기 android, Browser 의 링크를 통해 내 앱 실행시키기 Declare Intent-filter on Manifest The activity which wants to be started has to have action name "android.intent.action.VIEW".Additionally, it has two basic category; they are android.intent.category.DEFAULT and android.intent.category.BROWSABLE.To link the url to the activity, intent-filter has to have data and it declares one or some of followings : scheme, .. 2013. 11. 6.
[android] view 기본 click 소리 내는 방법. 안드로이드, view 기본 click 소리 내는 방법. VIew attribute 설정 먼저 view 가 sound effect 를 낼 수 있는 조건을 만들어야 한다.code ( programatically ) 로도 만들 수 있고, xml 로도 만들 수 있다. android:soundEffectsEnabled="true" view.setSoundEffectsEnabled (true ); 소리 내기 view.playSoundEffect( SoundEffectConstants.CLICK ); Android, android:soundeffectenabled, attribute, Click, CODE, condition, playsoundeffect, Programatically, setsoundeffecten.. 2013. 10. 30.
[android] apply different colors on the texts in the textview using xml 안드로이드, apply different colors on the texts in the textview using xml Here is a text. This is red color]]> and This is green color]]>. Like it? Various text color is not applied directly.You need to convert the string as a Spanned form with Html.fromHtml function. 다양한 색상이 바로 적용되지 않습니다.해당 string 을 Html.fromHtml 함수를 이용하여 Spanned 형태로 전환해야 합니다. textView.setText( Html.fromHtml( getString( R.string.var.. 2013. 10. 21.
[android] TransitionDrawable 을 잘 쓰면 훌륭한 애니메이션이 될 수 있다. TransitionDrawable 을 잘 쓰면 훌륭한 애니메이션이 될 수 있다. TransitionDrawable 의 존재는 익히 알고 있었으나, 드디어 테스트를 해 보았다. TransitionDrawable 은 2개의 이미지를 setting 해놓고 transition 을 시키면, fade in, fade out 효과처럼 이미지가 교체된다. 더 놀라운 것은 매우 부드럽게 된다는 것이며, 2개 이상의 이미지도 충분히 소화할 수 있고, 수치만 바꿈으로서 바뀌는 속도를 쉽게 조절할 수 있다. 자 이 위대한 녀석이 얼마나 간단하게 구현되는지예제 코드 ( example code ) 를 통해서 알아보자. ImageView imageView = new ImageView( this );TransitionDrawable.. 2013. 10. 1.
[android] how to remove extra padding( or margin ) in the GridView android, how to remove extra padding( or margin ) in the GridView [En] GingerBread and below versions show strange effect at the GridView. Sometimes it introduces extra padding or margin which was not set by programmer. I think the fragmentation of android and the various versions are a huge disaster to the programmer. BTW, there's solution for removing those unexpected extra padding or margin.I.. 2013. 9. 24.
[android] ScrollView android:fillViewport 안드로이드, ScrollView android:fillViewport http://developer.android.com/reference/android/widget/ScrollView.html#setFillViewport(boolean) ScrollView 를 사용하게 되면 안쪽에 있는 Layout 이 wrap_content 의 형태로 assign 되어야 한다. 하지만 간혹가다 ScrollView 의 안쪽 layout 이 match_parent 의 형태가 되기를 바라는 경우가 있다. 이럴 경우에는 어떻게 해야 할까? 바로, android:fillViewport 값을 이용하면 된다. 이 값을 true 로 해주면, 안쪽에 있는 contents 를 view port 의 사이즈로 stretch 해준다. xml.. 2013. 9. 4.
[android] bitmap 전환 fade in & fade out sample code 안드로이드, bitmap 전환 fade in & fade out sample code 뭐 완벽하며 부드러운 구현은 아니지만, 그래도 image 가 그냥 "확" 바뀌는 어색함을 막기 위해서 fade in, fade out 을 어떻게 이용할 수 있을까 idea 를 제시한다. public class MainActivity extends Activity { private int[] resIds = new int[]{ R.drawable.black, R.drawable.blue };private int index = 0;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentVie.. 2013. 8. 19.
[android] 외장메모리에 리소스를 저장할 경우 주의사항. 안드로이드, 외장메모리에 리소스를 저장할 경우 주의사항. 외장메모리에 리소스를 저장할 경우 주의사항. SD Card 가 Mount 가 안 되었을 경우. 리소스 파일을 로딩할 떄 문제가 된다.SD Card 가 Mount 되었는지 미리 확인한다. SD Card 에 모든 리소스 내용이 있는지 확실치 않을 때. 꼭 있어야 하는 파일들을 xml 등에 미리 넣어두고, 사용 직전에 체크한다 SD Card 에 내용이 완벽하지 않을 때. Checksum, 용량 등을 이용하여 무결성을 점검해준다. Android, checksum, external memory, external memory resource, Mount, sd card, xml, 무결성, 안드로이드, 외장메모리, 외장메모리 리소스, 용량, 주의사항 2013. 7. 31.
[android] Opensource Libraries 모음 안드로이드 open source library 모음 open source library 를 잘 가져다 쓰면 개발속도를 획기적으로 올릴 수 있다.인기있는 android open source library 들을 소개해본다. Sliding Menu Foursqure 를 비롯한 약 10여개의 유명한 android app 에서 사용한다.code 와 xml 모두 설정이 가능하며, 다양한 옵션을 제공한다.ActionBarSherlock ( 소위 ABS ) 와 연동되어 있다. sample demohttp://www.youtube.com/watch?v=8vNaANLHw-c&feature=youtu.be repositoryhttps://github.com/jfeinstein10/SlidingMenu PullToRefres.. 2013. 7. 25.
반응형