質問編集履歴
2
微修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
`PopupWindow`の`setAnimationStyle`には、ドキュメントに`0 for no animation`
|
13
|
+
`PopupWindow`の`setAnimationStyle`には、ドキュメントにアニメーション無しは0(`0 for no animation`)と書かれています。
|
14
14
|
|
15
15
|
|
16
16
|
|
1
より詳細に
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,16 +1,88 @@
|
|
1
1
|
[material.io](https://material.io/components/menus/android#dropdown-menus)の`List popup window menus`でリスト表示のアニメーションを消去したいのですが、`listPopupWindow.animationStyle = 0`とやってもうまく消えてくれません。
|
2
2
|
|
3
|
+
|
4
|
+
|
5
|
+
`listPopupWindow.animationStyle = 0`で、
|
6
|
+
|
7
|
+
`ListPopupWindow`の`setAnimationStyle`が呼ばれその内部で
|
8
|
+
|
9
|
+
`PopupWindow`に(mPopup)`setAnimationStyle`で`animationStyle`をセットしています。
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
`PopupWindow`の`setAnimationStyle`には、ドキュメントに`0 for no animation`アニメーション無しは0と書かれています。
|
14
|
+
|
15
|
+
|
16
|
+
|
3
17
|
どなたかお知恵を頂けないでしょうか?
|
4
18
|
|
5
19
|
|
6
20
|
|
7
21
|
```
|
8
22
|
|
23
|
+
public class ListPopupWindow implements ShowableListMenu {
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
PopupWindow mPopup;
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
/**
|
32
|
+
|
33
|
+
* Set an animation style to use when the popup window is shown or dismissed.
|
34
|
+
|
35
|
+
*
|
36
|
+
|
37
|
+
* @param animationStyle Animation style to use.
|
38
|
+
|
39
|
+
*/
|
40
|
+
|
41
|
+
public void setAnimationStyle(@StyleRes int animationStyle) {
|
42
|
+
|
43
|
+
mPopup.setAnimationStyle(animationStyle);
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
public class PopupWindow {
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
|
55
|
+
* <p>Change the animation style resource for this popup.</p>
|
56
|
+
|
57
|
+
*
|
58
|
+
|
59
|
+
* <p>If the popup is showing, calling this method will take effect only
|
60
|
+
|
61
|
+
* the next time the popup is shown or through a manual call to one of
|
62
|
+
|
63
|
+
* the {@link #update()} methods.</p>
|
64
|
+
|
65
|
+
*
|
66
|
+
|
9
|
-
@param animationStyle animation style to use when the popup appears
|
67
|
+
* @param animationStyle animation style to use when the popup appears
|
10
|
-
|
68
|
+
|
11
|
-
|
69
|
+
* and disappears. Set to -1 for the default animation, 0 for no
|
12
|
-
|
70
|
+
|
13
|
-
|
71
|
+
* animation, or a resource identifier for an explicit animation.
|
72
|
+
|
73
|
+
*
|
74
|
+
|
75
|
+
* @see #update()
|
76
|
+
|
77
|
+
*/
|
78
|
+
|
79
|
+
public void setAnimationStyle(int animationStyle) {
|
80
|
+
|
81
|
+
mAnimationStyle = animationStyle;
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
|
14
86
|
|
15
87
|
```
|
16
88
|
|