使用bluejamesbond DocumentView

时间:2015-10-30 12:18:52

标签: android

我正在尝试使用bluejamesbond DocumentView来显示一些合理的文本。即使在最简单的情况下,我也无法显示文字;

<com.bluejamesbond.text.DocumentView xmlns:ext="http://schemas.android.com/apk/res-auto"
    android:layout_width="0dp"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    ext:documentView_text="test"
    android:background="@android:color/background_light" />

我已尝试过浅色和深色背景,以防默认颜色为其中之一,因此不可见。

我通过将以下内容添加到模块的build.gradle;

来获取库
compile 'com.github.bluejamesbond:textjustify-android:2.1.1'

任何问题的唯一指示是来自Android Studio预览的保真警告,但在真实设备(4.4.2)上运行会在每种情况下都提供相同的文本缺失。

我最初尝试了更复杂的example,删除了进度条并将文本更改为一些简单的内联文本以摆脱其他依赖项。这也不起作用,同样具有不同的背景。

为了排除布局中影响它的其他东西的可能性,我还创建了一个新布局,如下所示。同样,无论是浅色还是深色背景,都不会看到预期的文本“测试”。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">

<com.bluejamesbond.text.DocumentView xmlns:ext="http://schemas.android.com/apk/res-auto"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    ext:documentView_text="test"
    android:background="@android:color/background_dark" />
</LinearLayout>

在Play商店中有一个(工作)图书馆的演示,表明这个图书馆质量很好,维护得很好,我怎么能从这里继续前进?

0 个答案:

没有答案