Hey, Everyone I very much confused while creating extensions. Actually I have learnt java and android studio but when I use to make extension which work with UI it make confused very much. Earlier I was having problem which was solved by great extension developer. But know I was working on creating an sidebar (custom one) using java and making extension.
*But It make me confused that how I can make a view(sidebar) with the help of java code *.
If I have done any mistake. I apologise for it.
Soory, But I know that no one is goona help out if I have not tried anything actually I searched a lot and even read your article about making extensions it helped if I have not to work with UI.
Actually I am stuck on the first place on how to make views(Like sidebar) which works with UI.
I would have done something but now I not even starting clue. If you have free time can you provide me that starting clue.
You’ll have to use a DrawerLayout to create a navigation drawer. I’m not going to show you how to create it, but here’s an example of how to create a LinearLayout programmatically:
// Creating a Linear Layout
LinearLayout linearLayout = new LinearLayout(context);
// Setting layout params for the newly created Linear Layout
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
// Adding it to some parent view
Note: This is just an example showing how to create views programmatically. The code is totally untested and may or may not work.