#android #android-layout
#Android #android-макет
Вопрос:
В моей деятельности мне нужны баннер, просмотр сетки и слайдер, но просмотр сетки не отображается на экране после установки приложения на мобильный, пожалуйста, помогите мне. вот мой XML-файл. а также установите scrollview для всего содержимого в xml.Мне нужен вывод, подобный этому экрану, но мой экран отображается так
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@ id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@ id/container_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@ id/toolbar"
layout="@layout/toolbar" />
</LinearLayout>
<ViewFlipper
android:id="@ id/flipper1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:flipInterval="3000"
android:inAnimation="@android:anim/slide_in_left"
android:outAnimation="@android:anim/slide_out_right">
<ImageView
android:layout_width="match_parent"
android:layout_height="110dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-9dp"
android:contentDescription="ImageOne"
android:src="@drawable/banners" />
<!-- <ImageView
android:src="@drawable/handmadeproducts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="ImageTwo"
android:layout_gravity="center_horizontal"
/>-->
</ViewFlipper>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<GridView
android:id="@ id/grid"
android:layout_width="fill_parent"
android:layout_height="270dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_margin="30dp"
android:layout_marginTop="-10dp"
android:columnWidth="200dp"
android:gravity="center"
android:horizontalSpacing="25dp"
android:numColumns="3"
android:verticalSpacing="20dp" />
<android.support.v7.widget.RecyclerView
android:id="@ id/my_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:scrollbars="none" />
</LinearLayout>
</ScrollView>
</LinearLayout>
<FrameLayout
android:id="@ id/container_body"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<fragment
android:id="@ id/fragment_navigation_drawer"
android:name="com.dk.buyolx.activity.FragmentDrawer"
android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
app:layout="@layout/fragment_navigation_drawer"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
Комментарии:
1. Публикуйте изображения того, что вы получаете и чего хотите.
2. Не ясно с вашим вопросом, покажите нам несколько примеров экранов.
3. требуется скриншот вывода
4. да, я добавил два экрана
5. пожалуйста, дайте мне решение для этого