ورود

View Full Version : قرار گرفتن SlideMenu , Viewpager در اکتیویتی اصلی



MSHService
پنج شنبه 20 شهریور 1393, 16:07 عصر
با درود و ادی
چطور میتونم سه اسلاید منو رو تو یه صفحه بزارم در حالی که وقتی اسلاید منو بسته هست VieaPagerم نشون داده بشه؟

با مثال منظورم اینه چطور میتونم یه layout مثل وایبر داشته باشم که اسلای منو هم داشته باشه؟!

با سپاس

مشکل بعدیم اینه وقتی ترکیب میکنم Slidemenu , ViewPager رو تو private DrawerLayout mDrawerLayout; خطا میگیره و میگه نمیشناسه!!

مانند زیر

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<!-- Framelayout to display Fragments -->

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frame_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<com.viewpagerindicator.TabPageIndicator
android:id="@+id/indicator"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
/>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>

</LinearLayout>
<!-- Listview to display slider menu -->

<ListView
android:id="@+id/list_slidermenu"
android:layout_width="260dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/jomlak"
android:layout_gravity="start"
android:background="@color/list_background"
android:choiceMode="singleChoice"
android:divider="@color/list_divider"
android:dividerHeight="1dp"
android:listSelector="@drawable/list_selector" />

</android.support.v4.widget.DrawerLayout>

harani
پنج شنبه 20 شهریور 1393, 21:31 عصر
مشکل بعدیم اینه وقتی ترکیب میکنم Slidemenu , ViewPager رو تو private DrawerLayout mDrawerLayout; خطا میگیره و میگه نمیشناسه!!


روی پروژت راست کلیک کن سپس android tools و سپس add support libaray رو بزن (vpn داشته باشی بهتره)

MSHService
پنج شنبه 20 شهریور 1393, 23:09 عصر
متشکرم دوست عزیزم
اون کارو کردم من V13 رو دارم که هم V4 , هم v7 رو ساپورت میکنه.

من میخوام چنین Layoutی بسازم.

لطفا راهنماییم کنید.

?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white" >

<LinearLayout
android:id="@+id/llayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="vertical" >

<include layout="@layout/top1" />

<include layout="@layout/top2" />
</LinearLayout>

<com.example.isweixin.MyScrollLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_below="@id/llayout" >
<!-- -->
<com.example.isweixin.MyFrame
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/white" >

<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="@android:color/transparent"
android:divider="@drawable/reader_item_divider"
android:listSelector="@android:color/transparent" >
</ListView>
</com.example.isweixin.MyFrame>
<!-- -->
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/white" >

<include layout="@layout/faxian" />
</FrameLayout>
<!-- -->
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/white" >

<ListView
android:id="@+id/listView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="@android:color/transparent"
android:divider="@drawable/reader_item_divider"
android:listSelector="@android:color/transparent" >
</ListView>
</FrameLayout>
</com.example.isweixin.MyScrollLayout>

</RelativeLayout>

MSHService
جمعه 21 شهریور 1393, 13:36 عصر
کسی نیست به من کمک کنه؟!!

MSHService
دوشنبه 24 شهریور 1393, 11:13 صبح
..... UP :)