Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

take into account the inheritance of views that are generated #9

Open
y9vad9 opened this issue Mar 30, 2022 · 0 comments
Open

take into account the inheritance of views that are generated #9

y9vad9 opened this issue Mar 30, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request priority: low

Comments

@y9vad9
Copy link
Owner

y9vad9 commented Mar 30, 2022

Idea

I think it would be nice to have inheritance for generated DSL views.

Example

We have two views to be generated: android.widget.TextView and android.widget.EditText. If we look into EditText hierarchy we will see that it inherited from TextView. So, to follow it and in order to memory usage it will be good to make next:

public interface TextViewScope : ViewScope<TextView> {
    public fun text(text: String)
    // other functions
    /* ... */
}

// other file
public interface EditTextScope : ViewScope<EditText>, TextViewScope {
   public fun selection(start: Int, end: Int)
}
@y9vad9 y9vad9 added enhancement New feature or request priority: low labels Mar 30, 2022
@y9vad9 y9vad9 added this to the 0.0.1 milestone Mar 30, 2022
@y9vad9 y9vad9 self-assigned this Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request priority: low
Projects
None yet
Development

No branches or pull requests

1 participant