title: Array Adapter, getView error
body: <p>Im working on a browser and am looking into making a history section. I have set up a <code>listview</code> that will display all the urls that have been loaded. The only issue is that when I try to set the <code>textview</code> text in the <code>getView()</code> of the adapter it crashes that app. theres no signs of a error besides during runtime. The get item(portion) is a char sequence which I have also converted to a string and it still causes the app to crash. I would really like to have this in the app but I don't know where to look for the error. </p>
  
  <p>Logcat</p>
  
  <pre><code>04-23 13:42:10.354 5614-5614/com.example.mckenzieturner.cosmos_101E/AndroidRuntime: FATAL EXCEPTION: main
  Process: com.example.mckenzieturner.cosmos_101, PID: 5614
  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
      at com.example.mckenzieturner.cosmos_101.Methods.urlHistoryAdapter.getView(urlHistoryAdapter.java:57)
      at android.widget.AbsListView.obtainView(AbsListView.java:2406)
      at android.widget.ListView.makeAndAddView(ListView.java:1975)
      at android.widget.ListView.fillDown(ListView.java:709)
      at android.widget.ListView.fillFromTop(ListView.java:770)
      at android.widget.ListView.layoutChildren(ListView.java:1721)
      at android.widget.AbsListView.onLayout(AbsListView.java:2205)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.support.constraint.ConstraintLayout.onLayout(ConstraintLayout.java:1197)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.support.constraint.ConstraintLayout.onLayout(ConstraintLayout.java:1197)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
      at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
      at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
      at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
      at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      at com.android.internal.policy.DecorView.onLayout(DecorView.java:725)
      at android.view.View.layout(View.java:17564)
      at android.view.ViewGroup.layout(ViewGroup.java:5654)
      at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2406)
      at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2126)
      at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1286)
      at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6536)
      at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
      at android.view.Choreographer.doCallbacks(Choreographer.java:683)
      at android.view.Choreographer.doFrame(Choreographer.java:619)
      at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
      at android.os.Handler.handleCallback(Handler.java:751)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:154)
      at android.app.ActivityThread.main(ActivityThread.java:6247)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
  </code></pre>
  
  <p>urlHistoryAdapter</p>
  
  <pre><code>public  class urlHistoryAdapter extends BaseAdapter {
  
  private final Context context;
  private final List&lt;String&gt; list = new ArrayList&lt;&gt;();
  
  
  public urlHistoryAdapter(Context context) {
      this.context = context;
  
  }
  
  public void addItem(String item) {
      this.list.add(item);
  }
  public void deleteItem(String item) {
      this.list.remove(item);
  }
  public void deleteList(){
      list.removeAll(Collections.unmodifiableCollection(list));
  }
  @Override
  public int getCount() {
      return list.size();
  }
  @Override
  public String getItem(int position) {
      return list.get(position);
  }
  @Override
  public long getItemId(int position) {
      return position;
  }
  @SuppressLint({"InflateParams", "ViewHolder"})
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      String Url = String.valueOf(getItem(position));
      View view = convertView;
          view = LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);
  
      TextView textView = view.findViewById(R.id.title);
      textView.setText(getItem(position));
  
  
      return view;
  }
  
  }
  </code></pre>