fix: 修改冷气被切割的问题
BIN
app/release/app-release.apk
Normal file
BIN
app/release/baselineProfiles/0/app-release.dm
Normal file
BIN
app/release/baselineProfiles/1/app-release.dm
Normal file
37
app/release/output-metadata.json
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.cariad.cea.aircondition",
|
||||||
|
"variantName": "release",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 1,
|
||||||
|
"versionName": "1.0",
|
||||||
|
"outputFile": "app-release.apk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"elementType": "File",
|
||||||
|
"baselineProfiles": [
|
||||||
|
{
|
||||||
|
"minApi": 28,
|
||||||
|
"maxApi": 30,
|
||||||
|
"baselineProfiles": [
|
||||||
|
"baselineProfiles/1/app-release.dm"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"minApi": 31,
|
||||||
|
"maxApi": 2147483647,
|
||||||
|
"baselineProfiles": [
|
||||||
|
"baselineProfiles/0/app-release.dm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minSdkVersionForDexing": 29
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ public class BaseSimulationWindView extends GifImageView {
|
|||||||
protected Paint paint; // 绘制标准线的画笔
|
protected Paint paint; // 绘制标准线的画笔
|
||||||
protected float touchDownX, touchDownY, touchXDistance, touchYDistance;
|
protected float touchDownX, touchDownY, touchXDistance, touchYDistance;
|
||||||
protected float[] srcScale = new float[2];
|
protected float[] srcScale = new float[2];
|
||||||
|
protected float maxDegree = 0;
|
||||||
public BaseSimulationWindView(Context context) {
|
public BaseSimulationWindView(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
init(context);
|
init(context);
|
||||||
@@ -43,6 +44,7 @@ public class BaseSimulationWindView extends GifImageView {
|
|||||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||||
super.onLayout(changed, left, top, right, bottom);
|
super.onLayout(changed, left, top, right, bottom);
|
||||||
srcScale = preSrcScale();
|
srcScale = preSrcScale();
|
||||||
|
maxDegree = (float) Math.atan2((float) getWidth()/3, getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init(Context context) {
|
protected void init(Context context) {
|
||||||
|
|||||||
@@ -94,10 +94,16 @@ public class SimulationWindBottomView extends BaseSimulationWindView {
|
|||||||
canvas.drawBitmap(bufferBitmap, 0, 0, paint);
|
canvas.drawBitmap(bufferBitmap, 0, 0, paint);
|
||||||
Matrix matrix = new Matrix();
|
Matrix matrix = new Matrix();
|
||||||
// 根据当前点位,计算View的旋转角度和缩放比例,旋转角度根据X轴的偏移量获取,缩放比例按照Y的偏移量获取
|
// 根据当前点位,计算View的旋转角度和缩放比例,旋转角度根据X轴的偏移量获取,缩放比例按照Y的偏移量获取
|
||||||
float degree = (float) Math.atan2((currentTouchPositionX-(getWidth()/2)), currentTouchPositionY);
|
float degree = (float) Math.atan2((currentTouchPositionX-((double) getWidth() /2)), currentTouchPositionY);
|
||||||
matrix.setSkew(degree, 0f, getWidth()/2, 0);
|
if (degree>0&& degree > maxDegree) {
|
||||||
|
degree = maxDegree;
|
||||||
|
}
|
||||||
|
if (degree<0 && degree < -maxDegree) {
|
||||||
|
degree = -maxDegree;
|
||||||
|
}
|
||||||
|
matrix.setSkew(degree, 0f, (float) getWidth() /2, 0);
|
||||||
float scale = currentTouchPositionY / getHeight();
|
float scale = currentTouchPositionY / getHeight();
|
||||||
matrix.preScale(1, scale, getWidth()/2, 0);
|
matrix.preScale(1, scale, (float) getWidth() /2, 0);
|
||||||
// 最开始对图片进行缩放处理,适配当前ImageView控件
|
// 最开始对图片进行缩放处理,适配当前ImageView控件
|
||||||
matrix.preScale(srcScale[0], srcScale[1]);
|
matrix.preScale(srcScale[0], srcScale[1]);
|
||||||
setImageMatrix(matrix);
|
setImageMatrix(matrix);
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ public class SimulationWindTopView extends BaseSimulationWindView {
|
|||||||
Matrix matrix = new Matrix();
|
Matrix matrix = new Matrix();
|
||||||
// // 根据当前点位,计算View的旋转角度和缩放比例,旋转角度根据X轴的偏移量获取,缩放比例按照Y的偏移量获取
|
// // 根据当前点位,计算View的旋转角度和缩放比例,旋转角度根据X轴的偏移量获取,缩放比例按照Y的偏移量获取
|
||||||
float degree = (float) Math.atan2((currentTouchPositionX-(getWidth()/2)), getHeight()-currentTouchPositionY);
|
float degree = (float) Math.atan2((currentTouchPositionX-(getWidth()/2)), getHeight()-currentTouchPositionY);
|
||||||
|
if (degree>0&& degree > maxDegree) {
|
||||||
|
degree = maxDegree;
|
||||||
|
}
|
||||||
|
if (degree<0 && degree < -maxDegree) {
|
||||||
|
degree = -maxDegree;
|
||||||
|
}
|
||||||
if (getHeight()-currentTouchPositionY<=0) { // 如果当前触控点在底部区域,则不需要变形处理
|
if (getHeight()-currentTouchPositionY<=0) { // 如果当前触控点在底部区域,则不需要变形处理
|
||||||
degree = 0f;
|
degree = 0f;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/cycle_00001.png
Normal file
|
After Width: | Height: | Size: 1004 KiB |
BIN
app/src/main/res/drawable/cycle_00002.png
Normal file
|
After Width: | Height: | Size: 1004 KiB |
BIN
app/src/main/res/drawable/cycle_00003.png
Normal file
|
After Width: | Height: | Size: 1008 KiB |
BIN
app/src/main/res/drawable/cycle_00004.png
Normal file
|
After Width: | Height: | Size: 1007 KiB |
BIN
app/src/main/res/drawable/cycle_00005.png
Normal file
|
After Width: | Height: | Size: 1004 KiB |
BIN
app/src/main/res/drawable/cycle_00006.png
Normal file
|
After Width: | Height: | Size: 1002 KiB |
BIN
app/src/main/res/drawable/cycle_00007.png
Normal file
|
After Width: | Height: | Size: 1001 KiB |
BIN
app/src/main/res/drawable/cycle_00008.png
Normal file
|
After Width: | Height: | Size: 1003 KiB |
BIN
app/src/main/res/drawable/cycle_00009.png
Normal file
|
After Width: | Height: | Size: 1003 KiB |
BIN
app/src/main/res/drawable/cycle_00010.png
Normal file
|
After Width: | Height: | Size: 1005 KiB |
BIN
app/src/main/res/drawable/cycle_00011.png
Normal file
|
After Width: | Height: | Size: 1005 KiB |
BIN
app/src/main/res/drawable/cycle_00012.png
Normal file
|
After Width: | Height: | Size: 1005 KiB |
BIN
app/src/main/res/drawable/cycle_00013.png
Normal file
|
After Width: | Height: | Size: 1004 KiB |
BIN
app/src/main/res/drawable/cycle_00014.png
Normal file
|
After Width: | Height: | Size: 1004 KiB |
BIN
app/src/main/res/drawable/cycle_00015.png
Normal file
|
After Width: | Height: | Size: 1003 KiB |
BIN
app/src/main/res/drawable/cycle_00016.png
Normal file
|
After Width: | Height: | Size: 1001 KiB |
BIN
app/src/main/res/drawable/cycle_00017.png
Normal file
|
After Width: | Height: | Size: 1000 KiB |
BIN
app/src/main/res/drawable/cycle_00018.png
Normal file
|
After Width: | Height: | Size: 996 KiB |
BIN
app/src/main/res/drawable/cycle_00019.png
Normal file
|
After Width: | Height: | Size: 996 KiB |
BIN
app/src/main/res/drawable/cycle_00020.png
Normal file
|
After Width: | Height: | Size: 996 KiB |
BIN
app/src/main/res/drawable/cycle_00021.png
Normal file
|
After Width: | Height: | Size: 994 KiB |
BIN
app/src/main/res/drawable/cycle_00022.png
Normal file
|
After Width: | Height: | Size: 992 KiB |
BIN
app/src/main/res/drawable/cycle_00023.png
Normal file
|
After Width: | Height: | Size: 988 KiB |
BIN
app/src/main/res/drawable/cycle_00024.png
Normal file
|
After Width: | Height: | Size: 991 KiB |
BIN
app/src/main/res/drawable/cycle_00025.png
Normal file
|
After Width: | Height: | Size: 997 KiB |
BIN
app/src/main/res/drawable/cycle_00026.png
Normal file
|
After Width: | Height: | Size: 996 KiB |
BIN
app/src/main/res/drawable/cycle_00027.png
Normal file
|
After Width: | Height: | Size: 992 KiB |
BIN
app/src/main/res/drawable/cycle_00028.png
Normal file
|
After Width: | Height: | Size: 991 KiB |
BIN
app/src/main/res/drawable/cycle_00029.png
Normal file
|
After Width: | Height: | Size: 989 KiB |
BIN
app/src/main/res/drawable/cycle_00030.png
Normal file
|
After Width: | Height: | Size: 991 KiB |
BIN
app/src/main/res/drawable/cycle_00031.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00032.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00033.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00034.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00035.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00036.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00037.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00038.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00039.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
app/src/main/res/drawable/cycle_00040.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
94
app/src/main/res/drawable/cycle_animation_list.xml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:oneshot="false">
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00001"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00001"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00002"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00003"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00004"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00005"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00006"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00007"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00008"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00009"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00010"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00011"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00012"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00013"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00014"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00015"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00016"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00017"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00018"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00019"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00020"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00021"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00022"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00023"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00024"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00025"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00026"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00027"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00028"
|
||||||
|
android:duration="70"/>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/cycle_00029"
|
||||||
|
android:duration="70"/>
|
||||||
|
</animation-list>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintWidth_percent="0.5"
|
app:layout_constraintWidth_percent="0.5"
|
||||||
android:scaleType="matrix"
|
android:scaleType="matrix"
|
||||||
android:src="@drawable/ac_animation_list"/>
|
android:src="@drawable/cycle_animation_list"/>
|
||||||
<com.cariad.cea.aircondition.views.SimulationWindBottomView
|
<com.cariad.cea.aircondition.views.SimulationWindBottomView
|
||||||
android:id="@+id/img_sim_wind_bottom"
|
android:id="@+id/img_sim_wind_bottom"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -27,5 +27,5 @@
|
|||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintWidth_percent="0.5"
|
app:layout_constraintWidth_percent="0.5"
|
||||||
android:scaleType="matrix"
|
android:scaleType="matrix"
|
||||||
android:src="@drawable/ac_animation_list"/>
|
android:src="@drawable/cycle_animation_list"/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
4
app/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<dimen name="air_codition_padding_horizontal">12dp</dimen>
|
||||||
|
</resources>
|
||||||