마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

이미지의 크기가 왜 잘못 나오는지 잘 모르겠습니다.

0 추천

 

안녕하세요.

제가 tab1부분의 아래에 컨텐츠 부분에 이미지를 넣었는데 어떤 이유에서 아래의 3번째 사진과 같이 나오는

지 잘 모르겠습니다. 원래, 2번쨰 사진처럼 좀 더 화면에 좀 더  꽉 차야 하고, 그 아래에 버튼 부분을 만들 생

각인데 왜 아래와 같이 이미지가 약간 짤려보이는 현상이 나오는지 잘 모르겠습니다..

이미지는 아래의 2번째 이미지가 TAB1의 컨텐츠 부분의 화면상에 80% 센트 정도 차야하고, 그 아래에는 2번

째 이미지 사진과 같이 영화관 선택이라는 버튼이 필요합니다ㅠ 버튼 부분은, 제가 따로 만들 생각입니다.

어디가 잘못되어서, 이미지를 match_parent를 둘다 주었는데, 어떤 이유에서 3번쨰 그림처럼, 저렇게 반도 안

차게나오는지 잘 모르겠어요..

원래의 제가 만든 아래의 제가 만든 코드를 아래에 한번 첨부해 보겠습니다..

8000자가 넘는것은 댓글에 한번 이어서 붙여보겠습니다.

wewe.png

 

zfzfzfzf.PNG

333.PNG

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_date_and__seat"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="ex.real_project.Date_and_Seat">

    <RelativeLayout
        android:id="@+id/Date_and_Seat_Toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/Before_Date_and_Seat_Image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="3dp"
        android:layout_marginLeft="3dp"
        android:background="@drawable/before_image" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="영화별 예매"
        android:textSize="30dp"
        android:textStyle="bold"
        android:layout_marginTop="10dp"
        android:layout_centerHorizontal="true" />

    </RelativeLayout>


   
Kind카인드 (3,600 포인트) 님이 2016년 11월 1일 질문
<TabHost
            android:id="@+id/tabhost"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
                >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical" >

                    <TabWidget

                    android:id="@android:id/tabs"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" >

                     </TabWidget>

                <FrameLayout
                    android:id="@android:id/tabcontent"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >

                    <ScrollView
                        android:id="@+id/tab1"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" >

                        <TableRow
                            android:id="@+id/tableRow1"
                            android:layout_width="fill_parent"
                            android:layout_height="fill_parent">

                           
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/first_tab_image"
android:textAppearance="?android:attr/textAppearanceMedium" />



</TableRow>

</ScrollView>

<ScrollView
android:id="@+id/tab2"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="test2"
android:textAppearance="?android:attr/textAppearanceMedium" />
</ScrollView>


<ScrollView
android:id="@+id/tab3"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="test3"
android:textAppearance="?android:attr/textAppearanceMedium" />
</ScrollView>

</FrameLayout>
</LinearLayout>
</TabHost>

</LinearLayout>

1개의 답변

0 추천
익명사용자 님이 2016년 11월 2일 답변
아아 ㅠㅠ.. 말씀해주신걸 보아도, 왠지모르게, tableRow 부분에서
크기가 커지지 않고, 꿈쩍도 하지 않습니다.. 어디가 잘못된걸까요.
이미지에, 올려주신 블로그 링크들의 값들을 적용을 시켜보아도, 잘 되질 않습니다.. fill_parent를 전부 match로 줘 보았는데도 저렇게 바뀌고 .. 어디가 문제인건지 ㅠ ㅠ  아래에 혹시나 해서 소스를 첨부해 보았습니다.

<LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical" >

                    <TabWidget

                    android:id="@android:id/tabs"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" >

                     </TabWidget>

                <FrameLayout
                    android:id="@android:id/tabcontent"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >

                    <ScrollView
                        android:id="@+id/tab1"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent" >

                        <TableRow
                            android:id="@+id/tableRow1"
                            android:layout_width="fill_parent"
                            android:layout_height="fill_parent">
                            
                            
                            <ImageView
                                android:id="@+id/imageView"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:scaleType="fitEnd"
                                android:background="@drawable/first_tab_image"
                                android:textAppearance="?android:attr/textAppearanceMedium" />

                            <Button
                                android:id="@+id/First_Tab_Button"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_below="@id/imageView"
                                android:text="영화관 선택" />

                            
                        </TableRow>

                    </ScrollView>

                    <ScrollView
                        android:id="@+id/tab2"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" >

                        <Button
                                android:id="@+id/button2"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="test2"
                                android:textAppearance="?android:attr/textAppearanceMedium" />
                    </ScrollView>


                    <ScrollView
                        android:id="@+id/tab3"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" >

                        <TextView
                            android:id="@+id/textView3"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="test3"
                            android:textAppearance="?android:attr/textAppearanceMedium" />
                    </ScrollView>

                </FrameLayout>
            </LinearLayout>
예제에서는 뷰를 감싸고 있는 컨테이너 뷰가 LinearLayout 입니다만.
올려주신 내용에서는 Tablerow로 감싸여져 있네요.
해당 부분을 바꾸어서 적용해보세요
...