[add] 适配M4+图片资源

This commit is contained in:
liujing
2020-09-03 15:50:17 +08:00
parent 56a6b6b94c
commit 07a73287b9
18 changed files with 63 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
package com.mogo.module.v2x.view;
import android.app.Application;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -7,9 +8,14 @@ import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatCallback;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.mogo.module.v2x.R;
import com.mogo.skin.support.IMogoSkinSupportInstaller;
import com.mogo.skin.support.SkinMode;
/**
* author : donghongyu
@@ -18,7 +24,7 @@ import com.mogo.module.v2x.R;
* desc :
* version: 1.0
*/
public class RoundConstraintLayout extends ConstraintLayout{
public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkinSupportInstaller {
private float roundLayoutRadius = 14f;
private Path roundPath;
@@ -74,4 +80,24 @@ public class RoundConstraintLayout extends ConstraintLayout{
}
super.draw(canvas);
}
@Override
public void install(Application application) {
}
@Override
public void loadSkin(SkinMode skinMode) {
}
@Override
public AppCompatDelegate getSkinAppCompatDelegate(AppCompatActivity activity, AppCompatCallback callback) {
return null;
}
@Override
public void init(Context context) {
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,7 +1,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<corners android:radius="@dimen/dp_40" />
<corners android:radius="16px" />
<gradient android:angle="135"
android:endColor="#3F456D"
android:startColor="#3F435F" />

View File

@@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/llEventMore"
android:layout_width="@dimen/dp_132"
android:layout_height="@dimen/dp_132"
android:layout_width="@dimen/module_v2x_panel_width"
android:layout_height="@dimen/module_v2x_panel_width"
android:background="@drawable/v2x_drawable_event_more_bkg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@@ -9,7 +9,7 @@
android:layout_width="@dimen/dp_355"
android:layout_height="@dimen/dp_355"
android:layout_marginTop="@dimen/dp_120"
android:src="@drawable/icon_blank_history_event"
android:src="@drawable/icon_share_empty"
app:layout_constraintBottom_toTopOf="@+id/tvTrip"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -55,5 +55,6 @@
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_des_index_width">16px</dimen>
<dimen name="module_v2x_des_index_height">20px</dimen>
<dimen name="module_v2x_panel_width">66px</dimen>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,10 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<corners android:radius="@dimen/dp_40" />
<gradient android:angle="135"
android:endColor="#FFFFFF"
android:startColor="#F5F5F5" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape>
<corners android:radius="@dimen/dp_180" />
<gradient
android:angle="180"
android:endColor="#5CC1FF"
android:startColor="#256BFF" />
</shape>
</item>
<item android:state_pressed="true">
<shape>
<corners android:radius="@dimen/dp_180" />
<gradient
android:angle="180"
android:endColor="#5CC1FF"
android:startColor="#256BFF" />
</shape>
</item>
</selector>