サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
アメリカ大統領選
blog.sqisland.com
GridView shares a lot of features with ListView, with one noticeable difference: no headers or footers. Now they are unified under RecyclerView, and I want to see how I can add a header to a grid. GridLayoutManager I created a RecylcerView using a GridLayoutManager with a spanCount of 2. RecyclerView recyclerView = (RecyclerView) findViewById( R.id.recycler_view); recyclerView.addItemDecoration(ne
When I wrote my android-test-demo app, I wanted to use Jake Wharton's ActivityRule, but couldn't because I wanted to customize the launch intent for each test method. Today I got my solution from Google: Test rules in Espresso 2.1. ActivityTestRule can be configured to take a different launch intent per test method like this: @Rule public ActivityTestRule activityRule = new ActivityTestRule<>( Mai
I've been doing Android instrumentation testing with Dagger, Espresso and Mockito, and I love it. To commemorate the launch of Dagger 2 out of SNAPSHOT, I am sharing a demo repo with Dagger 2, Espresso 2 and Mockito: https://github.com/chiuki/android-test-demo Dagger Components Dependency injection allows our app and test obtain different modules. This is very useful for creating repeatable test c
After I made a RecyclerView grid with a header, I realized that I want to make it auto fit as well. I want to define the size of each item and let the system compute the spanCount automatically. To determine the number of spans, I need two things: the width of the RecyclerView, and the width of each item. AutofitRecyclerView We extend RecyclerView to get access to its width. As for the width of ea
Android Lollipop introduced a lot of sweet new classes. The one that caught my eye is AnimatedVectorDrawable, and I decided to check it out right away. Example from Documentation The documentation included an example, so I created the files as instructed: res/drawable/vectordrawable.xml, res/drawable/avd.xml, res/anim/rotation.xml and res/anim/path_morph.xml Now what? There are many ways to use a
このページを最初にブックマークしてみませんか?
『blog.sqisland.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く