title: Why nothing is displayed in ListView although there are no errors?
body: <p>I looked for the solutions but i was not able to understand properly that,why it is happening. I tried to put list view in a Linear layout but it didn't helped.C an anyone help me with My list view.</p>
  
  <p>here's my Xml --></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@color/background_cards"
  android:orientation="vertical"&gt;
  
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="2"&gt;
  
      &lt;ImageView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:src="@mipmap/ic_launcher" /&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Card - 1"
          android:textAlignment="center"
          android:textColor="@color/crad_color"
          android:textSize="34sp"
  
          /&gt;
  &lt;/RelativeLayout&gt;
  
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="8"
      android:orientation="vertical"&gt;
  
      &lt;ListView
          android:id="@+id/list_num"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:textAlignment="center"&gt;
  
      &lt;/ListView&gt;
  &lt;/LinearLayout&gt;
  
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="2"
      android:orientation="horizontal"&gt;
  
      &lt;RelativeLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/ic_icon"&gt;
  
  
          &lt;RelativeLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
  
              &gt;
  
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:background="?actionBarItemBackground"&gt;
  
                  &lt;Button
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="start"
                      android:layout_marginBottom="8dp"
                      android:layout_marginEnd="16dp"
                      android:layout_marginStart="16dp"
                      android:text="Yes its there !" /&gt;
  
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentRight="true"
                  android:background="?actionBarItemBackground"
  
                  &gt;
  
                  &lt;Button
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginBottom="8dp"
                      android:layout_marginEnd="16dp"
                      android:layout_marginStart="16dp"
                      android:text="NO ! its not"
  
                      /&gt;
  
              &lt;/FrameLayout&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  
  
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here's my java code --></p>
  
  <pre><code>package com.example.android.chooseanumber_magicalapp;
  
  import android.database.DataSetObserver;
  import android.os.Bundle;
  import android.support.annotation.Nullable;
  import android.support.v7.app.AppCompatActivity;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.Adapter;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  import java.util.ArrayList;
  
  import static android.R.attr.id;
  import static android.R.id.list;
  import static android.icu.lang.UCharacter.GraphemeClusterBreak.T;
  import static com.example.android.chooseanumber_magicalapp.R.id.list_num;
  
   /**
    * Created by great on 25-05-2017.
  */
  
  public class InstructionActivity extends AppCompatActivity{
  
  ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;(30);
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.instruction_activity);
  
  
      list.add("1");
      list.add("1");
      list.add("1");
      list.add("1");
      list.add("1");
      list.add("1");
      list.add("1");
  
  
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, android.R.id.text1, list);
  
      ListView lv = (ListView) findViewById(list_num);
      {
          lv.setAdapter(adapter);
      }
  
  }
  
   }
  </code></pre>
  
  <p>edit --></p>
  
  <p>image from android studio<a href="https://i.stack.imgur.com/5Gq2A.png" rel="nofollow noreferrer">doesn't show anything in editor </a></p>
  
  <p>Screen shot from mobile --></p>
  
  <p><a href="https://i.stack.imgur.com/rD8Bu.png" rel="nofollow noreferrer"></a></p>
  
  <p>EDIT __></p>
  
  <p>okay guys now i get the problem if i change my style to </p>
  
  <pre><code>  &lt;resources&gt;
  
  &lt;!-- Base application theme. --&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar"&gt;
      &lt;!-- Customize your theme here. --&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>it shows list items ! </p>
  
  <p>before it was </p>
  
  <pre><code>&lt;resources&gt;
  
  &lt;!-- Base application theme. --&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.NoActionBar"&gt;
      &lt;!-- Customize your theme here. --&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>but what if i want a full screen (without action bar)?</p>