Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid inflate from separate xml
    primarykey
    data
    text
    <p>How to inflate particular View from separate xml file. Is it possible? When I`m trying to set id of this View I just have an ResourceNotFoundException. Maybe I need to set somehow the name of file?</p> <pre><code>LayoutInflater inflater = LayoutInflater.from(this); FrameLayout ingredients_frame = (FrameLayout)inflater.inflate(R.id.ingredients_frame, null); </code></pre> <p>R.id.ingredients_frame located just in separate xml file.</p> <p>Exception: </p> <pre><code> android.content.res.Resources$NotFoundException: Resource ID #0x7f060032 type #0x12 is not valid </code></pre> <p>ingredients_frame_layout.xml:</p> <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ingredients_frame" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/expandable_second_layer_selector" &gt; &lt;TextView android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_gravity="center" android:background="@android:color/white" android:singleLine="true" android:text="......................................................................................................................................................................" android:textColor="@color/dark_orange" android:textSize="18dip"/&gt; &lt;TextView android:id="@+id/ingredient_name" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="left" android:background="@android:color/white" android:textStyle="bold" android:text="@string/friends_total" android:textColor="@color/dark_orange" android:textSize="18dip" /&gt; &lt;TextView android:id="@+id/ingredient_data" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="right" android:background="@android:color/white" android:textStyle="bold" android:textColor="@color/dark_orange" android:textSize="18dip" /&gt; &lt;/FrameLayout&gt; </code></pre>
    singulars
    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.
    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