小编Tic*_*haz的帖子

Android SDK API 33 - 未知属性 android:textAllCaps

最近,我使用新的 SDK(即 Android API 33)更新了我的项目。我检查了attrfortextAllCaps是一个Unknown attribute android:textAllCaps.

这是 Android Studio 设置

在此输入图像描述

这是用于 SDK 工具的

在此输入图像描述

这里是TextView

在此输入图像描述

<TextView
    android:id="@+id/tv_paid"
    android:layout_width="wrap_content"
    android:textAllCaps="false"
    android:layout_height="wrap_content"
    android:text="@string/paid"
    app:layout_constraintBottom_toTopOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent" />
Run Code Online (Sandbox Code Playgroud)

这是attrs.xml带有文件位置的文件

在此输入图像描述

问题

如何修复这个未知属性?

android android-studio

19
推荐指数
1
解决办法
3060
查看次数

alQuran阿拉伯语的语音识别

根据,我们如何比较两个音频文件或录音机文件Al-Quran
Al-Quran与发音相比,具有特殊的Arabic发音。
是否可以在用户语音和Al-Quran发音方式之间进行比较?

我已经尝试过了Google Speech to Text for Arabic,但似乎无法处理的发音Al-Quran

例如此音频(古兰经的背诵)

古兰经1

古兰经2

android voice-recognition

10
推荐指数
1
解决办法
435
查看次数

SetFocusable 函数在 API 中对我不起作用,而它应该对我起作用

我有下面的代码,一切都适用于 Android 9

RespM= FindViewById<RecyclerView>(Resource.Id.RespMedius);
RespM.SetFocusable(ViewFocusability.NotFocusable);
Run Code Online (Sandbox Code Playgroud)

但是当我想在API 17中尝试它时,我收到以下错误,因为假设该函数SetFocusable位于API 14内部应该对我有用......有什么解决方案吗?

Java.Lang.NoSuchMethodError: '类 Landroid/view/View 中没有名称='setFocusable'签名='(I)V'的方法;'

android xamarin.android xamarin

3
推荐指数
1
解决办法
681
查看次数

如何获取数组 Kotlin 中特定值的大小

这是列表的示例。我想让动态,也许价值会变得更多。

val list = arrayListOf("A", "B", "C", "A", "A", "B") //Maybe they will be more 
Run Code Online (Sandbox Code Playgroud)

我想要这样的输出:-

val result = list[i] + " size: " + list[i].size
Run Code Online (Sandbox Code Playgroud)

所以输出将显示每个字符串的大小。

A size: 3
B size: 2
C size: 1
Run Code Online (Sandbox Code Playgroud)

如果我增加更多的价值,那么结果也会增加。

kotlin

2
推荐指数
2
解决办法
55
查看次数

无法解析“PreviewView”中的方法“setPreferredImplementationMode”

我是 Andriod 的初学者,现在遇到了问题。

此处此处描述了如何使用 CameraX 和 ZXing 创建 QR 码扫描仪。我正在尝试制作一个示例项目。

但我的代码有错误

private PreviewView previewView;
...
@Override
protected void onCreate(Bundle savedInstanceState) {
...
    previewView = findViewById(R.id.activity_main_previewView);
...
}
...
private void bindCameraPreview(@NonNull ProcessCameraProvider cameraProvider) {
    previewView.setPreferredImplementationMode(PreviewView.ImplementationMode.SURFACE_VIEW);
...
}
Run Code Online (Sandbox Code Playgroud)

错误是“无法解析‘PreviewView’中的方法‘setPreferredImplementationMode’”。“PreviewView.ImplementationMode”中也没有“SURFACE_VIEW”。

请帮我解决这个问题。

Android Studio 4.1.2,Android 9 的项目。

java android qr-code android-camerax

2
推荐指数
1
解决办法
1616
查看次数