好的,我在Android Studio 3.0中创建了一个全新的项目.Gradle构建在这个新实例化的项目中工作正常,直到我在我的模块中插入以下行build.gradle
dependencies {
...
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.1.0'
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.1.0'
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.1.0'
}
Run Code Online (Sandbox Code Playgroud)
这是我在构建日志中遇到的错误
/home/sparker0i/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.0.1.aar/e06e09188fb79d4d895b39247477d1c1/res/values/values.xml
Error:(246, 5) resource android:attr/foregroundInsidePadding is private
Run Code Online (Sandbox Code Playgroud)
当我双击它时,我得到一个values.xml文件(合并一个),指针所在的位置
<dimen name="abc_action_bar_content_inset_material">16dp</dimen>
Run Code Online (Sandbox Code Playgroud)
我的最低SDK版本是16,目标SDK是26.我使用的是Android Studio 3.0 Beta 2,构建工具版本是26.0.1.Gradle插件3.0.0-beta2.
我敢打赌这是因为有一个稍微过时的Cardslib库.有没有办法解决这个问题?(从依赖项中删除这些行工作正常)
嗨,我正在尝试使用支持库https://developer.android.com/reference/android/support/v7/widget/CardView.html创建这样的布局,但我没有找到一种方法来添加溢出图标卡.
我不想使用这个库https://github.com/gabrielemariotti/cardslib/blob/master/doc/CARDGRID.md.我想使用Google最近推出的支持库来做同样的事情.
是不是有办法实现使用支持库或我必须使用gabrielemariotti库在卡片视图中添加溢出项目.

伙计们我现在编辑了问题,我想要的更清楚.
我正在从Github的Cardslib库中实现新的Material Card设计.Library Link:Cardslib Github 但是我无法在Recycler视图中实现多张卡片.如果有人已经实现了新的Cardslib v2库,那将非常有用.
问题是,卡片即将到来,但那些没有背景图像和动作按钮.
我想要实现的卡布局是:

这是RecyclerView的代码
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
card:list_card_layout_resourceID="@layout/native_recyclerview_card_layout"
android:id="@+id/card_recyclerview"/>
Run Code Online (Sandbox Code Playgroud)
这是活动的代码
public class AboutActivity extends ActionBarActivity {
final int TOTAL_CARDS = 3;
//private CardArrayAdapter
private CardArrayRecyclerViewAdapter mCardArrayAdapter;
private CardRecyclerView mRecyclerView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.about_activity);
ArrayList<Card> cards = new ArrayList<>();
mCardArrayAdapter = new CardArrayRecyclerViewAdapter(this, cards);
//Staggered grid view
CardRecyclerView mRecyclerView = (CardRecyclerView) findViewById(R.id.card_recyclerview);
mRecyclerView.setHasFixedSize(false);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
//Set the empty view
if (mRecyclerView != null) {
mRecyclerView.setAdapter(mCardArrayAdapter);
}
//Load cards …Run Code Online (Sandbox Code Playgroud)