Skip to content

Repository files navigation

LinearLayoutCustomView

<?xml version="1.0" encoding="utf-8"?>
<LinearLayoutandroid:orientation="vertical"xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent">
<TextViewandroid:id="@+id/textView"android:layout_width="match_parent"android:layout_height="wrap_content"/>
</LinearLayout>
publicclassLinearLayoutCustomViewextendsLinearLayout {
privatefinalContext_context;
privateTextViewtextView;
publicLinearLayoutCustomView(Contextcontext) {
this(context, null);
}
publicLinearLayoutCustomView(Contextcontext, @NullableAttributeSetattrs) {
super(context, attrs);
this._context = context;
initView();
}
privatevoidinitView() {
inflate(_context, R.layout.linear_layout_custom_view, this);
textView = findViewById(R.id.textView);
}
}
<com.gzeinnumer.linearlayoutcustomview.LinearLayoutCustomView
android:layout_width="match_parent"android:layout_height="match_parent"/>

Copyright 2021 M. Fadli Zein

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages