일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- SSL
- Android
- OTP
- apple
- openssl
- OSX
- 앱리소스
- SwiftUI
- MFA
- fido
- kmip
- SSH
- albumbook
- WebAuthn
- css
- 앨범북
- FIDO2
- Nodejs
- MYSQL
- MSYS2
- SWIFT
- 애플
- appres
- 인증
- git
- 2FA
- 앱스토어
- 안드로이드
- Xcode
- otpkey
Archives
- Today
- Total
인디노트
버튼의 중앙에 글씨는 표시 하려면 본문
안드로이드 개발에서 문자를 버튼 중앙에 표시하기 위해서
다음 코드에서 처럼 includeFontPadding 를 false 로 하면 된다.
android:includeFontPadding="false"
예를 들어보면 다음과 같다.
<Button
android:id="@+id/pushYesButton"
android:layout_width="100dp"
android:layout_height="34dp"
android:background="@drawable/button_background_rounded_green"
android:gravity="center"
android:textColor="@color/Green"
android:textSize="12sp"
android:textStyle="bold"
android:text="@string/push_button_approve"
android:layout_marginEnd="0dp"
android:includeFontPadding="false"
android:layout_alignParentEnd="true"
tools:ignore="RtlCompat" />
<Button
android:id="@+id/pushNoButton"
android:layout_width="80dp"
android:layout_height="34dp"
android:background="@drawable/button_background_rounded_red"
android:gravity="center"
android:textColor="@color/DarkRed"
android:textSize="12sp"
android:textStyle="bold"
android:text="@string/push_button_deny"
android:layout_marginEnd="110dp"
android:includeFontPadding="false"
android:layout_alignParentEnd="true"
tools:ignore="RtlCompat" />
반응형
'소스 팁 > Java, Android, Kotlin' 카테고리의 다른 글
안드로이드 스튜디오에서 안드로이드 버전 11 이전기기 WiFi 연결하기 (0) | 2022.12.25 |
---|---|
AD_ID (0) | 2022.10.20 |
Android 컴파일시 Duplicate class... found in modules 의 대처법 (0) | 2022.10.09 |
Android 버전 확인방법 (0) | 2022.08.18 |
Firebase 의 Google Login 기능 개발시 default_web_client_id 는 어디 있을까. (0) | 2021.07.25 |
Comments