Android App Track⛺-029

MunkiJeon·2024년 7월 15일

TIL

목록 보기
46/59
post-thumbnail

TIL (Today I Learned?)

오늘...발표하느라 힘 다씀

*코드로 대체

스크롤뷰 맹글기

  • 가로 스크롤 뷰
      <HorizontalScrollView
          android:contentDescription="그림 가로 스크롤"
          android:layout_width="match_parent"
          android:layout_height="match_parent">
    
          <LinearLayout
              android:id="@+id/main_page_inner_layout_scroll_youtuber"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal">
    
              <androidx.constraintlayout.widget.ConstraintLayout
                  android:layout_width="300dp"
                  android:layout_height="match_parent">
    
                  <-- 여기는 내용 들어가면 됨-->
                    
              </androidx.constraintlayout.widget.ConstraintLayout>
    
          </LinearLayout>
    
      </HorizontalScrollView>
  • 세로 스크롤 뷰
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">
    
        <ScrollView
            android:paddingTop="50dp"
            android:contentDescription="그림 + 글자 세로 스크롤"
            android:id="@+id/main_page_sv_contents"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
          
            <LinearLayout
                android:id="@+id/main_page_inner_layout_contents"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
    
                <-- 여기는 내용 들어가면 됨-->
    
            </LinearLayout>
    
        </ScrollView>
    
    </androidx.constraintlayout.widget.ConstraintLayout>
  • 세로 안에 + 가로 스크롤 뷰
      <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:id="@+id/main"
     		android:layout_width="match_parent"
     		android:layout_height="match_parent"
     		tools:context=".MainActivity">
    
        <ScrollView
            android:id="@+id/main_page_sv_contents"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:contentDescription="그림 + 글자 세로 스크롤"
            android:paddingTop="50dp">
    
            <LinearLayout
                android:id="@+id/main_page_inner_layout_contents"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
    
              <HorizontalScrollView
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:contentDescription="그림 가로 스크롤">
    
                  <LinearLayout
                      android:id="@+id/main_page_inner_layout_scroll_youtuber"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:orientation="horizontal">
                    
                    <-- 여기는 내용 들어가면 됨-->
    
                  </LinearLayout>
    
              </HorizontalScrollView>
    
    		<-- 여기는 내용 들어가면 됨-->
              
          </LinearLayout>
    
      </ScrollView>
    
    </androidx.constraintlayout.widget.ConstraintLayout>

Today Review

추가 벨로그(마크다운 문법)

<details>
<summary>접기/펼치기</summary>

<!-- summary 아래 한칸 공백 두어야함 -->
## 접은 제목
접은 내용
</details>
  • summary 태그 아래 한칸 공백을 두어야한다.
    • 공백을 두지 않으면 Markdown 문법이 접은 부분에 적용되지 않는다.
profile
공장자동화와 웹 개발을 핥아 먹다 앱 개발로 전향한 개발자의 키보드의 낡은 키캡⛑️

0개의 댓글