在花了两天时间寻找答案后,我想就以下行为寻求帮助.
我正在尝试在Android上编写一个简单的tabhost应用程序,每个活动都有一个布局.我设计了我的布局,以便tabwidget出现在屏幕的底部.
在第一个选项卡上,我正在尝试插入一个简单的2行ListView.我的问题是ListView位于底部,但其中一半隐藏在tabwidget后面.我想了解如何使我的ListView显示在tabwidget上方.
这是我的main.xml:
<?xml version="1.0" encoding="utf-8"?>
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
<TabWidget
android:id="@android:id/tabs"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
</TabHost>
Run Code Online (Sandbox Code Playgroud)
这是我的主要app类:
public class TestTabWidget extends TabActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Resources res = getResources(); // Resource object to get Drawables
TabHost tabHost = getTabHost(); // The activity TabHost
TabHost.TabSpec spec; // Resusable TabSpec for each tab
Intent intent; // Reusable Intent for each tab
intent = new …Run Code Online (Sandbox Code Playgroud) 经过对网络和pugin文档的长期研究后,我正在写这个问题.我可能在这里错过了什么,但我找不到什么.
我正在使用bootstrapvalidator(http://bootstrapvalidator.com/)插件来尝试验证bootstrap模式中的表单.
我的表格代码:
<form method="POST" action="/venues/update" accept-charset="UTF-8" id="editForm">
<input name="id" type="hidden" value="XYZ">
...
[other form fields...]
...
<button type="submit" class="btn bg-black">Modifier</button>
</form>
Run Code Online (Sandbox Code Playgroud)
我的js代码验证:
$('#editForm')
.bootstrapValidator({
message: 'Cette valeur ne peut pas être utilisée.',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
submitHandler: function(validator, form, submitButton) {
alert('submit!!');
},
fields: {
venue_name: {
message: 'Ce nom n\'est pas valide.',
validators: {
notEmpty: {
message: 'Le nom du lieu ne peut pas être vide.'
},
stringLength: …Run Code Online (Sandbox Code Playgroud)