|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This report was generated with an evaluation server license. Purchase Clover or configure your license. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MyViewFlipper | Line # 31 | 5 | 4 | 62,5% |
0.625
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
No Tests | |||
1 | /* | |
2 | This file is part of Subsonic. | |
3 | ||
4 | Subsonic is free software: you can redistribute it and/or modify | |
5 | it under the terms of the GNU General Public License as published by | |
6 | the Free Software Foundation, either version 3 of the License, or | |
7 | (at your option) any later version. | |
8 | ||
9 | Subsonic is distributed in the hope that it will be useful, | |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | GNU General Public License for more details. | |
13 | ||
14 | You should have received a copy of the GNU General Public License | |
15 | along with Subsonic. If not, see <http://www.gnu.org/licenses/>. | |
16 | ||
17 | Copyright 2009 (C) Sindre Mehus | |
18 | */ | |
19 | package net.sourceforge.subsonic.androidapp.util; | |
20 | ||
21 | import android.content.Context; | |
22 | import android.util.AttributeSet; | |
23 | import android.widget.ViewFlipper; | |
24 | ||
25 | /** | |
26 | * Work-around for Android Issue 6191 (http://code.google.com/p/android/issues/detail?id=6191) | |
27 | * | |
28 | * @author Sindre Mehus | |
29 | * @version $Id$ | |
30 | */ | |
31 | public class MyViewFlipper extends ViewFlipper { | |
32 | ||
33 | 0 |
![]() |
34 | 0 | super(context); |
35 | } | |
36 | ||
37 | 12 |
![]() |
38 | 12 | super(context, attrs); |
39 | } | |
40 | ||
41 | ||
42 | 10 |
![]() |
43 | protected void onDetachedFromWindow() { | |
44 | 10 | try { |
45 | 10 | super.onDetachedFromWindow(); |
46 | } | |
47 | catch (IllegalArgumentException e) { | |
48 | // Call stopFlipping() in order to kick off updateRunning() | |
49 | 0 | stopFlipping(); |
50 | } | |
51 | } | |
52 | } | |
53 |
|