Xamarin Android Bootstrap

9
我已经创建了一个绑定库,按照这里的步骤,针对Java库Android-Bootstrap 绑定项目在GitHub上
将库导入Xamarin Android解决方案后,我创建了以下简单的xaml。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <Button
        android:id="@+id/MyButton"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/Hello" />
    <com.beardedhen.androidbootstrap.BootstrapLabel
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:bootstrapBrand="primary"
        app:bootstrapHeading="h3"
        app:roundedCorners="true"
        android:text="Bootstrap Label" />
    <com.beardedhen.androidbootstrap.BootstrapEditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:bootstrapSize="md"
        app:bootstrapBrand="info" />
</LinearLayout>

重新编译后,设计布局仍未应用(如下图所示)

enter image description here

有没有人有经验可以提供一些想法?谢谢!


很奇怪,即使我在Github上获取了你的项目,我也无法重现你的问题。你能否更详细地描述一下你的环境? - Nicolas Filotto
那你真的看到类似于 Bootstrap 的标签和编辑框了吗? - user1400995
@Nostradamus 是的,我确实看到了“Bootstrap Label”在Bootstrap典型的蓝色框内以白色显示。您使用哪个目标框架?您的Xamarin版本是多少?您使用什么播放器?您的播放器版本是多少?您使用的Virtual Box版本是哪个? - Nicolas Filotto
您IP地址为143.198.54.68,由于运营成本限制,当前对于免费用户的使用频率限制为每个IP每72小时10次对话,如需解除限制,请点击左下角设置图标按钮(手机用户先点击左上角菜单按钮)。 - Nicolas Filotto
@Nostradamus 你用的是哪个操作系统? - Nicolas Filotto
显示剩余6条评论
1个回答

5
我创建了一个名为TestBinding的项目,依赖于您的项目XamarinBootstrapBinding中定义的库。我使用API 23构建了您的项目和我的项目,然后我修改了我的项目的文件Main.axml,按照您提供的方式进行了修改,然后我使用Genymotion作为播放器,在Google Nexus 5 - 6.0.0上启动了我的项目。
结果,我看到了一个白色的Bootstrap标签,位于Bootstrap典型的蓝色框内。
这是我的文件https://github.com/essobedo/XamarinBootstrapBinding

有关测试的任何消息吗? - Nicolas Filotto
抱歉,我无法在常规的SDK模拟器上看到它。不确定是否有其他人尝试并在真实设备上成功。 - user1400995
你的环境是什么? - Nicolas Filotto
它是API 23,在普通模拟器上。 - user1400995
1
你的链接已经失效,请注意。 - Prisoner ZERO
显示剩余2条评论

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接