Note that there are some explanatory texts on larger screens.

plurals
  1. PO(FrameLayout) findViewById - returns null?
    primarykey
    data
    text
    <p>Why do I always (FrameLayout) findViewById always returns null? The file exists. Working with Google Maps. I read the related topics. Powered by: Project-Clean. Delete folder gen.</p> <pre><code> protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.travel_map_activity); mapView = (MapView) findViewById(R.id.travelMapView); FrameLayout mainLayout = (FrameLayout) findViewById(R.id.mapFrame);//null } </code></pre> <p>What's the problem?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapFrame" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;TextView android:id="@+id/tvTop" android:layout_width="fill_parent" android:layout_height="20dip" android:background="#FFFFFF" android:gravity="top|center_horizontal" android:text="FLOATING VIEW - TOP" android:textColor="#000000" android:textStyle="bold" /&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;ListView android:id="@+id/lvMain" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;/LinearLayout&gt;&lt;/FrameLayout&gt; </code></pre> <p>travel_map_activity.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:orientation="vertical" &gt; &lt;com.google.android.maps.MapView android:id="@+id/travelMapView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:apiKey="key" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload