Issue
This Content is from Stack Overflow. Question asked by mariam fawaz
First, Sorry my English not good enough. Iam new in Android development. I have many widgets. Can I make them in one widget and when I need to add them I just add. Because Iam creating a library and I need to publish it on github.
<com.example.custom.view>
... />
These are all the views(widgets) I need them in one widget and I can add it in a layout.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<HorizontalScrollView
android:id="@+id/hscroll1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/vscroll1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/linear2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/linear3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textview6"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="TextView"
android:textSize="12sp"
android:textColor="#000000" />
</LinearLayout>
<View
android:id="@+id/linear4"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="#000000"
android:orientation="vertical" />
<LinearLayout
android:id="@+id/linear5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textview7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="TextView"
android:textSize="12sp"
android:textColor="#000000" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</HorizontalScrollView>
</LinearLayout>
Solution
This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.
This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.