{"id":768,"date":"2023-01-21T01:09:55","date_gmt":"2023-11-30T09:16:48","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/"},"modified":"2025-08-01T02:18:18","modified_gmt":"2025-07-31T17:18:18","slug":"android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","title":{"rendered":"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"},"content":{"rendered":"<p>Android Lollipop\u3067\u5c0e\u5165\u3055\u308c\u305fAndroid RecyclerView\u3068Android CardView\u306f\u3001\u30de\u30c6\u30ea\u30a2\u30eb\u30c7\u30b6\u30a4\u30f3\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u30de\u30c6\u30ea\u30a2\u30eb\u30c7\u30b6\u30a4\u30f3\u306f\u3001Android 5.0\u4ee5\u964d\u5c0e\u5165\u3055\u308c\u305fUI\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u5305\u62ec\u7684\u306a\u30ac\u30a4\u30c9\u3067\u3042\u308a\u3001\u30a2\u30d7\u30ea\u306e\u8996\u899a\u7684\u306a\u9b45\u529b\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\u3002<\/p>\n<h2>\u30a2\u30f3\u30c9\u30ed\u30a4\u30c9\u306e\u30ea\u30b5\u30a4\u30af\u30e9\u30fc\u30d3\u30e5\u30fc<\/h2>\n<p>Android\u306eRecyclerView\u306f\u3001ListView\u306e\u3088\u308a\u9ad8\u5ea6\u3067\u30d1\u30ef\u30d5\u30eb\u3067\u67d4\u8edf\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002Android\u306eRecyclerView\u306f\u3001ListView\u3068\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001ListView\u3067\u306f\u5f37\u5236\u3055\u308c\u306a\u3044\u8981\u7d20\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306bRecyclerView.ViewHolder\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u540d\u524d\u306e\u901a\u308a\u3001Android\u306eRecyclerView\u306f\u3001\u30ea\u30b9\u30c8\u5185\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u30ea\u30b5\u30a4\u30af\u30eb\u3059\u308b\u3053\u3068\u3067\u4e0a\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u969b\u306b\u30bb\u30eb\u3092\u518d\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002RecyclerView\u306e\u3082\u30461\u3064\u306e\u6539\u5584\u70b9\u306f\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u3067\u30ec\u30a4\u30a2\u30a6\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3092\u52d5\u7684\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u308c\u306b\u5bfe\u3057\u3001ListView\u306f\u5782\u76f4\u30b9\u30af\u30ed\u30fc\u30eb\u306e\u30ea\u30b9\u30c8\u306e\u307f\u304c\u5229\u7528\u53ef\u80fd\u3067\u3057\u305f\u3002RecyclerView\u3067\u306f\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u6642\u306b\u4ee5\u4e0b\u306e\u30bf\u30a4\u30d7\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>LinearLayoutManager : it supports both vertical and horizontal lists<\/li>\n<li>StaggeredLayoutManager : it supports staggered lists<\/li>\n<li>GridLayoutManager : it supports displaying grids as seen in GalleryView earlier<\/li>\n<\/ul>\n<h3>\u30a2\u30f3\u30c9\u30ed\u30a4\u30c9\u306e\u30ea\u30b5\u30a4\u30af\u30eb\u30d3\u30e5\u30fc\u30af\u30e9\u30b9 (Andoroido no risaikuru by\u016b kurasu)<\/h3>\n<ul class=\"post-ul\">\n<li>The RecyclerView.ItemAnimator class provides better support to animating the views unlike the ListViews<\/li>\n<li>The RecyclerView.ItemDecorator class provides better support when it comes to adding borders and dividers thereby giving huge control to us<\/li>\n<\/ul>\n<p>\u3060\u304b\u3089\u3001RecyclerView\u306fListView\u3068\u6bd4\u3079\u3066\u3088\u308a\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u53ef\u80fd\u3067\u3042\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u3088\u308a\u5927\u304d\u306a\u5236\u5fa1\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002RecyclerView\u306f\u30b5\u30dd\u30fc\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306bgradle\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4fee\u6b63\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>dependencies {\r\n       compile 'com.android.support:recyclerview-v7:21.0.0-rc1'\r\n }\r\n<\/code><\/pre>\n<h2>\u30a2\u30f3\u30c9\u30ed\u30a4\u30c9\u306eCardView<\/h2>\n<p>Android CardView UI\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u3001\u30ab\u30fc\u30c9\u306e\u5185\u90e8\u306b\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u901a\u5e38\u3001\u3053\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u9023\u7d61\u5148\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u5225\u306e\u30b5\u30dd\u30fc\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3082\u5229\u7528\u53ef\u80fd\u3067\u3042\u308b\u305f\u3081\u3001\u305d\u306e\u4f9d\u5b58\u95a2\u4fc2\u3082\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>dependencies {\r\n        compile 'com.android.support:cardview-v7:21.0.0-rc1'\r\n        compile 'com.android.support:recyclerview-v7:21.0.0-rc1'\r\n }\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306f\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u306a\u65e5\u672c\u8a9e\u3067\u306e\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<p>Android\u306eCardView\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306f\u3001\u80cc\u666f\u8272\u3001\u5f71\u3001\u89d2\u306e\u534a\u5f84\u3001\u9ad8\u3055\u306a\u3069\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002XML\u3067\u30ab\u30b9\u30bf\u30e0\u5c5e\u6027\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u89aa\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u306b\u4ee5\u4e0b\u306e\u540d\u524d\u7a7a\u9593\u5ba3\u8a00\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u306e\u3044\u304f\u3064\u304b\u306e\u5c5e\u6027\u3092\u542b\u3093\u3060\u540d\u524d\u7a7a\u9593\u5ba3\u8a00\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;android.support.v7.widget.CardView\r\n        android:id=\"@+id\/card_view\"\r\n        xmlns:card_view=\"https:\/\/schemas.android.com\/apk\/res-auto\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        card_view:cardBackgroundColor=\"@color\/grey_300\"\r\n        card_view:cardCornerRadius=\"10dp\"\r\n        card_view:cardElevation=\"5dp\"\r\n        card_view:cardUseCompatPadding=\"true\"&gt;\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u3067\u4f7f\u7528\u3055\u308c\u308b\u91cd\u8981\u306a\u5c5e\u6027\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>card_view:cardCornerRadius : Used to set the corner radius in our layouts<\/li>\n<li>card_view:cardBackgroundColor : Used to set the background color of the view<\/li>\n<\/ul>\n<p>\u79c1\u305f\u3061\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001Android\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u540d\u3068\u756a\u53f7\u3001\u305d\u3057\u3066\u30b5\u30f3\u30d7\u30eb\u306e\u30ed\u30b4\u3092\u542b\u3080CardView\u306e\u30ea\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306bRecyclerView\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002CardView\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u5834\u5408\u306f\u3001\u305d\u306e\u30ab\u30fc\u30c9\u3092\u30ea\u30b9\u30c8\u304b\u3089\u524a\u9664\u3059\u308b\u3088\u3046\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3055\u308c\u3066\u3044\u307e\u3059\u3002ActionBar\u306b\u306f\u3001\u524a\u9664\u3055\u308c\u305f\u30ab\u30fc\u30c9\u3092\u9806\u306b\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u30e1\u30cb\u30e5\u30fc\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u6ce8\u610f\uff1a\u30ed\u30b4\u753b\u50cf\u306f\u30e9\u30f3\u30c0\u30e0\u306bGoogle\u304b\u3089\u53d6\u5f97\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u30b5\u30a4\u30ba\u306f\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30a2\u30f3\u30c9\u30ed\u30a4\u30c9\u306eRecyclerView\u3068CardView\u306e\u4f8b<\/h3>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u3001RecyclerView\u3092\u8868\u793a\u3059\u308bMainActivity\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002CardView\u306fCustomAdapter\u30af\u30e9\u30b9\u304b\u3089RecyclerView\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002DataModel\u306f\u5404CardView\u306e\u30c7\u30fc\u30bf\u3092\u30b2\u30c3\u30bf\u30fc\u3092\u901a\u3058\u3066\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002MyData\u30af\u30e9\u30b9\u306b\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u30d3\u30e5\u30fc\u3068\u30c9\u30ed\u30fc\u30a2\u30d6\u30eb\u306e\u914d\u5217\u3068\u305d\u308c\u3089\u306eID\u304c\u4fdd\u6301\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>Android\u306eRecyclerView\u3068CardView\u306e\u4f8b\u984c\u30b3\u30fc\u30c9<\/h3>\n<p>activity_main.xml\u306b\u306f\u3001\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306bRelativeLayout\u5185\u306bRecyclerView\u304c\u914d\u7f6e\u3055\u308c\u3066\u3044\u307e\u3059\u3002activity_main.xml\u306e\u30b3\u30fc\u30c9\uff1a<\/p>\n<pre class=\"post-pre\"><code>&lt;RelativeLayout xmlns:android=\"https:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:tools=\"https:\/\/schemas.android.com\/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:paddingBottom=\"@dimen\/activity_vertical_margin\"\r\n    android:paddingLeft=\"@dimen\/activity_horizontal_margin\"\r\n    android:paddingRight=\"@dimen\/activity_horizontal_margin\"\r\n    android:paddingTop=\"@dimen\/activity_vertical_margin\"\r\n    tools:context=\".MainActivity\"\r\n    android:background=\"@color\/grey_300\"\r\n    &gt;\r\n\r\n    &lt;android.support.v7.widget.RecyclerView\r\n        android:id=\"@+id\/my_recycler_view\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\"\r\n        android:scrollbars=\"vertical\"\r\n        \/&gt;\r\n\r\n&lt;\/RelativeLayout&gt;\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306fAndroid\u306eCardView\u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u5b9a\u7fa9\u3067\u3059: cards_layout.xml\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"https:\/\/schemas.android.com\/apk\/res\/android\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    android:tag=\"cards main container\"&gt;\r\n\r\n    &lt;android.support.v7.widget.CardView\r\n        android:id=\"@+id\/card_view\"\r\n        xmlns:card_view=\"https:\/\/schemas.android.com\/apk\/res-auto\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        card_view:cardBackgroundColor=\"@color\/color_white\"\r\n        card_view:cardCornerRadius=\"10dp\"\r\n        card_view:cardElevation=\"5dp\"\r\n        card_view:cardUseCompatPadding=\"true\"&gt;\r\n\r\n        &lt;LinearLayout\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:orientation=\"horizontal\"\r\n            &gt;\r\n\r\n            &lt;ImageView\r\n                android:id=\"@+id\/imageView\"\r\n                android:tag=\"image_tag\"\r\n                android:layout_width=\"0dp\"\r\n                android:layout_height=\"wrap_content\"\r\n                android:layout_margin=\"5dp\"\r\n                android:layout_weight=\"1\"\r\n                android:src=\"@drawable\/ic_launcher\"\/&gt;\r\n\r\n            &lt;LinearLayout\r\n                android:layout_width=\"0dp\"\r\n                android:layout_height=\"wrap_content\"\r\n                android:layout_marginTop=\"12dp\"\r\n                android:layout_weight=\"2\"\r\n                android:orientation=\"vertical\"\r\n                &gt;\r\n\r\n                &lt;TextView\r\n                    android:id=\"@+id\/textViewName\"\r\n                    android:layout_width=\"wrap_content\"\r\n                    android:layout_height=\"wrap_content\"\r\n                    android:layout_gravity=\"center_horizontal\"\r\n                    android:layout_marginTop=\"10dp\"\r\n                    android:text=\"Android Name\"\r\n                    android:textAppearance=\"?android:attr\/textAppearanceLarge\"\/&gt;\r\n\r\n                &lt;TextView\r\n                    android:id=\"@+id\/textViewVersion\"\r\n                    android:layout_width=\"wrap_content\"\r\n                    android:layout_height=\"wrap_content\"\r\n                    android:layout_gravity=\"center_horizontal\"\r\n                    android:layout_marginTop=\"10dp\"\r\n\r\n                    android:text=\"Android Version\"\r\n                    android:textAppearance=\"?android:attr\/textAppearanceMedium\"\/&gt;\r\n\r\n            &lt;\/LinearLayout&gt;\r\n        &lt;\/LinearLayout&gt;\r\n\r\n    &lt;\/android.support.v7.widget.CardView&gt;\r\n\r\n&lt;\/LinearLayout&gt;\r\n<\/code><\/pre>\n<p>Android CardView\u306f\u3001\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30ea\u30cb\u30a2\u30ec\u30a4\u30a2\u30a6\u30c8\u5185\u306bImageView\u30682\u3064\u306eTextView\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002menu_main.xml\u306b\u306f\u3001\u524a\u9664\u3055\u308c\u305f\u30ab\u30fc\u30c9\u3092\u623b\u3059\u305f\u3081\u306e\u5358\u4e00\u306e\u30a2\u30a4\u30c6\u30e0\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002menu_main.xml\u306e\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;menu xmlns:android=\"https:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:app=\"https:\/\/schemas.android.com\/apk\/res-auto\"\r\n    xmlns:tools=\"https:\/\/schemas.android.com\/tools\"\r\n    tools:context=\".MainActivity\"&gt;\r\n    &lt;item android:id=\"@+id\/add_item\"\r\n        android:title=\"Add\"\r\n        android:orderInCategory=\"100\"\r\n        app:showAsAction=\"always\"\/&gt;\r\n&lt;\/menu&gt;\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306bMainActivity.java\u30af\u30e9\u30b9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.recyclerviewcardview;\r\n\r\nimport android.content.Context;\r\nimport android.support.v7.app.AppCompatActivity;\r\nimport android.os.Bundle;\r\nimport android.support.v7.widget.DefaultItemAnimator;\r\nimport android.support.v7.widget.LinearLayoutManager;\r\nimport android.support.v7.widget.RecyclerView;\r\nimport android.view.Menu;\r\nimport android.view.MenuItem;\r\nimport android.view.View;\r\nimport android.widget.TextView;\r\nimport android.widget.Toast;\r\n\r\nimport java.util.ArrayList;\r\n\r\npublic class MainActivity extends AppCompatActivity {\r\n\r\n    private static RecyclerView.Adapter adapter;\r\n    private RecyclerView.LayoutManager layoutManager;\r\n    private static RecyclerView recyclerView;\r\n    private static ArrayList&lt;DataModel&gt; data;\r\n    static View.OnClickListener myOnClickListener;\r\n    private static ArrayList&lt;Integer&gt; removedItems;\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_main);\r\n\r\n        myOnClickListener = new MyOnClickListener(this);\r\n\r\n        recyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);\r\n        recyclerView.setHasFixedSize(true);\r\n\r\n        layoutManager = new LinearLayoutManager(this);\r\n        recyclerView.setLayoutManager(layoutManager);\r\n        recyclerView.setItemAnimator(new DefaultItemAnimator());\r\n\r\n        data = new ArrayList&lt;DataModel&gt;();\r\n        for (int i = 0; i &lt; MyData.nameArray.length; i++) {\r\n            data.add(new DataModel(\r\n                    MyData.nameArray[i],\r\n                    MyData.versionArray[i],\r\n                    MyData.id_[i],\r\n                    MyData.drawableArray[i]\r\n            ));\r\n        }\r\n\r\n        removedItems = new ArrayList&lt;Integer&gt;();\r\n\r\n        adapter = new CustomAdapter(data);\r\n        recyclerView.setAdapter(adapter);\r\n    }\r\n\r\n\r\n    private static class MyOnClickListener implements View.OnClickListener {\r\n\r\n        private final Context context;\r\n\r\n        private MyOnClickListener(Context context) {\r\n            this.context = context;\r\n        }\r\n\r\n        @Override\r\n        public void onClick(View v) {\r\n            removeItem(v);\r\n        }\r\n\r\n        private void removeItem(View v) {\r\n            int selectedItemPosition = recyclerView.getChildPosition(v);\r\n            RecyclerView.ViewHolder viewHolder\r\n                    = recyclerView.findViewHolderForPosition(selectedItemPosition);\r\n            TextView textViewName\r\n                    = (TextView) viewHolder.itemView.findViewById(R.id.textViewName);\r\n            String selectedName = (String) textViewName.getText();\r\n            int selectedItemId = -1;\r\n            for (int i = 0; i &lt; MyData.nameArray.length; i++) {\r\n                if (selectedName.equals(MyData.nameArray[i])) {\r\n                    selectedItemId = MyData.id_[i];\r\n                }\r\n            }\r\n            removedItems.add(selectedItemId);\r\n            data.remove(selectedItemPosition);\r\n            adapter.notifyItemRemoved(selectedItemPosition);\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public boolean onCreateOptionsMenu(Menu menu) {\r\n        super.onCreateOptionsMenu(menu);\r\n        getMenuInflater().inflate(R.menu.menu_main, menu);\r\n        return true;\r\n    }\r\n\r\n    @Override\r\n    public boolean onOptionsItemSelected(MenuItem item) {\r\n        super.onOptionsItemSelected(item);\r\n        if (item.getItemId() == R.id.add_item) {\r\n           \/\/check if any items to add\r\n            if (removedItems.size() != 0) {\r\n                addRemovedItemToList();\r\n            } else {\r\n                Toast.makeText(this, \"Nothing to add\", Toast.LENGTH_SHORT).show();\r\n            }\r\n        }\r\n        return true;\r\n    }\r\n\r\n    private void addRemovedItemToList() {\r\n        int addItemAtListPosition = 3;\r\n        data.add(addItemAtListPosition, new DataModel(\r\n                MyData.nameArray[removedItems.get(0)],\r\n                MyData.versionArray[removedItems.get(0)],\r\n                MyData.id_[removedItems.get(0)],\r\n                MyData.drawableArray[removedItems.get(0)]\r\n        ));\r\n        adapter.notifyItemInserted(addItemAtListPosition);\r\n        removedItems.remove(0);\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>listener\u30e1\u30bd\u30c3\u30c9\u304b\u3089removeItems()\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u30af\u30ea\u30c3\u30af\u3055\u308c\u305fCardView\u3092\u524a\u9664\u3057\u307e\u3059\u3002\u524a\u9664\u3057\u305fCardView\u306eid\u306f\u5f8c\u3067\u53c2\u7167\u3059\u308b\u305f\u3081\u306b\u914d\u5217\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002\u5f8c\u3067\u30d3\u30e5\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001addRemovedItemToList()\u3068\u3044\u3046\u5225\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u305d\u306e\u30d3\u30e5\u30fc\u3092\u30ea\u30b9\u30c8\u306e\u4e8b\u524d\u5b9a\u7fa9\u3055\u308c\u305f\u4f4d\u7f6e\u306b\u8ffd\u52a0\u3057\u3001removedItems\u914d\u5217\u304b\u3089\u305d\u306eid\u3092\u524a\u9664\u3057\u307e\u3059\u3002\u4e21\u65b9\u306e\u30b1\u30fc\u30b9\u3067CustomAdapter\u306b\u901a\u77e5\u3055\u308c\u307e\u3059\u3002CustomeAdapter.java\u30af\u30e9\u30b9\u306e\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.recyclerviewcardview;\r\n\r\nimport android.support.v7.widget.RecyclerView;\r\nimport android.view.LayoutInflater;\r\nimport android.view.View;\r\nimport android.view.ViewGroup;\r\nimport android.widget.ImageView;\r\nimport android.widget.TextView;\r\n\r\nimport java.util.ArrayList;\r\n\r\npublic class CustomAdapter extends RecyclerView.Adapter&lt;CustomAdapter.MyViewHolder&gt; {\r\n\r\n    private ArrayList&lt;DataModel&gt; dataSet;\r\n\r\n    public static class MyViewHolder extends RecyclerView.ViewHolder {\r\n\r\n        TextView textViewName;\r\n        TextView textViewVersion;\r\n        ImageView imageViewIcon;\r\n\r\n        public MyViewHolder(View itemView) {\r\n            super(itemView);\r\n            this.textViewName = (TextView) itemView.findViewById(R.id.textViewName);\r\n            this.textViewVersion = (TextView) itemView.findViewById(R.id.textViewVersion);\r\n            this.imageViewIcon = (ImageView) itemView.findViewById(R.id.imageView);\r\n        }\r\n    }\r\n\r\n    public CustomAdapter(ArrayList&lt;DataModel&gt; data) {\r\n        this.dataSet = data;\r\n    }\r\n\r\n    @Override\r\n    public MyViewHolder onCreateViewHolder(ViewGroup parent,\r\n                                           int viewType) {\r\n        View view = LayoutInflater.from(parent.getContext())\r\n                .inflate(R.layout.cards_layout, parent, false);\r\n\r\n        view.setOnClickListener(MainActivity.myOnClickListener);\r\n\r\n        MyViewHolder myViewHolder = new MyViewHolder(view);\r\n        return myViewHolder;\r\n    }\r\n\r\n    @Override\r\n    public void onBindViewHolder(final MyViewHolder holder, final int listPosition) {\r\n\r\n        TextView textViewName = holder.textViewName;\r\n        TextView textViewVersion = holder.textViewVersion;\r\n        ImageView imageView = holder.imageViewIcon;\r\n\r\n        textViewName.setText(dataSet.get(listPosition).getName());\r\n        textViewVersion.setText(dataSet.get(listPosition).getVersion());\r\n        imageView.setImageResource(dataSet.get(listPosition).getImage());\r\n    }\r\n\r\n    @Override\r\n    public int getItemCount() {\r\n        return dataSet.size();\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001RecyclerView.ViewHolder\u3092\u62e1\u5f35\u3057\u3066\u72ec\u81ea\u306eViewHolder\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u30d3\u30e5\u30fc\u306f\u3001layouts\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u5b9a\u7fa9\u3057\u305fcards_layout.xml\u304b\u3089\u30a4\u30f3\u30d5\u30ec\u30fc\u30c8\u3055\u308c\u307e\u3059\u3002MainActivity\u306eonClickListener\u306f\u3001\u4ee5\u4e0b\u306e\u30b9\u30cb\u30da\u30c3\u30c8\u3067\u3053\u306e\u30d3\u30e5\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>view.setOnClickListener(MainActivity.myOnClickListener);\r\n<\/code><\/pre>\n<p>ArrayList\u306f\u3001DataModel\u30af\u30e9\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092ArrayList\u5185\u306b\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3001\u30ea\u30b9\u30c8\u306e\u305d\u308c\u305e\u308c\u306e\u30ab\u30fc\u30c9\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u56fa\u6709\u306e\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u308bDataModel.java\u3068MyData.java\u30af\u30e9\u30b9\u306f\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.recyclerviewcardview;\r\n\r\npublic class DataModel {\r\n\r\n    String name;\r\n    String version;\r\n    int id_;\r\n    int image;\r\n\r\n    public DataModel(String name, String version, int id_, int image) {\r\n        this.name = name;\r\n        this.version = version;\r\n        this.id_ = id_;\r\n        this.image=image;\r\n    }\r\n\r\n    public String getName() {\r\n        return name;\r\n    }\r\n\r\n    public String getVersion() {\r\n        return version;\r\n    }\r\n\r\n    public int getImage() {\r\n        return image;\r\n    }\r\n\r\n    public int getId() {\r\n        return id_;\r\n    }\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>package com.scdev.recyclerviewcardview;\r\n\r\npublic class MyData {\r\n\r\n    static String[] nameArray = {\"Cupcake\", \"Donut\", \"Eclair\", \"Froyo\", \"Gingerbread\", \"Honeycomb\", \"Ice Cream Sandwich\",\"JellyBean\", \"Kitkat\", \"Lollipop\", \"Marshmallow\"};\r\n    static String[] versionArray = {\"1.5\", \"1.6\", \"2.0-2.1\", \"2.2-2.2.3\", \"2.3-2.3.7\", \"3.0-3.2.6\", \"4.0-4.0.4\", \"4.1-4.3.1\", \"4.4-4.4.4\", \"5.0-5.1.1\",\"6.0-6.0.1\"};\r\n\r\n    static Integer[] drawableArray = {R.drawable.cupcake, R.drawable.donut, R.drawable.eclair,\r\n            R.drawable.froyo, R.drawable.gingerbread, R.drawable.honeycomb, R.drawable.ics,\r\n            R.drawable.jellybean, R.drawable.kitkat, R.drawable.lollipop,R.drawable.marsh};\r\n\r\n    static Integer[] id_ = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\r\n}\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306f\u3001\u79c1\u305f\u3061\u306eAndroid RecyclerView\u3068CardView\u306e\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u751f\u6210\u3055\u308c\u308b\u51fa\u529b\u3067\u3059\u3002\u524a\u9664\u3055\u308c\u305f\u30a2\u30a4\u30c6\u30e0\u306f\u5e38\u306b3\u756a\u76ee\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08\u30ea\u30b9\u30c8\u306e4\u756a\u76ee\u306e\u4f4d\u7f6e\uff09\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001Android RecyclerView\u3068CardView\u306b\u95a2\u3059\u308b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u7d42\u4e86\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u304b\u3089Android RecyclerView CardView\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Android\u306eRecyclerView\u3068CardView\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Android Lollipop\u3067\u5c0e\u5165\u3055\u308c\u305fAndroid RecyclerView\u3068Android CardView\u306f\u3001\u30de\u30c6\u30ea\u30a2\u30eb\u30c7\u30b6\u30a4\u30f3\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u30de\u30c6\u30ea\u30a2\u30eb\u30c7\u30b6\u30a4\u30f3\u306f\u3001Android 5.0\u4ee5\u964d\u5c0e\u5165\u3055\u308c\u305fUI [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-768","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Android\u306eRecyclerViewAndroid\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/android\u306erecyclerview\u3001android\u306ecardview\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" \/>\n<meta property=\"og:description\" content=\"Android\u306eRecyclerViewAndroid\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/android\u306erecyclerview\u3001android\u306ecardview\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-30T09:16:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T17:18:18+00:00\" \/>\n<meta name=\"author\" content=\"\u84ee, \u7ffc\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u84ee, \u7ffc\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"31\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\",\"name\":\"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-11-30T09:16:48+00:00\",\"dateModified\":\"2025-07-31T17:18:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413\"},\"description\":\"Android\u306eRecyclerViewAndroid\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413\",\"name\":\"\u84ee, \u7ffc\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g\",\"caption\":\"\u84ee, \u7ffc\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/rentsubasa\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","description":"Android\u306eRecyclerViewAndroid\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/android\u306erecyclerview\u3001android\u306ecardview\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/","og_locale":"ja_JP","og_type":"article","og_title":"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb","og_description":"Android\u306eRecyclerViewAndroid\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/android\u306erecyclerview\u3001android\u306ecardview\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-11-30T09:16:48+00:00","article_modified_time":"2025-07-31T17:18:18+00:00","author":"\u84ee, \u7ffc","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u84ee, \u7ffc","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"31\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","name":"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-11-30T09:16:48+00:00","dateModified":"2025-07-31T17:18:18+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413"},"description":"Android\u306eRecyclerViewAndroid\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Android\u306eRecyclerView\u3001Android\u306eCardView\u306e\u4f8b\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/cdc124a0aaebf26393d8d591183ca413","name":"\u84ee, \u7ffc","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/27308f733c7fcdac8617926a0100c77213339c4e501310a08c0baf946bf823bc?s=96&d=mm&r=g","caption":"\u84ee, \u7ffc"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/rentsubasa\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/android%e3%81%aerecyclerview%e3%80%81android%e3%81%aecardview%e3%81%ae%e4%be%8b%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=768"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/768\/revisions"}],"predecessor-version":[{"id":44780,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/768\/revisions\/44780"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}