title: Custom listView android fails
body: <p>so I have made a List view, called it "neighborhood".
  it supposed to show a list of names of houses, number, and their passwords. for it, I have made a layout with 3 textviews.
  the three lists that  CustomAdapter class gets are from SQL, which works(i debugged it  and it gets 3 full lists)</p>
  
  <p>EDIT: now it just fails, and it gives me this error. I have changed the code to the suggested answers, and it fixed the last problems</p>
  
  <p>the list:</p>
  
  <pre><code>&lt;ListView
      android:id="@+id/neighborhood"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      android:layout_marginStart="8dp"
      android:layout_marginBottom="8dp"
      app:layout_constraintBottom_toTopOf="@+id/allAddresses"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/AddresSearch" /&gt;
  </code></pre>
  
  <p>this is the onCreate:</p>
  
  <pre><code>ListView neighborhood = (ListView)findViewById(R.id.neighborhood);
  CustomAdapter customAdapter= new CustomAdapter(houseList,numList,passList);
  neighborhood.setAdapter(customAdapter);
  </code></pre>
  
  <p>this  is the Adapter Helper class:</p>
  
  <pre><code>   class CustomAdapter extends BaseAdapter{
  
      ArrayList&lt;String&gt; houseList ;
      ArrayList&lt;String&gt; numList ;
      ArrayList&lt;String&gt; passList ;
  
      public CustomAdapter(ArrayList&lt;String&gt;list1,ArrayList&lt;String&gt;list2,ArrayList&lt;String&gt;list3){
          this.houseList = list1;
          this.numList = list2;
          this.passList = list3;
  
      }
  
      @Override
      public int getCount() {
          return houseList.size();
      }
  
      @Override
      public Object getItem(int position) {
          return houseList.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  
      @Override
      public View getView(int i, View view, ViewGroup parent) {
          view = getLayoutInflater().inflate(R.layout.activity_pass_item_view,null);
  
          TextView house = (TextView) view.findViewById(R.id.house);
          TextView num = (TextView) view.findViewById(R.id.num);
          TextView pass = (TextView) view.findViewById(R.id.pass);
  
          house.setText(houseList.get(i).toString());
          num.setText(numList.get(i).toString());
          pass.setText(passList.get(i).toString());
          return null;
      }
  }
  </code></pre>
  
  <p>and this is the custom layout for the listview: contains only 3 text view:</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/num"
      android:layout_width="86dp"
      android:layout_height="45dp"
      android:layout_marginTop="8dp"
      android:layout_marginEnd="28dp"
      app:layout_constraintEnd_toStartOf="@+id/house"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/house"
      android:layout_width="86dp"
      android:layout_height="45dp"
      android:layout_marginTop="8dp"
      android:layout_marginEnd="32dp"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/pass"
      android:layout_width="86dp"
      android:layout_height="45dp"
      android:layout_marginTop="8dp"
      android:layout_marginEnd="32dp"
      app:layout_constraintEnd_toStartOf="@+id/num"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  </code></pre>
  
  <p>EDIT:
  this is the error it gives me now:</p>
  
  <blockquote>
    <p>E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.example.omer.deliverypasses, PID: 17510
        java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getImportantForAccessibility()' on a null object reference
            at android.widget.AbsListView.obtainView(AbsListView.java:2363)
            at android.widget.ListView.measureHeightOfChildren(ListView.java:1280)
            at android.widget.ListView.onMeasure(ListView.java:1188)
            at android.view.View.measure(View.java:18788)
            at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:1227)
            at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1572)
            at android.view.View.measure(View.java:18788)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
            at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
            at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
            at android.view.View.measure(View.java:18788)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
            at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:401)
            at android.view.View.measure(View.java:18788)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
            at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
            at android.view.View.measure(View.java:18788)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
            at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
            at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
            at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
            at android.view.View.measure(View.java:18788)
            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
            at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
            at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2643)
            at android.view.View.measure(View.java:18788)
            at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2100)
            at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1216)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1452)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
            at android.view.Choreographer.doCallbacks(Choreographer.java:670)
            at android.view.Choreographer.doFrame(Choreographer.java:606)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)</p>
  </blockquote>
  
  <p>Thank you very much</p>