derrida
asked on
recyclerview and cardview appear only on nexus 5 23 API emulator
I am new to Android and Java. I have a navigation drawer with a list in it, and I have a RecyclerView with CardViews in it. It all shows up on the Nexus 5 with API 23, but when I try other emulators nothing appears: neither the list in the drawer, nor the cards.
In my Gradle file I have these dependencies:
compile 'com.android.support:appco mpat-v7:23 .2.1'
compile 'com.android.support:desig n:23.2.1'
compile 'com.android.support:cardv iew-v7:23. 2.0'
compile 'com.android.support:recyc lerview-v7 :23.2.0'
I do not get any errors, but my views still do not show up.
this is my activity_main.xml:
this is my content_main.xml:
any idea?
In my Gradle file I have these dependencies:
compile 'com.android.support:appco
compile 'com.android.support:desig
compile 'com.android.support:cardv
compile 'com.android.support:recyc
I do not get any errors, but my views still do not show up.
this is my activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="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"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- app:menu="@menu/activity_main_drawer" -->
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
>
<ListView
android:id="@+id/munuList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
android:layout_marginTop="160dp"
>
</ListView>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
this is my content_main.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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.ronsh.quoteme.MainActivity"
tools:showIn="@layout/app_bar_main"
android:background="#ccc">
<android.support.v7.widget.RecyclerView
android:id="@+id/cards_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:background="#eeff99"/>
</RelativeLayout>
any idea?
ASKER
anyone?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i have tried to change the gradle to API 19, 21, 22, and nothing.
anyone?