something like JPanel in android studio
<p>OK.in Java it's simple to create a class that extends JPanel and than use it in main class.for example:</p>

<pre><code>public class MyPanel extends JPanel(){
public MyPanel() {
    addField();
}

private void addField() {
    JTextField field = new JTextField("Panel");
    add(field);
}}
</code></pre>

<p>and then use in it another class</p>

<pre><code>   public class Main(){
      MyPanel panel = new MyPanel();
      JFrame fr = new JFrame();
      fr.add(panel);       //something like this
   }
</code></pre>

<p>The question is what is equivalent of JPanel in android.in other words,How can I create a class which extends something(?),create for example EditText in the class and than use the class in MainActivity class to add EditTexts.</p>