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