I am trying to create a XML design for android tablet. Please look at the samples I attached Navigation drawer , Main-layout, Layout-2. I have to implement multi-screen layout with toolbar limited to only fragment-1 (ie orange portion in Main-layout) and fragment-2(ie. white portion in Main-layout) should be full screen in the Main-layout, leaving all other layout to have complete toolbar(Example. Layout-2). How can i implement this. Thanks in advance.
Asked
Active
Viewed 31 times
0
-
@Nikhil have read my previous comment on your question https://stackoverflow.com/q/52177875/7666442 – AskNilesh Sep 05 '18 at 07:41
-
Hi @AndreyPortnoy. Thanks for your valid time. I am just beginner. What i I requested is a suggestion/solution for which i am not complete aware of, not for a service to code for me. I believe stack is meant for suggestion/solution for the issues :). Just because you don't know the answer doesn't mean whether its valid question or not. And am sorry i will try to come back later with question you know. Once again thanks :) – Sep 05 '18 at 08:20
-
@NileshRathod once gain thanks. That's why i re-post my question again. I hope my reply is clear about what you questioned me. :) – Sep 05 '18 at 08:23
1 Answers
1
You must be implementing this using one Activity class and two Fragment classes. So, you can achieve this by removing the default action bar from Activity
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" />
Then, you can create a custom Toolbar
with tabs in one of the fragments.

pratiked
- 1,712
- 1
- 11
- 18
-
Hi thanks :). If you don't mind do you have any samples for me to refer to. It would be great help. Now what i did is the Main-layout is inside a fragment as i required to implement the navigation drawer. – Sep 05 '18 at 08:34
-
Check https://developer.android.com/training/multiscreen/screensizes for more info – Javier Mendonça Sep 05 '18 at 09:15
-
@Nikhil Implementation of a drawer is very easy. Read about DrawerLayout and NavigationLayout – pratiked Sep 05 '18 at 17:09