malikmotani / nestedrecyclerview-master Goto Github PK
View Code? Open in Web Editor NEWhorizontal RecyclerView inside vertical RecyclerView with ButterKnife and CardView (like Google Play store)
horizontal RecyclerView inside vertical RecyclerView with ButterKnife and CardView (like Google Play store)
Hello, can you share how to add image from url? thank you
Where should I write the code to open new activity?
For example, in case i would like to open new activity by pushing the 3rd button in the 4th line ....
Can you please detailed ..
Thanks in advance
Hi
How can i use this in fragment?
Fragment has two override methods: OnCreateView and OnCreate..
Where should i use the ButterKnife?
In addition, there is no etContentView(this) for fragment..
I tried the below, with no success, please help:
`public class FragmentPractice extends Fragment {
View view;
@BindView(R.id.rvVertical)
RecyclerView rvVertical;
@BindView(R.id.toolbar)
Toolbar toolbar;
ArrayList<VerticalModel> mArrayList = new ArrayList<>();
VerticalRecyclerViewAdapter mAdapter;
public FragmentPractice() {
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view=inflater.inflate(R.layout.practice_fragment, container, false);
rvVertical = (RecyclerView) view.findViewById(R.id.rvVertical);
return view;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(this);
ButterKnife.bind(view);
toolbar.setTitle(R.string.app_name);
//setSupportActionBar(toolbar);
rvVertical.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
mAdapter = new VerticalRecyclerViewAdapter(getContext(), mArrayList);
rvVertical.setAdapter(mAdapter);
setDataOnVerticalRecyclerView();
}
private void setDataOnVerticalRecyclerView() {
for (int i = 1; i <= 5; i++) {
VerticalModel mVerticalModel = new VerticalModel();
mVerticalModel.setTitle("Title " + i);
ArrayList<HorizontalModel> arrayList = new ArrayList<>();
for (int j = 0; j <= 5; j++) {
HorizontalModel mHorizontalModel = new HorizontalModel();
mHorizontalModel.setDescription("Description : " + j);
mHorizontalModel.setName("Name : " + j);
arrayList.add(mHorizontalModel);
}
mVerticalModel.setArrayList(arrayList);
mArrayList.add(mVerticalModel);
}
mAdapter.notifyDataSetChanged();
}
private void setTextViewTitle (TextView textView, String title){
textView.setText(title);
textView.setTextColor(Color.rgb( 36, 59, 85));
textView.setTextSize(18f);
textView.setTypeface(Typeface.DEFAULT_BOLD);
}
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.