HOME 개발팁 안드로이드 화면별 LinearLayout 가운데위치 정렬

프로그램 작업하다 좋은 팁, 정보, 테스트를 기록하는 곳입니다.


android | 안드로이드 화면별 LinearLayout 가운데위치 정렬

페이지 정보

작성자 굿스웹 작성일20-01-06 17:39 조회1,888회 댓글0건

본문

layout 디바이스 화면별 가운데 표시할때
res-auto 이용해 자동으로
가운데 표시하자

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">



<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="9"
android:background="#ffffff"
android:gravity="center_vertical"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
>
  <TextView
android:id="@+id/massg_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="가운데"
android:textColor="#000000"
android:textSize="24sp" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>


#가운데정렬 #안드로이드 #스튜디오

[주소복사] https://www.goodsweb.kr/?u=D414NVN
SNS 알리기
핀터레스트
텔레그램로
블로그로
카카오스토리
카톡 공유

관련 블로그
로딩중


1명  IP : 3.17.♡.119
001 47.♡.112.247 오류안내 페이지
(/bbs/download.php?bo_table=tip&no=1&sca=%EC%9E%90%EB%A3%8C&wr_id=124)

접속자
  • 오늘 : 10
  • 어제 : 311
  • 최대 : 874
  • 전체 : 407,141

검색로봇(Robots) 최근 방문시간
  • GOOGLE : 6시간 전
  • NAVER : 17시간 전
  • BING : 20시간 전
  • DAUM : 1일 전

ETH : 0x8abf3B748ab78828AE07685e4fd53d1a606f18D3



페이스북 네이버 블로그 굿스웹 쇼핑몰 네이버 카페 굿스웹 트위터 굿스웹 티스토리 Google Play