pavkout / android-vlc-remote

Automatically exported from code.google.com/p/android-vlc-remote
GNU General Public License v3.0
0 stars 0 forks source link

force close on screen tilt #114

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.tilting screen vert to horiz or horiz to vert
2.
3.

What is the expected output? What do you see instead?

What version of VLC Remote are you using?
0.5.3

What version of VLC are you using?

What version of Android are you using?
2.2

Which Android device are you using?
Captivate

Please provide any additional information below.

Original issue reported on code.google.com by Eric.S.S...@gmail.com on 4 Oct 2011 at 3:03

GoogleCodeExporter commented 8 years ago
Same problem here, VLC Remote 0.5.3, Android 2.3, Arnova 10 G2.

This is related to a bug in android (since 2.1, got fixed since 3.0);
http://code.google.com/p/android/issues/detail?id=6191
You can workaround it by creating your own ViewFlipper class eg.;
(might not be the best place/package, just created this class in the package 
closest to my mouse cursor)
//--1)------------------
package org.peterbaldwin.vlcremote.fragment;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ViewFlipper;

public class FixedViewFlipper extends ViewFlipper {
    public FixedViewFlipper(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public FixedViewFlipper(Context context) {
        super(context);
    }

    @Override
    protected void onDetachedFromWindow() {
        try {
            super.onDetachedFromWindow();
        } catch (IllegalArgumentException e) {
            stopFlipping();
        }
    }
}
//----------------------
In /android-vlc-remote/res/layout-xlarge/main.xml
//--2)------------------
replace (line 62 & 79)
  <ViewFlipper
    ...
  </ViewFlipper>
by
  <org.peterbaldwin.vlcremote.fragment.FixedViewFlipper
  ...
  </org.peterbaldwin.vlcremote.fragment.FixedViewFlipper>

btw. i'ld love to post a patch here but unfortunately I'm quite not familiar 
with Git.

Original comment by bart.ver...@gmail.com on 20 Oct 2011 at 11:32

GoogleCodeExporter commented 8 years ago
There are a few problems with the tablet layout on the Arnova 10 G2 because 
it's not running Android 3.0, so I've disabled the tablet layout for 2.3 
devices for now.  This bug should no longer be an issue because only the tablet 
layout uses a ViewFlipper.  Sorry, I know this isn't ideal for G2 users :(

Original comment by mr.bald...@gmail.com on 23 Dec 2011 at 7:20