我想在我的ViewPager中添加3个底部点,就像这样.

我使用FragmentActivity并支持库ViewPager.
user-interface android android-viewpager viewpagerindicator android-fragmentactivity
尝试连接笔记本电脑的localhost时,我收到错误请求 - 无效主机名[HTTP ERROR 400].实际上,我正在学习使用jQuery Mobile开发移动网络.我想看看网络的布局是否适合我的手机尺寸.
我已经添加了Visual Studio以这种方式给出的端口号:
控制面板>防火墙>高级设置>退出规则>新规则.
然后,我通过在命令提示符下键入" ipconfig " 来获取我的IP地址.
之后,我使用我的Android手机浏览器(Mozilla 5.0)并输入链接192.XXX.XXX.XXX:57976.
我读过类似的问题,但我无法得到解决方案.有些人认为此错误与IIS设置有关.但我无法获得IIS设置的解决方案.希望你们能帮助我解决这个问题.
[解决]我不得不添加android:fillViewport="true"到ScrollView,修复了文本没有垂直居中的问题.
我知道之前已经多次回答,但我仍然无法垂直居中查看textview的文本.
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/relativelayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/icon"
android:layout_width="@dimen/icon_width"
android:layout_height="@dimen/icon_height"
android:src="@drawable/picture" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/icon"
android:gravity="center_vertical"
android:layout_alignBottom="@+id/icon"
android:layout_alignTop="@+id/icon"
android:text="@string/title_text"
android:textSize="@dimen/textsize"
android:textStyle="bold"
android:textColor="@color/color"
android:shadowColor="@color/shadow"
android:shadowRadius="5"/>
</RelativeLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
通常这应该适用
android:gravity="center_vertical"
Run Code Online (Sandbox Code Playgroud)
但它对textview没有影响......
奇怪的是,我有第二个应用程序具有完全相同的代码,它在那里工作没有任何问题.
/编辑
澄清我的问题:这就是我现在所拥有的:
这就是我要的:
当我选中复选框列表中的复选框时,checkbox.text将添加到列表框中.但是当我取消选中该复选框时,checkbox.text将从列表框中删除.但问题是我不知道如何从列表框中删除所选项目.
![[按此处查看图片] [2] <br>](https://i.stack.imgur.com/HKpta.png)
例如,当我选中checkbox1,checkbox2,checkbox3时,列表框将显示
checkbox1 checkbox2 checkbox3
但是,当我取消选中复选框时,我仍然坚持在这里.救命 !!
这是我的代码:
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked) listBox1.Items.Add(checkBox1.Text);
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked) listBox1.Items.Add(checkBox2.Text);
}
private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
if (checkBox3.Checked) listBox1.Items.Add(checkBox3.Text);
}
private void checkBox4_CheckedChanged(object sender, EventArgs e)
{
if (checkBox4.Checked) listBox1.Items.Add(checkBox4.Text);
}
Run Code Online (Sandbox Code Playgroud)