티스토리 뷰
res/drawable/seek_bar_thumb.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- 원모양의 시크바 컨트롤러 -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<!-- 배경 -->
<solid
android:color="@android:color/white"/>
<!-- 크기 -->
<size
android:width="16dp"
android:height="16dp"/>
</shape>

res/drawable/seek_bar_progress.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/background">
<shape android:shape="line">
<stroke
android:width="4dp"
android:color="@android:color/holo_blue_bright"/>
</shape>
</item>
<item android:id="@+id/secondaryProgress">
<clip>
<shape android:shape="line">
<stroke
android:width="4dp"
android:color="@android:color/holo_blue_bright"/>
</shape>
</clip>
</item>
<item android:id="@+id/progress">
<clip>
<shape android:shape="line">
<stroke
android:width="4dp"
android:color="#FF541F"/>
</shape>
</clip>
</item>
</layer-list>

activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#68000000"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_gravity="bottom"
android:orientation="horizontal" >
<SeekBar
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:thumb="@drawable/seek_bar_thumb"
android:progressDrawable="@drawable/seek_bar_progress"/>
</LinearLayout>
</FrameLayout>


'Android > XML' 카테고리의 다른 글
<ConstraintLayout> (0) | 2020.08.23 |
---|---|
핸드폰 회전 시 동영상 초기화 방지 (0) | 2020.08.17 |
networkSecurityConfig (0) | 2020.08.14 |
<EditText> 꾸미기 (0) | 2020.08.04 |
<layer-list> (0) | 2020.08.04 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- TabLayout
- DataBinding
- 안드로이드
- Android
- Kotlin
- View
- java
- Vue.js #Vue.js + javascript
- 자바
- James Kim
- MVVM
- coroutine
- handler
- 혀가 길지 않은 개발자
- recyclerview
- ViewModel
- Design Pattern
- 안드로이드 #코틀린 #Android #Kotlin
- ArrayList
- fragment
- activity
- JSONObject
- Architecture Pattern
- JSONArray
- ViewPager2
- 코틀린
- Livedata
- XML
- CoordinatorLayout
- Intent
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함