I think many people, try to do this demo. But this demo is not good, because some things no show.
like:
RecyclerView .xml to a layout:.......only little, but ok, this not import.
MyAdapter .xml no layout: this is bad. Get error in here.
so, follow this do is better
http://stackoverflow.com/questions/28407768/android-widget-linearlayout-cannot-be-cast-to-android-widget-textview-in-recycle
But what different with android demo (fxxxxxxxxxxxxxx)
android:
- public ViewHolder(TextView v) {
- mTextView = v;
good guy:
- public ViewHolder(View v) {
- mTextView = v.findViewById(R.id.textView));
so Now I think you understand what happen, if you lean java.
Why android developer not put full demo, than everybody get right demo. I search this issue, wast 3 hours. And on internet many people get this problem. Really miss Delphi~~
write java let me feel back ten years ago. that time write can use jbuilder 2. But now ...........
powerbuilder is good for demo, too.