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,6 +14,10 @@ import android.os.Environment; | ||
| 14 | import android.provider.MediaStore; | 14 | import android.provider.MediaStore; |
| 15 | import android.text.TextUtils; | 15 | import android.text.TextUtils; |
| 16 | import android.util.Log; | 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 | import com.alibaba.android.arouter.facade.annotation.Route; | 22 | import com.alibaba.android.arouter.facade.annotation.Route; |
| 19 | import com.alibaba.android.arouter.launcher.ARouter; | 23 | import com.alibaba.android.arouter.launcher.ARouter; |
| @@ -21,6 +25,7 @@ import com.cnlive.libs.base.application.AppConfig; | @@ -21,6 +25,7 @@ import com.cnlive.libs.base.application.AppConfig; | ||
| 21 | import com.cnlive.libs.base.util.AlertUtil; | 25 | import com.cnlive.libs.base.util.AlertUtil; |
| 22 | import com.cnlive.libs.base.util.DoublePressed; | 26 | import com.cnlive.libs.base.util.DoublePressed; |
| 23 | import com.cnlive.libs.base.util.MD5Util; | 27 | import com.cnlive.libs.base.util.MD5Util; |
| 28 | +import com.cnlive.libs.base.util.StatusBarUtil2; | ||
| 24 | import com.cnlive.libs.base.util.StringUtils; | 29 | import com.cnlive.libs.base.util.StringUtils; |
| 25 | import com.cnlive.libs.data.network.util.UriUtil; | 30 | import com.cnlive.libs.data.network.util.UriUtil; |
| 26 | import com.cnlive.media.utlis.AndroidQUtil; | 31 | import com.cnlive.media.utlis.AndroidQUtil; |
| @@ -81,12 +86,15 @@ public class ShareIMActivity extends AppCompatActivity { | @@ -81,12 +86,15 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 81 | private String SUBJECT = "android.intent.extra.SUBJECT"; | 86 | private String SUBJECT = "android.intent.extra.SUBJECT"; |
| 82 | private ArrayList<String> mutil; | 87 | private ArrayList<String> mutil; |
| 83 | private boolean equals; | 88 | private boolean equals; |
| 89 | + private Animation rotateAnimation; | ||
| 90 | + | ||
| 84 | 91 | ||
| 85 | @RequiresApi(api = Build.VERSION_CODES.KITKAT) | 92 | @RequiresApi(api = Build.VERSION_CODES.KITKAT) |
| 86 | @Override | 93 | @Override |
| 87 | protected void onCreate(@Nullable Bundle savedInstanceState) { | 94 | protected void onCreate(@Nullable Bundle savedInstanceState) { |
| 88 | super.onCreate(savedInstanceState); | 95 | super.onCreate(savedInstanceState); |
| 89 | setContentView(R.layout.sharemoment); | 96 | setContentView(R.layout.sharemoment); |
| 97 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.shareOut), 0); | ||
| 90 | timer = new Timer(); | 98 | timer = new Timer(); |
| 91 | photoTimer = new Timer(); | 99 | photoTimer = new Timer(); |
| 92 | type = getIntent().getStringExtra("type"); | 100 | type = getIntent().getStringExtra("type"); |
| @@ -96,7 +104,13 @@ public class ShareIMActivity extends AppCompatActivity { | @@ -96,7 +104,13 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 96 | outTyp = getIntent().getStringExtra("outType"); | 104 | outTyp = getIntent().getStringExtra("outType"); |
| 97 | isQ = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q; | 105 | isQ = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q; |
| 98 | checkIntent(); | 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,6 +118,7 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 104 | protected void onDestroy() { | 118 | protected void onDestroy() { |
| 105 | super.onDestroy(); | 119 | super.onDestroy(); |
| 106 | if (timer != null) timer.cancel(); | 120 | if (timer != null) timer.cancel(); |
| 121 | + if (rotateAnimation != null) rotateAnimation.cancel(); | ||
| 107 | } | 122 | } |
| 108 | 123 | ||
| 109 | @TargetApi(Build.VERSION_CODES.KITKAT) | 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,6 +14,10 @@ import android.provider.DocumentsContract; | ||
| 14 | import android.provider.MediaStore; | 14 | import android.provider.MediaStore; |
| 15 | import android.text.TextUtils; | 15 | import android.text.TextUtils; |
| 16 | import android.util.Log; | 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 | import com.alibaba.android.arouter.facade.annotation.Route; | 22 | import com.alibaba.android.arouter.facade.annotation.Route; |
| 19 | import com.alibaba.android.arouter.launcher.ARouter; | 23 | import com.alibaba.android.arouter.launcher.ARouter; |
| @@ -23,6 +27,7 @@ import com.cnlive.libs.base.util.AlertUtil; | @@ -23,6 +27,7 @@ import com.cnlive.libs.base.util.AlertUtil; | ||
| 23 | import com.cnlive.libs.base.util.DoublePressed; | 27 | import com.cnlive.libs.base.util.DoublePressed; |
| 24 | import com.cnlive.libs.base.util.MD5Util; | 28 | import com.cnlive.libs.base.util.MD5Util; |
| 25 | import com.cnlive.libs.base.util.ShareReleaseInfoUtil; | 29 | import com.cnlive.libs.base.util.ShareReleaseInfoUtil; |
| 30 | +import com.cnlive.libs.base.util.StatusBarUtil2; | ||
| 26 | import com.cnlive.libs.base.util.StringUtils; | 31 | import com.cnlive.libs.base.util.StringUtils; |
| 27 | import com.cnlive.media.meidia.entity.Media; | 32 | import com.cnlive.media.meidia.entity.Media; |
| 28 | import com.cnlive.media.utlis.AndroidQUtil; | 33 | import com.cnlive.media.utlis.AndroidQUtil; |
| @@ -71,12 +76,22 @@ public class ShareMomentActivity extends AppCompatActivity { | @@ -71,12 +76,22 @@ public class ShareMomentActivity extends AppCompatActivity { | ||
| 71 | private ArrayList<String> mutil; | 76 | private ArrayList<String> mutil; |
| 72 | String pathreal = ""; | 77 | String pathreal = ""; |
| 73 | private boolean equals; | 78 | private boolean equals; |
| 79 | + private Animation rotateAnimation; | ||
| 80 | + | ||
| 74 | 81 | ||
| 75 | @RequiresApi(api = Build.VERSION_CODES.KITKAT) | 82 | @RequiresApi(api = Build.VERSION_CODES.KITKAT) |
| 76 | @Override | 83 | @Override |
| 77 | protected void onCreate(@Nullable Bundle savedInstanceState) { | 84 | protected void onCreate(@Nullable Bundle savedInstanceState) { |
| 78 | super.onCreate(savedInstanceState); | 85 | super.onCreate(savedInstanceState); |
| 79 | setContentView(R.layout.sharemoment); | 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 | timer = new Timer(); | 95 | timer = new Timer(); |
| 81 | type = getIntent().getStringExtra("type"); | 96 | type = getIntent().getStringExtra("type"); |
| 82 | bundle = getIntent().getBundleExtra("bundle"); | 97 | bundle = getIntent().getBundleExtra("bundle"); |
| @@ -843,6 +858,7 @@ public class ShareMomentActivity extends AppCompatActivity { | @@ -843,6 +858,7 @@ public class ShareMomentActivity extends AppCompatActivity { | ||
| 843 | protected void onDestroy() { | 858 | protected void onDestroy() { |
| 844 | super.onDestroy(); | 859 | super.onDestroy(); |
| 845 | if (timer != null) timer.cancel(); | 860 | if (timer != null) timer.cancel(); |
| 861 | + if (rotateAnimation != null) rotateAnimation.cancel(); | ||
| 846 | } | 862 | } |
| 847 | 863 | ||
| 848 | private String getPath(String cachePath) { | 864 | private String getPath(String cachePath) { |
OutSide_Share/src/main/res/layout/sharemoment.xml
| @@ -3,10 +3,34 @@ | @@ -3,10 +3,34 @@ | ||
| 3 | xmlns:android="http://schemas.android.com/apk/res/android" | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 5 | android:layout_height="match_parent" | 5 | android:layout_height="match_parent" |
| 6 | - android:background="@color/transparent" | 6 | + android:background="@color/black" |
| 7 | android:alpha="0.5" | 7 | android:alpha="0.5" |
| 8 | android:fitsSystemWindows="true" | 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 | </RelativeLayout> | 36 | </RelativeLayout> |
| 13 | \ No newline at end of file | 37 | \ No newline at end of file |
OutSide_Share/src/main/res/values/colors.xml
| @@ -6,5 +6,6 @@ | @@ -6,5 +6,6 @@ | ||
| 6 | <color name="color_watching_info_top_bg">#aa66bdc9</color> | 6 | <color name="color_watching_info_top_bg">#aa66bdc9</color> |
| 7 | <color name="black">#000000</color> | 7 | <color name="black">#000000</color> |
| 8 | <color name="share_bg">#b2000000</color> | 8 | <color name="share_bg">#b2000000</color> |
| 9 | + <color name="shareOut">#767676</color> | ||
| 9 | 10 | ||
| 10 | </resources> | 11 | </resources> |