Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to avoid using the full package name in xml with custom Views (Android)?

Tags:

android

xml

I would like to do something like

<TextViewPlus
    android:id="@+id/settings_title_text"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:text="@string/settings />

instead of

<com.my.really.super.long.package.name.that.wont.autocomplete.TextViewPlus
    android:id="@+id/settings_title_text"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:text="@string/settings />

I figure I could just put custom Views in the (default) package, but that seems like a bad idea. (EDIT: And upon testing this, it doesn't work anyway) Is there a "good" way to do this?

like image 770
loeschg Avatar asked Nov 08 '12 22:11

loeschg


1 Answers

No, AFAIK you will have to go with the full name.

like image 80
Vincent Mimoun-Prat Avatar answered Nov 15 '22 05:11

Vincent Mimoun-Prat