Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > Mobile > Mobile Forum > Android สอบถามเกี่ยวกับการออกแบบ หน้า xml ของ android studio หน่อยครับ



 

Android สอบถามเกี่ยวกับการออกแบบ หน้า xml ของ android studio หน่อยครับ

 



Topic : 122569



โพสกระทู้ ( 124 )
บทความ ( 0 )



สถานะออฟไลน์




พอดีผมใช้ imageview เป็น background แล้วใช้ Glide เรียกรูปมาแสดง

แต่พอเปิดคีย์บอร์ดขึ้นมา รูปมันโดนย่อลงเหมือนรูปที่ 2 ขอวิธีแก้ไขหน่อยครับ

ขอบคุณครับ
รูปที่ 1 ตอนไม่ได้ทำอะไร
1

พอคีย์บอร์ดแสดงเพื่อที่จะพิมพ์ รูป bg ถูกย่อลง
2

โค๊ด

Code (XML)
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffcc99"
    >

    <ImageView
        android:id="@+id/imgadd"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="50dp"
        android:layout_marginTop="90dp"
        android:paddingLeft="16dp"
        android:paddingRight="16dp">

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="450dp"
                android:background="#a7ffffff"
                android:orientation="vertical"
                android:padding="16dp">

                //Name Sotre
                <android.support.design.widget.TextInputLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp">
                <EditText
                    android:id="@+id/etName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:hint="Name Store"
                    android:textColor="#77000000"
                    android:textColorHint="#77000000" />
                </android.support.design.widget.TextInputLayout>

                //Detail
                <android.support.design.widget.TextInputLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp">
                <EditText
                    android:id="@+id/etDetail"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:hint="Please Enter detail of promotion"
                    android:textColor="#77000000"
                    android:textColorHint="#77000000" />
                </android.support.design.widget.TextInputLayout>


                <Spinner
                    android:id="@+id/spinner1"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true"
                    android:layout_below="@+id/textView1"
                    android:layout_marginTop="15dp"
                    android:entries="@array/type_array" />

                <TextView
                    android:id="@+id/etemail"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:gravity="center"
                    android:text="Photo"
                    android:textColor="#77000000"
                    android:textColorHint="#77000000"
                    android:textSize="18dp" />

                <LinearLayout
                    android:layout_gravity="center"
                    android:layout_width="100dp"
                    android:layout_height="100dp">

                    <ImageView
                        android:id="@+id/imageView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />
                </LinearLayout>

                <Button
                    android:id="@+id/btChoose"
                    android:layout_width="330dp"
                    android:layout_height="20dp"
                    android:layout_gravity="center"
                    android:layout_marginTop="16dp"
                    android:background="#f93d37"
                    android:text="CHOOSE PHOTO"
                    android:textColor="#ffffff"
                    android:textSize="16sp" />

                //Enter Address promotion
                <android.support.design.widget.TextInputLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp">
                <EditText
                    android:id="@+id/etAddress"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:hint="Enter Address promotion"
                    android:textColor="#77000000"
                    android:textColorHint="#77000000" />
                </android.support.design.widget.TextInputLayout>


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


                    <android.support.design.widget.TextInputLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="5dp">
                    <EditText
                        android:id="@+id/etStart"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="10dp"
                        android:layout_weight="1"
                        android:hint="Startdate"
                        android:inputType="date"
                        android:textColor="#77000000"
                        android:textColorHint="#77000000" />
                    </android.support.design.widget.TextInputLayout>


                    <Button
                        android:id="@+id/btnStart"
                        android:layout_width="50dp"
                        android:background="@drawable/unnamed"
                        android:layout_height="50dp"
                        />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="5dp"
                    android:orientation="horizontal">


                    <android.support.design.widget.TextInputLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="5dp">
                    <EditText
                        android:id="@+id/etEnd"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="10dp"
                        android:layout_weight="1"
                        android:hint="Expirationdate"
                        android:inputType="date"
                        android:textColor="#77000000"
                        android:textColorHint="#77000000" />
                    </android.support.design.widget.TextInputLayout>

                    <Button
                        android:id="@+id/btnEnd"
                        android:layout_width="50dp"
                        android:background="@drawable/unnamed"
                        android:layout_height="50dp" />
                </LinearLayout>


                <RadioGroup
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:orientation="horizontal">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="5dp"
                        android:text="Status"
                        android:textSize="18dp" />

                    <RadioButton
                        android:id="@+id/radioCustomer"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:hint="Customer"
                        android:textSize="15dp" />


                    <RadioButton
                        android:id="@+id/radioOwner"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:hint="ShopOwner"
                        android:textSize="15dp" />

                </RadioGroup>

                <Button
                    android:id="@+id/btAddpro"
                    android:layout_width="330dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginTop="16dp"
                    android:background="#f93d37"
                    android:text="SUBMIT"
                    android:textColor="#ffffff"
                    android:textSize="18sp" />


            </LinearLayout>

        </ScrollView>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/linearLayout"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:orientation="horizontal">

        <Button
            android:id="@+id/btHome"
            android:layout_width="60dp"
            android:layout_height="match_parent"
            android:layout_marginLeft="28dp"
            android:background="#00123321"
            android:text="" />

        <Button
            android:id="@+id/btMenu"
            android:layout_width="60dp"
            android:layout_height="match_parent"
            android:layout_marginLeft="25dp"
            android:background="#00123321"
            android:text="" />

        <Button
            android:id="@+id/btProfile"
            android:layout_width="60dp"
            android:layout_height="match_parent"
            android:layout_marginLeft="27dp"
            android:background="#00123321"
            android:text="" />

        <Button
            android:id="@+id/btLogout"
            android:layout_width="60dp"
            android:layout_height="match_parent"
            android:layout_marginLeft="20dp"
            android:background="#00123321"
            android:text="" />
    </LinearLayout>

</RelativeLayout>




Tag : Mobile







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2016-04-23 11:12:26 By : nomzod View : 1657 Reply : 1
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Quote:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffcc99"
>


ตัว Background น่าจะต้องใส่ให้ Layout ตัวนี้ครับ ลองระบุ id แล้วอ้างถึงเพื่อกำหนดค่า Background ให้ครับ








แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-04-25 10:32:41 By : mr.win
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : Android สอบถามเกี่ยวกับการออกแบบ หน้า xml ของ android studio หน่อยครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่