小编Gab*_*ito的帖子

Recycler视图点击动画

我想添加一些点击动画如下所示我回收的看法,但没有成功.这是我的一些代码.

在我的活动中

@Override
protected void onCreate(Bundle savedInstanceState) {
    ...
    mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);
    ItemOffsetDecoration itemDecoration = new ItemOffsetDecoration(this, R.dimen.card_item_offset);
    mRecyclerView.addItemDecoration(itemDecoration);

    mLayoutManager = new LinearLayoutManager(this);
    mRecyclerView.setLayoutManager(mLayoutManager);

    mAdapter = new CustomAdapter(this);
    mRecyclerView.setAdapter(mAdapter);
}
Run Code Online (Sandbox Code Playgroud)

在我的ViewHolder中

public CustomViewHolder(View itemView) {
    super(itemView);
    this.itemView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            /* on click stuff here */
        }
    });
}
Run Code Online (Sandbox Code Playgroud)

在我的CardView.xml里面

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:id="@+id/card_loading"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    card_view:cardCornerRadius="4dp"
    android:clickable="true"
    android:background="?android:attr/selectableItemBackground">

    <TextView
        android:id="@+id/card_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</android.support.v7.widget.CardView>
Run Code Online (Sandbox Code Playgroud)

不确定问题出在哪里,但提前感谢您帮助=)

android ripple material-design android-cardview android-recyclerview

9
推荐指数
1
解决办法
1万
查看次数

React Native是否支持box-shadow参数传播半径?

Wiki仅指:shadowColor(color)、shadowOffset(object)、shadowOpacity(number) 和shadowRadius(number)。可以使用传播半径或者不支持此属性?

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

div {
  width: 200px;
  height: 200px;
  box-shadow: 0 0 0 20px rgba(0, 0, 0, 0.2);
}
Run Code Online (Sandbox Code Playgroud)
<div/>
Run Code Online (Sandbox Code Playgroud)

react-native

6
推荐指数
1
解决办法
1507
查看次数

删除谷歌地方图标

我如何删除谷歌地方标记?如下所示,这是我没有放在地图上的标记(用蓝色标记).顺便说一句,可以使用谷歌地方的标记而不是我自己的自定义标记(标记为红色).

先感谢您

android android-maps

3
推荐指数
1
解决办法
2981
查看次数