Commit 13a997d12ba6c2e84f8531e06341dd2c5a9ef843
1 parent
c4b75565
seventh
Showing
4 changed files
with
58 additions
and
2 deletions
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareIMActivity.java
| ... | ... | @@ -14,6 +14,10 @@ import android.os.Environment; |
| 14 | 14 | import android.provider.MediaStore; |
| 15 | 15 | import android.text.TextUtils; |
| 16 | 16 | import android.util.Log; |
| 17 | +import android.view.animation.Animation; | |
| 18 | +import android.view.animation.LinearInterpolator; | |
| 19 | +import android.view.animation.RotateAnimation; | |
| 20 | +import android.widget.ImageView; | |
| 17 | 21 | |
| 18 | 22 | import com.alibaba.android.arouter.facade.annotation.Route; |
| 19 | 23 | import com.alibaba.android.arouter.launcher.ARouter; |
| ... | ... | @@ -21,6 +25,7 @@ import com.cnlive.libs.base.application.AppConfig; |
| 21 | 25 | import com.cnlive.libs.base.util.AlertUtil; |
| 22 | 26 | import com.cnlive.libs.base.util.DoublePressed; |
| 23 | 27 | import com.cnlive.libs.base.util.MD5Util; |
| 28 | +import com.cnlive.libs.base.util.StatusBarUtil2; | |
| 24 | 29 | import com.cnlive.libs.base.util.StringUtils; |
| 25 | 30 | import com.cnlive.libs.data.network.util.UriUtil; |
| 26 | 31 | import com.cnlive.media.utlis.AndroidQUtil; |
| ... | ... | @@ -81,12 +86,15 @@ public class ShareIMActivity extends AppCompatActivity { |
| 81 | 86 | private String SUBJECT = "android.intent.extra.SUBJECT"; |
| 82 | 87 | private ArrayList<String> mutil; |
| 83 | 88 | private boolean equals; |
| 89 | + private Animation rotateAnimation; | |
| 90 | + | |
| 84 | 91 | |
| 85 | 92 | @RequiresApi(api = Build.VERSION_CODES.KITKAT) |
| 86 | 93 | @Override |
| 87 | 94 | protected void onCreate(@Nullable Bundle savedInstanceState) { |
| 88 | 95 | super.onCreate(savedInstanceState); |
| 89 | 96 | setContentView(R.layout.sharemoment); |
| 97 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.shareOut), 0); | |
| 90 | 98 | timer = new Timer(); |
| 91 | 99 | photoTimer = new Timer(); |
| 92 | 100 | type = getIntent().getStringExtra("type"); |
| ... | ... | @@ -96,7 +104,13 @@ public class ShareIMActivity extends AppCompatActivity { |
| 96 | 104 | outTyp = getIntent().getStringExtra("outType"); |
| 97 | 105 | isQ = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q; |
| 98 | 106 | checkIntent(); |
| 99 | - | |
| 107 | + ImageView imageview = findViewById(R.id.im); | |
| 108 | + rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); | |
| 109 | + rotateAnimation.setFillAfter(true); | |
| 110 | + rotateAnimation.setDuration(1000); | |
| 111 | + rotateAnimation.setRepeatCount(-1); | |
| 112 | + rotateAnimation.setInterpolator(new LinearInterpolator()); | |
| 113 | + imageview.startAnimation(rotateAnimation); | |
| 100 | 114 | } |
| 101 | 115 | |
| 102 | 116 | |
| ... | ... | @@ -104,6 +118,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 104 | 118 | protected void onDestroy() { |
| 105 | 119 | super.onDestroy(); |
| 106 | 120 | if (timer != null) timer.cancel(); |
| 121 | + if (rotateAnimation != null) rotateAnimation.cancel(); | |
| 107 | 122 | } |
| 108 | 123 | |
| 109 | 124 | @TargetApi(Build.VERSION_CODES.KITKAT) | ... | ... |
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareMomentActivity.java
| ... | ... | @@ -14,6 +14,10 @@ import android.provider.DocumentsContract; |
| 14 | 14 | import android.provider.MediaStore; |
| 15 | 15 | import android.text.TextUtils; |
| 16 | 16 | import android.util.Log; |
| 17 | +import android.view.animation.Animation; | |
| 18 | +import android.view.animation.LinearInterpolator; | |
| 19 | +import android.view.animation.RotateAnimation; | |
| 20 | +import android.widget.ImageView; | |
| 17 | 21 | |
| 18 | 22 | import com.alibaba.android.arouter.facade.annotation.Route; |
| 19 | 23 | import com.alibaba.android.arouter.launcher.ARouter; |
| ... | ... | @@ -23,6 +27,7 @@ import com.cnlive.libs.base.util.AlertUtil; |
| 23 | 27 | import com.cnlive.libs.base.util.DoublePressed; |
| 24 | 28 | import com.cnlive.libs.base.util.MD5Util; |
| 25 | 29 | import com.cnlive.libs.base.util.ShareReleaseInfoUtil; |
| 30 | +import com.cnlive.libs.base.util.StatusBarUtil2; | |
| 26 | 31 | import com.cnlive.libs.base.util.StringUtils; |
| 27 | 32 | import com.cnlive.media.meidia.entity.Media; |
| 28 | 33 | import com.cnlive.media.utlis.AndroidQUtil; |
| ... | ... | @@ -71,12 +76,22 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 71 | 76 | private ArrayList<String> mutil; |
| 72 | 77 | String pathreal = ""; |
| 73 | 78 | private boolean equals; |
| 79 | + private Animation rotateAnimation; | |
| 80 | + | |
| 74 | 81 | |
| 75 | 82 | @RequiresApi(api = Build.VERSION_CODES.KITKAT) |
| 76 | 83 | @Override |
| 77 | 84 | protected void onCreate(@Nullable Bundle savedInstanceState) { |
| 78 | 85 | super.onCreate(savedInstanceState); |
| 79 | 86 | setContentView(R.layout.sharemoment); |
| 87 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.shareOut), 0); | |
| 88 | + ImageView imageview = findViewById(R.id.im); | |
| 89 | + rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); | |
| 90 | + rotateAnimation.setFillAfter(true); | |
| 91 | + rotateAnimation.setDuration(1000); | |
| 92 | + rotateAnimation.setRepeatCount(-1); | |
| 93 | + rotateAnimation.setInterpolator(new LinearInterpolator()); | |
| 94 | + imageview.startAnimation(rotateAnimation); | |
| 80 | 95 | timer = new Timer(); |
| 81 | 96 | type = getIntent().getStringExtra("type"); |
| 82 | 97 | bundle = getIntent().getBundleExtra("bundle"); |
| ... | ... | @@ -843,6 +858,7 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 843 | 858 | protected void onDestroy() { |
| 844 | 859 | super.onDestroy(); |
| 845 | 860 | if (timer != null) timer.cancel(); |
| 861 | + if (rotateAnimation != null) rotateAnimation.cancel(); | |
| 846 | 862 | } |
| 847 | 863 | |
| 848 | 864 | private String getPath(String cachePath) { | ... | ... |
OutSide_Share/src/main/res/layout/sharemoment.xml
| ... | ... | @@ -3,10 +3,34 @@ |
| 3 | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 4 | 4 | android:layout_width="match_parent" |
| 5 | 5 | android:layout_height="match_parent" |
| 6 | - android:background="@color/transparent" | |
| 6 | + android:background="@color/black" | |
| 7 | 7 | android:alpha="0.5" |
| 8 | 8 | android:fitsSystemWindows="true" |
| 9 | 9 | > |
| 10 | 10 | |
| 11 | + <RelativeLayout | |
| 12 | + android:layout_width="wrap_content" | |
| 13 | + android:layout_height="wrap_content" | |
| 14 | + android:layout_centerInParent="true"> | |
| 15 | + | |
| 16 | + <ImageView | |
| 17 | + android:id="@+id/im" | |
| 18 | + android:layout_width="16dp" | |
| 19 | + android:layout_height="16dp" | |
| 20 | + android:layout_alignParentTop="true" | |
| 21 | + android:src="@drawable/spinner" /> | |
| 22 | + | |
| 23 | + <TextView | |
| 24 | + android:layout_width="wrap_content" | |
| 25 | + android:layout_height="wrap_content" | |
| 26 | + android:layout_toRightOf="@+id/im" | |
| 27 | + android:layout_marginLeft="3dp" | |
| 28 | + android:layout_alignParentTop="true" | |
| 29 | + android:text="请稍候..." | |
| 30 | + android:textSize="12sp" | |
| 31 | + android:textColor="@color/white" /> | |
| 32 | + | |
| 33 | + </RelativeLayout> | |
| 34 | + | |
| 11 | 35 | |
| 12 | 36 | </RelativeLayout> |
| 13 | 37 | \ No newline at end of file | ... | ... |
OutSide_Share/src/main/res/values/colors.xml