Telerik UI Sidedrawer:如何从抽屉内容中移除灰色栏

时间:2016-11-29 11:11:56

标签: css telerik nativescript angular2-nativescript nativescript-telerik-ui

如何在抽屉内容中删除此灰色条?

我的模板是:     

<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

3 个答案:

答案 0 :(得分:0)

那是android状态栏,删除了我编写了以下示例:

这是一个状态栏,您可以在屏幕顶部看到带有battry,clock ...的图标。   enter image description here

<强>隐藏

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

显示:

frame.topmost().android.activity.getWindow().
getDecorView().setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_VISIBLE );

答案 1 :(得分:0)

嗯,目前还不是很清楚,但经过一些实验,我找到了一个解决方案 - 将margin="0"添加到tkDrawerContent。像这样:

<StackLayout horizzontalAlign="left" tkDrawerContent class="sideStackLayout" height="100%" margin="0">

答案 2 :(得分:0)

在您提供的代码段中,您似乎已添加了其他内容 <RadSideDrawer> HTML标记。

StackLayoutScrollView(tkMainContent)有两个元素。 RadSideDrawer在其HTML标记之间应该只有两个内容,一个标有tkDrawerContent的元素和一个标有tkMainContent的元素。只需将第一个StackLayout移动到这些元素中的任何一个,如下所示:

<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>