Skip to content

Seems not working with Custom view with custom attributes  #241

Open

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!

Activity

  1. andrii-bodnar commented on Mar 21, 2024

    @andrii-bodnar
    Member

    Hi @SwiftyWang, what version of the SDK are you using?

  2. SwiftyWang commented on Mar 22, 2024

    @SwiftyWang
    Author

    Hi @SwiftyWang, what version of the SDK are you using?

    I upgraded to the latest version but the issue still exists.
    Screenshot 2024-03-22 at 16 29 50
    Not sure if it is related to this limitation? if yes any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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