0

How to remove this gray bar in drawer-content?

my template is:

<StackLayout horizzontalAlign="left" tkDrawerContent class="sideStackLayout" height="100%">
    <Label [text]="'Hello world'" textWrap="true" class="drawerContentText"></Label>
</StackLayout>
<ScrollView tkMainContent>
    <StackLayout #container >
        <Image src="res://logo" stretch="none" horizontalAlignment="center"></Image>
        <TextField #email  keyboardType="email" [(ngModel)]="user.login"
                   autocorrect="false" autocapitalizationType="none"></TextField>
        <TextField #password  secure="true" [(ngModel)]="user.password"></TextField>

        <Button [text]="'Sign-in'" class="submit-button" ></Button>
        <Button [text]="'Demo'" class="demo-button" ></Button>
        <Button text="OPEN DRAWER" (tap)=openDrawer()></Button>
    </StackLayout>
</ScrollView>

gray bar on the left side

Kopleman
  • 45
  • 7

3 Answers3

0

That's the android status bar and for removing that I wrote the following example:

This is a statusbar that you see on top of your screen with icons of battry,clock ... . enter image description here

Hide:

let frame = require("ui/frame");                
frame.topmost().android.activity.getWindow().
getDecorView().setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_FULLSCREEN);

Show:

frame.topmost().android.activity.getWindow().
getDecorView().setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_VISIBLE );
Panda
  • 6,955
  • 6
  • 40
  • 55
Habib Kazemi
  • 2,172
  • 1
  • 24
  • 30
0

Well It was not very clear but after some experiments I've found a solution - to add margin="0" to tkDrawerContent. Like this:

<StackLayout horizzontalAlign="left" tkDrawerContent class="sideStackLayout" height="100%" margin="0">
Kopleman
  • 45
  • 7
0

From the code snippet you have provided it looks like you have added additional contents inside the <RadSideDrawer> HTML tag.

There are two elements the StackLayout and the ScrollView (tkMainContent). The RadSideDrawer should only have two contents between its HTML tags, an element tagged with tkDrawerContent and an element tagged with tkMainContent. Simply move the first StackLayout to the either of those elements as shown here:

<RadSideDrawer>
    <StackLayout tkDrawerContent class="sideStackLayout">
        <StackLayout class="sideTitleStackLayout">
            <Label text="Navigation Menu"></Label>
        </StackLayout>
        <StackLayout class="sideStackLayout">
            <Label text="Primary" class="sideLabel sideLightGrayLabel"></Label>
            <Label text="Social" class="sideLabel"></Label>
            <Label text="Promotions" class="sideLabel"></Label>
            <Label text="Labels" class="sideLabel sideLightGrayLabel"></Label>
            <Label text="Important" class="sideLabel"></Label>
            <Label text="Starred" class="sideLabel"></Label>
            <Label text="Sent Mail" class="sideLabel"></Label>
            <Label text="Drafts" class="sideLabel"></Label>
        </StackLayout>
    </StackLayout>
    <StackLayout tkMainContent>
        <Label [text]="mainContentText" textWrap="true" class="drawerContentText"></Label>
        <Button text="OPEN DRAWER" (tap)=openDrawer()></Button>
    </StackLayout>
</RadSideDrawer>
Vladimir Amiorkov
  • 2,652
  • 3
  • 17
  • 35