【发布时间】:2015-04-08 13:55:28
【问题描述】:
我有一个Alloy Titanium Mobile 项目需要使用android 半透明状态栏。 这是我的主题 xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.NoActionBar" parent="@style/Theme.AppCompat">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:textCursorDrawable">@null</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
现在,在应用该半透明状态之前,我们开发了一个包含在<ScrollView> 中的登录屏幕。像这样的:
<ScrollView class="vertical-container">
<View class="title-holder">
<View class="center-aligned">
<Label class="title-text bold-text">Lorem</Label>
<Label class="title-text normal-text">Ipsum</Label>
</View>
</View>
<View id="inputsContainer" class="inputs-holder">
<View class="text-input-wrapper">
<View class="text-input">
<Label id="iconInput2" icon="fa-custom-user" class="text-input-icon"></Label>
<View class="text-input-element">
<Require id="loginUserInput"
src="CustomTextField"
hintColor="#80AA82"
hintText="L('labeluser')"
onChange="checkIcon"></Require>
</View>
</View>
<View class="border border-bottom"></View>
</View>
<View class="text-input-wrapper">
<View class="text-input">
<Label id="iconInput3" icon="fa-custom-lock" class="text-input-icon"></Label>
<View class="text-input-element">
<Require id="passwordUserInput"
src="CustomTextField"
hintColor="#80AA82"
hintText="L('labelpassword')"
fieldType="password"
onChange="checkIcon"></Require>
</View>
</View>
<View class="border border-bottom"></View>
</View>
</View>
<View id="loginButton" class="button-wrapper login-button" onClick="doLogin">
<Label class="button-background"></Label>
<Label id="loginLabel" class="button-label" textid="labellogin"></Label>
</View>
<Label class="button-link" textid="labelrecoverpassword" onClick="showModal" modalName="forgotModal"></Label>
</ScrollView>
这是此页面的屏幕截图(在滚动视图上添加了红色边框):
现在,这是打开键盘的同一个屏幕:
您可以看到滚动视图调整大小,并且您可以滚动查看被键盘隐藏的字段。现在,这就是半透明状态的样子。
如您所见,滚动视图不会调整大小,因此,我无法滚动查看隐藏字段。有什么解决办法吗?
【问题讨论】:
标签: android titanium scrollview titanium-mobile titanium-alloy