gpt4 book ai didi

java - Xamarin Android Bootstrap

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:22:18 24 4
gpt4 key购买 nike

我按照 here 的步骤创建了一个绑定(bind)库对于 Java 库 Android-Bootstrap绑定(bind)项目在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>

然而,即使在重新编译之后,Design 布局仍然没有应用(见下文)

enter image description here

有运气的人有什么想法吗?谢谢

最佳答案

我创建了一个项目 TestBinding,它依赖于您的项目 XamarinBootstrapBinding 中定义的库,我使用 API 23 构建了您的项目和我的项目,然后我修改了文件 Main.axml 我的项目,用于放置您上面提出的建议,然后我使用 Genymotion 作为播放器在 Google Nexus 5 - 6.0.0 上启动了我的项目。

结果,我在典型的 Bootstrap 蓝色框内看到一个白色的 Bootstrap 标签

这是我的文件 https://github.com/essobedo/XamarinBootstrapBinding

关于java - Xamarin Android Bootstrap ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36660296/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com