diff --git a/app/src/main/java/com/example/nemophila/ShopActivity.java b/app/src/main/java/com/example/nemophila/ShopActivity.java index 0619cfa..a351c71 100644 --- a/app/src/main/java/com/example/nemophila/ShopActivity.java +++ b/app/src/main/java/com/example/nemophila/ShopActivity.java @@ -3,6 +3,7 @@ import static android.app.PendingIntent.getActivity; import androidx.appcompat.app.AppCompatActivity; +import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -12,6 +13,8 @@ import android.view.View; import android.widget.Button; +import com.example.nemophila.viewmodels.PostsViewModel; + import java.util.ArrayList; import java.util.List; @@ -46,6 +49,10 @@ rv.setLayoutManager(llm); rv.setAdapter(adapter); + //通信テスト + PostsViewModel postsViewModel = new ViewModelProvider(this).get(PostsViewModel.class); + postsViewModel.getShopPostJson("151347fa-2c90-44d7-ba48-f23f475b910d"); + } private List createDataset() {