Merge branch 'an' into dev
@@ -5,32 +5,32 @@ import com.mogo.module.v2x.R;
|
|||||||
|
|
||||||
public class AnimationResources {
|
public class AnimationResources {
|
||||||
public static final int loadingRes[] = {
|
public static final int loadingRes[] = {
|
||||||
R.drawable.v_to_x_loading_car0000,
|
// R.drawable.v_to_x_loading_car0000,
|
||||||
R.drawable.v_to_x_loading_car0002,
|
// R.drawable.v_to_x_loading_car0002,
|
||||||
R.drawable.v_to_x_loading_car0004,
|
// R.drawable.v_to_x_loading_car0004,
|
||||||
R.drawable.v_to_x_loading_car0006,
|
// R.drawable.v_to_x_loading_car0006,
|
||||||
R.drawable.v_to_x_loading_car0008,
|
// R.drawable.v_to_x_loading_car0008,
|
||||||
R.drawable.v_to_x_loading_car0010,
|
// R.drawable.v_to_x_loading_car0010,
|
||||||
R.drawable.v_to_x_loading_car0012,
|
// R.drawable.v_to_x_loading_car0012,
|
||||||
R.drawable.v_to_x_loading_car0014,
|
// R.drawable.v_to_x_loading_car0014,
|
||||||
R.drawable.v_to_x_loading_car0016,
|
// R.drawable.v_to_x_loading_car0016,
|
||||||
R.drawable.v_to_x_loading_car0018,
|
// R.drawable.v_to_x_loading_car0018,
|
||||||
R.drawable.v_to_x_loading_car0020,
|
// R.drawable.v_to_x_loading_car0020,
|
||||||
R.drawable.v_to_x_loading_car0022,
|
// R.drawable.v_to_x_loading_car0022,
|
||||||
R.drawable.v_to_x_loading_car0024,
|
// R.drawable.v_to_x_loading_car0024,
|
||||||
R.drawable.v_to_x_loading_car0025,
|
// R.drawable.v_to_x_loading_car0025,
|
||||||
R.drawable.v_to_x_loading_car0027,
|
// R.drawable.v_to_x_loading_car0027,
|
||||||
R.drawable.v_to_x_loading_car0029,
|
// R.drawable.v_to_x_loading_car0029,
|
||||||
R.drawable.v_to_x_loading_car0031,
|
// R.drawable.v_to_x_loading_car0031,
|
||||||
R.drawable.v_to_x_loading_car0033,
|
// R.drawable.v_to_x_loading_car0033,
|
||||||
R.drawable.v_to_x_loading_car0035,
|
// R.drawable.v_to_x_loading_car0035,
|
||||||
R.drawable.v_to_x_loading_car0037,
|
// R.drawable.v_to_x_loading_car0037,
|
||||||
R.drawable.v_to_x_loading_car0039,
|
// R.drawable.v_to_x_loading_car0039,
|
||||||
R.drawable.v_to_x_loading_car0041,
|
// R.drawable.v_to_x_loading_car0041,
|
||||||
R.drawable.v_to_x_loading_car0043,
|
// R.drawable.v_to_x_loading_car0043,
|
||||||
R.drawable.v_to_x_loading_car0045,
|
// R.drawable.v_to_x_loading_car0045,
|
||||||
R.drawable.v_to_x_loading_car0047,
|
// R.drawable.v_to_x_loading_car0047,
|
||||||
R.drawable.v_to_x_loading_car0048,
|
// R.drawable.v_to_x_loading_car0048,
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.graphics.drawable.AnimationDrawable;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
import com.mogo.utils.ThreadPoolService;
|
import com.mogo.utils.ThreadPoolService;
|
||||||
import com.mogo.utils.UiThreadHandler;
|
import com.mogo.utils.UiThreadHandler;
|
||||||
@@ -11,11 +12,11 @@ import com.mogo.utils.UiThreadHandler;
|
|||||||
public class V2XAnimationManager implements Animation {
|
public class V2XAnimationManager implements Animation {
|
||||||
|
|
||||||
private static final String TAG = "V2XAnimationManager";
|
private static final String TAG = "V2XAnimationManager";
|
||||||
private ImageView targetImageView;
|
private ProgressBar targetImageView;
|
||||||
private Animation delegate;
|
private Animation delegate;
|
||||||
private boolean isStarted = false;
|
private boolean isStarted = false;
|
||||||
|
|
||||||
public void animationWithTarget(ImageView imageView, int[] resources, int duration) {
|
public void animationWithTarget(ProgressBar imageView, int[] resources, int duration) {
|
||||||
targetImageView = imageView;
|
targetImageView = imageView;
|
||||||
ThreadPoolService.execute(() -> {
|
ThreadPoolService.execute(() -> {
|
||||||
final AnimationDrawable drawable = new AnimationDrawable();
|
final AnimationDrawable drawable = new AnimationDrawable();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ import com.mogo.module.v2x.utils.animation.V2XAnimationManager;
|
|||||||
|
|
||||||
public class V2XNetworkLoadingView extends RelativeLayout {
|
public class V2XNetworkLoadingView extends RelativeLayout {
|
||||||
|
|
||||||
private ImageView loadView;
|
private ProgressBar loadView;
|
||||||
private TextView textView;
|
private TextView textView;
|
||||||
private V2XAnimationManager v2XAnimationManager;
|
private V2XAnimationManager v2XAnimationManager;
|
||||||
public Button refresButton;
|
public Button refresButton;
|
||||||
@@ -32,7 +33,10 @@ public class V2XNetworkLoadingView extends RelativeLayout {
|
|||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
LayoutInflater.from(context).inflate(R.layout.v2x_network_loading_item, this);
|
LayoutInflater.from(context).inflate(R.layout.v2x_network_loading_item, this);
|
||||||
initView();
|
initView();
|
||||||
setLoadingImage(AnimationResources.loadingRes);
|
/*
|
||||||
|
添加动画图片资源
|
||||||
|
* */
|
||||||
|
// setLoadingImage(AnimationResources.loadingRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V2XNetworkLoadingView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
public V2XNetworkLoadingView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -7,14 +7,14 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ImageView
|
<ProgressBar
|
||||||
android:id="@+id/loading_imageview"
|
android:id="@+id/loading_imageview"
|
||||||
android:layout_width="@dimen/v2x_loading_ani_width"
|
android:layout_width="@dimen/v2x_loading_ani_width"
|
||||||
android:layout_height="@dimen/v2x_loading_ani_width"
|
android:layout_height="@dimen/v2x_loading_ani_width"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="60px"
|
android:layout_marginTop="60px"
|
||||||
android:background="@drawable/v_to_x_loading_car0000"
|
android:indeterminateTint="#256BFF"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.5"
|
app:layout_constraintVertical_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_gravity="top|center"
|
android:layout_gravity="top|center"
|
||||||
android:alpha="0.7"
|
android:alpha="0.7"
|
||||||
android:paddingTop="14px"
|
android:paddingTop="@dimen/dp_14"
|
||||||
android:text="正在获取信息…"
|
android:text="正在获取信息…"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="@color/v2x_FFF_666"
|
||||||
android:textSize="@dimen/dp_34"
|
android:textSize="@dimen/dp_34"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/loading_imageview"
|
app:layout_constraintBottom_toBottomOf="@+id/loading_imageview"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
<dimen name="module_v2x_panel_width">82px</dimen>
|
<dimen name="module_v2x_panel_width">82px</dimen>
|
||||||
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
|
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
|
||||||
<dimen name="share_empty_icon_width">117px</dimen>
|
<dimen name="share_empty_icon_width">117px</dimen>
|
||||||
<dimen name="v2x_loading_ani_width">200px</dimen>
|
<dimen name="v2x_loading_ani_width">100px</dimen>
|
||||||
<dimen name="v2x_share_btn_width">150px</dimen>
|
<dimen name="v2x_share_btn_width">150px</dimen>
|
||||||
<dimen name="v2x_share_btn_height">48px</dimen>
|
<dimen name="v2x_share_btn_height">48px</dimen>
|
||||||
<dimen name="v2x_index_rating_top">17px</dimen>
|
<dimen name="v2x_index_rating_top">17px</dimen>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<dimen name="module_v2x_panel_icon_cor">30px</dimen>
|
<dimen name="module_v2x_panel_icon_cor">30px</dimen>
|
||||||
<dimen name="module_v2x_panel_width">140px</dimen>
|
<dimen name="module_v2x_panel_width">140px</dimen>
|
||||||
<dimen name="share_empty_icon_width">219px</dimen>
|
<dimen name="share_empty_icon_width">219px</dimen>
|
||||||
<dimen name="v2x_loading_ani_width">400px</dimen>
|
<dimen name="v2x_loading_ani_width">200px</dimen>
|
||||||
<dimen name="v2x_share_btn_width">281px</dimen>
|
<dimen name="v2x_share_btn_width">281px</dimen>
|
||||||
<dimen name="v2x_share_btn_height">90px</dimen>
|
<dimen name="v2x_share_btn_height">90px</dimen>
|
||||||
<dimen name="v2x_index_rating_top">28px</dimen>
|
<dimen name="v2x_index_rating_top">28px</dimen>
|
||||||
|
|||||||
@@ -18,5 +18,4 @@
|
|||||||
<color name="v2x_000_FFF">#000000</color>
|
<color name="v2x_000_FFF">#000000</color>
|
||||||
<color name="v2x_FFF_2896FF">#FFF</color>
|
<color name="v2x_FFF_2896FF">#FFF</color>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<dimen name="module_v2x_panel_width">82px</dimen>
|
<dimen name="module_v2x_panel_width">82px</dimen>
|
||||||
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
|
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
|
||||||
<dimen name="share_empty_icon_width">117px</dimen>
|
<dimen name="share_empty_icon_width">117px</dimen>
|
||||||
<dimen name="v2x_loading_ani_width">200px</dimen>
|
<dimen name="v2x_loading_ani_width">100px</dimen>
|
||||||
<dimen name="v2x_share_btn_width">150px</dimen>
|
<dimen name="v2x_share_btn_width">150px</dimen>
|
||||||
<dimen name="v2x_share_btn_height">48px</dimen>
|
<dimen name="v2x_share_btn_height">48px</dimen>
|
||||||
<dimen name="v2x_index_rating_top">17px</dimen>
|
<dimen name="v2x_index_rating_top">17px</dimen>
|
||||||
|
|||||||