0

如何删除抽屉内容中的这个灰色条?

我的模板是:

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

左侧的灰色条

4

3 回答 3

0

好吧,这不是很清楚,但经过一些实验,我找到了解决方案 - 添加margin="0"tkDrawerContent. 像这样:

<StackLayout horizzontalAlign="left" tkDrawerContent class="sideStackLayout" height="100%" margin="0">
于 2016-11-29T13:42:27.320 回答
0

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

有两个元素 theStackLayoutScrollView(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>
于 2016-11-29T18:53:57.583 回答
0

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

这是您在屏幕顶部看到的状态栏,带有电池、时钟...的图标。 在此处输入图像描述

隐藏:

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 );
于 2016-11-29T13:08:06.623 回答