質問編集履歴
1
ソースコード一部修正。質問文の追加。
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,13 +4,19 @@
|
|
4
4
|
|
5
5
|
ImageViewをソースコード内でサイズや位置を変えた所、アニメーションしてるのですが、その支点が上端になってしまいます。
|
6
6
|
|
7
|
-
元は下端を支点に、そのImageViewの画像を縮小してるので下にグニャッと縮むのですが、今は上端を支点に縮んでしまいます。
|
7
|
+
元はanimのxmlで、下端を支点に、そのImageViewの画像を縮小してるので下にグニャッと縮むのですが、今は上端を支点に縮んでしまいます。
|
8
8
|
|
9
9
|
以下のようにImageView.setPivotY()とX()しまして、
|
10
10
|
|
11
11
|
デバッグすると値は入ってるのですが、画面では変化無く、上端に向かって縮むのみです。
|
12
12
|
|
13
13
|
どうすれば良いでしょうか。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
すいません。そもそもになってしまいますがxmlでのanimationに対して、ソースコード内から一部変更できますか。
|
18
|
+
|
19
|
+
|
14
20
|
|
15
21
|
|
16
22
|
|
@@ -38,10 +44,6 @@
|
|
38
44
|
|
39
45
|
//ピボット変更。ひとまず大きな値を入れて変化を見る
|
40
46
|
|
41
|
-
Activity3.getIv_player1_attack().setPivotY(1000.0f);
|
42
|
-
|
43
|
-
Activity3.getIv_player1_attack().setPivotX(1000.0f);
|
44
|
-
|
45
47
|
|
46
48
|
|
47
49
|
Activity3.getIv_player1_attack().requestLayout();
|
@@ -60,11 +62,23 @@
|
|
60
62
|
|
61
63
|
|
62
64
|
|
63
|
-
//
|
65
|
+
//グニャッと縮むanimation
|
64
66
|
|
65
67
|
anim1 = AnimationUtils.loadAnimation(Activity3.mainActivity, R.anim.anim_set_jump_attack1);
|
66
68
|
|
69
|
+
Activity3.getIv_player1_attack().setPivotY(1000.0f);
|
70
|
+
|
71
|
+
Activity3.getIv_player1_attack().setPivotX(1000.0f);
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
Activity3.getIv_player1_attack().requestLayout();
|
76
|
+
|
77
|
+
Activity3.getIv_player1_attack().postInvalidate();
|
78
|
+
|
67
|
-
anim1.setAnimationListener( new AnimationListener() {
|
79
|
+
anim1.setAnimationListener( new AnimationListener() {
|
80
|
+
|
81
|
+
//~~~~省略~~~~
|
68
82
|
|
69
83
|
|
70
84
|
|