Note that there are some explanatory texts on larger screens.

plurals
  1. POViewFlipper crashes after orientation change
    primarykey
    data
    text
    <p>I'm trying to use inflate while using ViewFlipper to access to the data inside my view. I've done sample project that crashes.</p> <p><strong>main.xml</strong> </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; </code></pre> <p><strong>FlipViewBug.java</strong> </p> <pre><code>package android.FlipViewBug; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; public class FlipViewBug extends Activity { private static LayoutInflater inflater = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); } } </code></pre> <p>When I rotate emulator from horizontal to vertical orientation <kbd>CTRL+F11</kbd> app crashes with <strong><em>stopped unexpectedly</em></strong>. </p> <p>If I remove line </p> <pre><code>inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); </code></pre> <p>app works fine. Am I trying to do something wrong? In my app I have more complex <code>LinnarView</code> that <code>ViewFlipper</code> is nested and the results are the same. </p> <p>I was checking this on android 1.5, 2.2 and galaxy tab. There is no problem while rotating form vertical view to horizontal.</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.
    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