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

이미지가, 왜 화면에 꽉 안차고, 일정부분만 차는지 잘 모르겠어요 ㅠㅠ

0 추천

 

안녕하세요.

제가 지금, 탭호스트의 한 화면을 구현을 하고 있는데, 이상하게도 이미지가,

바로 아래의 첫번째 사진처럼 화면에서 일정 공간을 차지해야하는데 , 그것이 아니라, 2번째 사진처럼 애매한

위치에서 지정을 하고 있어서 문제가 많습니다.

첫번째 이미지와 같이, 아래의 사진이 전체적으로 골고루 분포하고 그 아래에 버튼을 삽입하려고 하는데

사진과 레이아웃과 스크롤뷰에 전부 match값을 줘보아도 항상 저 위치에 고정되어있어 .. 심란합니다 ㅠ

어디가 문제인지 코드한번 찝어주시면 정말 감사드리겠습니다 ㅠ

사진에 대한 이미지는 3번째 이미지를 사용하였습니다.

아래에 코드를 한번 적어보겠습니다 ㅠ  8000자가 넘는것은 아래에 댓글에 추가해보았습니다ㅠ

 

 

 

 

 

<?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>


   
공산당 (1,960 포인트) 님이 2016년 11월 2일 질문
<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="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>
    </TabHost>

</LinearLayout>

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...