Android layout RecyclerView的卡片项目详细信息在pre-lollipop设备中不可见
这就是问题所在,RecyclerView可以在棒棒糖设备中显示项目详细信息。但是当我在pre Lollipop devices卡视图中打开时,显示的是相同的apk,但没有显示详细信息。会出现什么问题 RecyclerView(适配器和视图支架) 公共类CustomAdapter扩展了RecyclerView.Adapter{ 私人充气机; 私有列表传递数据; 公共语境; 公共CustomViewHolder onCreateViewHolder(视图组视图组,int i) 充气器=LayoutInflater.from(viewGroup.getContext()); 视图v=充气机。充气(R.layout.item_视图,视图组,false); CustomViewHolder=新CustomViewHolder(v); 报税表持有人; } @凌驾 BindViewHolder上的公共无效(CustomViewHolder,int i){ Story s=passedData.get(i); 持有人.所有权.设定文本(s.所有权); holder.subTitle.setText(s.subTitle); holder.thumbNail.setImageResource(s.thumbimageId); setAnimation(holder.container,i); } @凌驾 public int getItemCount(){ 返回passedData.size(); } 公共类CustomViewHolder扩展了RecyclerView.ViewHolder实现了View.OnClickListener{ CardView容器; 文本视图标题; 文本视图字幕; 图像视图缩略图; 字体tf_规则; 公共CustomViewHolder(查看项目视图){ 超级(项目视图); setOnClickListener(这个); this.title=(TextView)itemView.findViewById(R.id.storyTitle); this.subTitle=(TextView)itemView.findViewById(R.id.StoryStitle); this.container=(CardView)itemView.findViewById(R.id.containerView); this.thumboil=(ImageView)itemView.findViewById(R.id.thumboil); tf_regular=Typeface.createFromAsset(context.getAssets(),“font/Bertica regular.ttf”); 此.title.setTypeface(tf_常规); } styles.xmlAndroid layout RecyclerView的卡片项目详细信息在pre-lollipop设备中不可见,android-layout,android-5.0-lollipop,android-theme,android-recyclerview,android-viewholder,Android Layout,Android 5.0 Lollipop,Android Theme,Android Recyclerview,Android Viewholder,这就是问题所在,RecyclerView可以在棒棒糖设备中显示项目详细信息。但是当我在pre Lollipop devices卡视图中打开时,显示的是相同的apk,但没有显示详细信息。会出现什么问题 RecyclerView(适配器和视图支架) 公共类CustomAdapter扩展了RecyclerView.Adapter{ 私人充气机; 私有列表传递数据; 公共语境; 公共CustomViewHolder onCreateViewHolder(视图组视图组,int i) 充气器=LayoutI
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base">
<!-- Customize your theme here. -->
</style>
<style name="AppTheme.Base" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/toolBarBackground</item>
<item name="colorPrimaryDark">@color/statusBarColor</item>
<item name="android:windowBackground">@color/gray</item>
<item name="android:textColorPrimary">@color/textPrimaryColor</item>
<item name="android:textColorSecondary">@color/textPrimaryColor</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".MyApplication">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
@颜色/背景
@颜色/状态栏颜色
@颜色/灰色
@颜色/文本原色
@颜色/文本原色
v21/styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base">
<!-- Customize your theme here. -->
</style>
<style name="AppTheme.Base" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/toolBarBackground</item>
<item name="colorPrimaryDark">@color/statusBarColor</item>
<item name="android:windowBackground">@color/gray</item>
<item name="android:textColorPrimary">@color/textPrimaryColor</item>
<item name="android:textColorSecondary">@color/textPrimaryColor</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".MyApplication">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
@颜色/背景
@颜色/状态栏颜色
@颜色/灰色
@颜色/文本原色
@颜色/文本原色
@颜色/背景
AndroidManifest.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base">
<!-- Customize your theme here. -->
</style>
<style name="AppTheme.Base" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/toolBarBackground</item>
<item name="colorPrimaryDark">@color/statusBarColor</item>
<item name="android:windowBackground">@color/gray</item>
<item name="android:textColorPrimary">@color/textPrimaryColor</item>
<item name="android:textColorSecondary">@color/textPrimaryColor</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".MyApplication">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
谢谢你的帮助。我解决了。
基本上,我的card view上有一个连锁反应。它在棒棒糖前的设备中不起作用。我删除了连锁反应,然后它变成了一个魅力:)发布您如何从中访问RecyclerView和cardView的代码xml@nitesh还添加了recyclerView代码。。