Skip to content

Seems not working with Custom view with custom attributes  #241

@SwiftyWang

Description

@SwiftyWang

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions