crowdin/mobile-sdk-android

Seems not working with Custom view with custom attributes

Open

#241 opened on Mar 20, 2024

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Kotlin (57 forks)auto 404
bughelp wanted

Repository metrics

Stars
 (128 stars)
PR merge metrics
 (PR metrics pending)

Description

I have a custom view and get the text from XML: The code slice is here:

 <com.example.CustomView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:customTag="@string/hello_world" />

val typedArray = context.obtainStyledAttributes(attrs, R.styleable.CustomView, 0, 0)
tag = typedArray.getText(R.styleable.CustomView_customTag) ?: ""

The tag does not use the latest translation.

Is it a bug or caused by using the outdated SDK version? Waiting for your response, Thank you!

Contributor guide