본문 바로가기
[android] Snackbar 를 써보자 -com.android.support:design:27.1.0 부터 사용 가능하며, BaseTransientBottomBar 를 상속한다 -1개의 버튼과 함께 메시지를 전달할 수 있는 형태의 Toast 라고 보면 될 듯 싶다.한번에 하나만 표시 가능하며, Z 축 기준 최상단에 그려진다. 제거 방법 1. timeout 후에 자동제거2. 새로운 surface 나 activity 가 등장할 때 자동 제거3. user 가 swipe 로 제거 표시 위치 작은 단말(폰) : 스크린 하단에 표시큰 단말(테블릿) : 왼쪽 하단에 표시 Callbacks 버튼에 대한 설정은 setAction(CharSequence buttonText, View.OnClickListener listener) 를 통해 한다.Snack 가 등.. 2019. 1. 20.
[android] TextSwitcher ( from API level 1 ) [android] TextSwitcher ( from API level 1 ) http://developer.android.com/reference/android/widget/TextSwitcher.html -TextView 들만을 child 로 가지는 ViewGroup 이다.Label 을 animation 하는 데 유용하다.setText 가 불릴때마다 animation 을 해서 현재 text 를 out 시키고, 새로운 text 를 in 시킨다. -inAnimation 과 outAnimation 을 지정하여 사용한다. -setText 는 animation 을 하지만, setCurrentText 를 하면 현재 보여지고 있는 text 를 그냥 update 하기 때문에 animation 이 없다. -TextS.. 2017. 7. 9.
[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.
반응형