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 > รบกวนหน่อยครับ ติดปัญหา ผมจะทำ Custom menu แต่พอทำแล้วมันเด้งอะครับ



 

รบกวนหน่อยครับ ติดปัญหา ผมจะทำ Custom menu แต่พอทำแล้วมันเด้งอะครับ

 



Topic : 128340



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



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




ผมได้เอา ที่คนเขาทำแจกใน github มาตกแต่งแอพของผม

ปัญหาคือ ผมไม่ข้าใจวิธีการนำมาใช้ ผมลอง ใส่ๆไปไม่ มีerror สีแดงแต่พอรันแล้วแอพเด้ง
แล้วทีสำหคัญ ผมลองเอามาใช้ layout ต่างๆของผม มันไม่จัดวางที่เดิม จะย้ายก็ไมไ่ด้ งงมากครับ

มือถือใหม่ครับ

อันนี้คือ code เดิมๆของผมที่ใช้งานได้ปกติ 100%
Code (XML)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:tools="http://schemas.android.com/tools"
    android:fitsSystemWindows="true"
    android:background="#fff"
    tools:context="app.mes.MainActivity"
    android:gravity="center">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimaryDark"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>


    <com.google.android.gms.ads.AdView
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/appbar"
        android:layout_centerHorizontal="true"
        ads:adSize="SMART_BANNER"
        ads:adUnitId="@string/banner_id">
    </com.google.android.gms.ads.AdView>

        <FrameLayout
            android:id="@+id/drawer_container"
            android:layout_below="@id/adView"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

                <FrameLayout
                    android:id="@+id/frame_container"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent">

                            <com.app.mes.views.CustomSwipeRefresh
                                android:id="@+id/swipe_refresh"
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:layout_alignParentTop="true"
                                android:layout_alignParentStart="true">

                                <ViewStub
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:id="@+id/view_stub"
                                    android:layout_alignParentTop="true"
                                    android:layout_alignParentStart="true" />
                            </app.mes.views.CustomSwipeRefresh>
                        </RelativeLayout>
                </FrameLayout>

        </FrameLayout>

        <devlight.io.library.ntb.NavigationTabBar
            android:id="@+id/ntb_horizontal"
            android:layout_width="match_parent"
            android:layout_height="45dp"
            app:ntb_badge_gravity="top"
            android:layout_alignParentBottom="true"
            app:ntb_bg_color="@color/colorPrimaryDark"
            app:ntb_inactive_color="@android:color/white"
            app:ntb_badge_position="right"
            app:ntb_badged="true"
            app:ntb_scaled="true"
            app:ntb_tinted="true"
            app:ntb_title_mode="all"
            app:ntb_titled="true"
            app:ntb_swiped="true"/>

</RelativeLayout>


ส่วนนี้คือ code ของทางคนอื่นที่ผมจะเอามาดัดแปลง


Code (XML)
 <?xml version="1.0" encoding="utf-8"?>
<com.lemonade.widgets.slidesidemenu.SlideSideMenuTransitionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/slide_side_menu"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@color/colorPrimary"
        android:padding="50dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="20dp"
            android:layout_marginTop="20dp"
            android:textColor="#ffffff"
            android:text="Item 1"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:textSize="20dp"
            android:textColor="#ffffff"
            android:text="Item 2"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:textSize="20dp"
            android:textColor="#ffffff"
            android:text="Item 3"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:textSize="20dp"
            android:textColor="#ffffff"
            android:text="Item 4"/>
    </LinearLayout>

    <com.lemonade.widgets.slidesidemenu.SlideSideMenuContentCardView
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#ffffff">

            <!-- Optional: Tool Bar -->
            <android.support.design.widget.AppBarLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:background="@color/colorPrimaryDark">

                <android.support.v7.widget.Toolbar
                    android:id="@+id/base_toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </android.support.design.widget.AppBarLayout>


        </FrameLayout>
    </com.lemonade.widgets.slidesidemenu.SlideSideMenuContentCardView>
</com.lemonade.widgets.slidesidemenu.SlideSideMenuTransitionLayout>





นี้ คือที่ผมลองเอามาทำ ที่มันเพียนไปหมดและรันแล้วเด้ง

Code (XML)



<?xml version="1.0" encoding="utf-8"?>
<com.app.mes.slidesidemenu.SlideSideMenuTransitionLayout

    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/slide_side_menu"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:tools="http://schemas.android.com/tools"
    android:fitsSystemWindows="true"
    android:background="#fff"
    tools:context="app.mes..MainActivity"
    android:gravity="center">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimaryDark"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>


    <com.google.android.gms.ads.AdView
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/appbar"
        android:layout_centerHorizontal="true"
        ads:adSize="SMART_BANNER"
        ads:adUnitId="@string/banner_id">
    </com.google.android.gms.ads.AdView>

        <FrameLayout
            android:id="@+id/drawer_container"
            android:layout_below="@id/adView"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

                <FrameLayout
                    android:id="@+id/frame_container"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent">

                            <com.app.mes..views.CustomSwipeRefresh
                                android:id="@+id/swipe_refresh"
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:layout_alignParentTop="true"
                                android:layout_alignParentStart="true">

                                <ViewStub
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:id="@+id/view_stub"
                                    android:layout_alignParentTop="true"
                                    android:layout_alignParentStart="true" />
                            </com.app.mes.views.NCCustomSwipeRefresh>
                        </RelativeLayout>
                </FrameLayout>

        </FrameLayout>

        <devlight.io.library.ntb.NavigationTabBar
            android:id="@+id/ntb_horizontal"
            android:layout_width="match_parent"
            android:layout_height="45dp"
            app:ntb_badge_gravity="top"
            android:layout_alignParentBottom="true"
            app:ntb_bg_color="@color/colorPrimaryDark"
            app:ntb_inactive_color="@android:color/white"
            app:ntb_badge_position="right"
            app:ntb_badged="true"
            app:ntb_scaled="true"
            app:ntb_tinted="true"
            app:ntb_title_mode="all"
            app:ntb_titled="true"
            app:ntb_swiped="true"/>

</RelativeLayout>
</com.app.mes.SlideSideMenuTransitionLayout>




Tag : Mobile, Android, JAVA







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2017-07-21 13:23:16 By : yuttakarn1 View : 1025 Reply : 1
 

 

No. 1



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



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

ต้นฉบับมาจาก github ไหน ตามไปถามที่ github นั้น






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2020-07-17 18:11:23 By : PhrayaDev
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : รบกวนหน่อยครับ ติดปัญหา ผมจะทำ Custom menu แต่พอทำแล้วมันเด้งอะครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 00
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 อัตราราคา คลิกที่นี่