티스토리 뷰
Layout에 border(테두리)를 부여하는 기능
<구성>
- drawable / famgam_border.xml
- layout / activity_famgamcontrol.xml
<famgam_border.xml>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:start = "2dp"
android:end="2dp"
android:top="2dp"
android:bottom="2dp">
<shape android:shape="rectangle">
<stroke android:width="2dp"
android:color = "@color/design_default_color_primary"/>
<padding
android:bottom = "-5dp"
android:top = "10dp"
android:right = "10dp"
android:left = "-10dp"/>
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
</shape>
</item>
</selector>
<activity_famgamcontrol.xml>
<LinearLayout
android:id = "@+id/ll_wheelbuttons"
android:visibility="gone"
android:orientation="vertical"
android:paddingBottom="10dp"
android:background="@drawable/famgam_border"
app:layout_constraintTop_toBottomOf="@id/ll_ready"
app:layout_constraintBottom_toTopOf="@id/ll_wheelbuttons"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintVertical_bias="0"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/wheels02"
android:scaleType="centerInside"
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"
android:layout_gravity="left"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp"/>
<LinearLayout
android:orientation="horizontal"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="2"
android:layout_width="match_parent"
android:layout_height="0dp">
<Button
android:id = "@+id/btn_fl"
android:text="F.R.\n(Front Left)"
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
<Button
android:id = "@+id/btn_fr"
android:text="F.R.\n(Front Right)"
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_gravity="center_vertical"
android:layout_weight="2"
android:layout_width="match_parent"
android:layout_height="0dp">
<Button
android:id = "@+id/btn_rl"
android:text="R.L.\n(Rear Left)"
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
<Button
android:id = "@+id/btn_rr"
android:text="R.R.\n(Rear Right)"
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
반응형
'SWDesk > App' 카테고리의 다른 글
[Kotlin] Bluetooth Application in Android (0) | 2023.02.14 |
---|---|
[Python] msedge 드라이버 및 모듈 설치 (0) | 2022.09.03 |
Testing BLE for FamGam (0) | 2021.11.19 |
Testing WebAccess (0) | 2021.11.16 |
RecyclerVieiwTest02 (0) | 2021.11.06 |
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Hurdles
- 심심풀이
- 절연형
- ServantClock
- image
- 아두이노
- 둎
- badp
- 혁신
- Decorator
- 전압
- 심심풀이치매방지기
- Video
- 티스토리챌린지
- 전류
- bilient
- BSC
- 허들
- Innovations
- DYOV
- 치매방지
- 오블완
- 빌리언트
- 배프
- 전압전류모니터링
- Innovation&Hurdles
- arduino
- 치매
- 혁신과허들
- Innovations&Hurdles
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
글 보관함