Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nodiyphone
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huahua
nodiyphone
Commits
8d7854d9
Commit
8d7854d9
authored
Sep 24, 2021
by
huahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
62cb3f96
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
133 additions
and
982 deletions
+133
-982
app/priguardMapping.txt
+0
-0
app/seeds.txt
+0
-0
app/src/main/java/live/nodiyphoneshell/cend/BaseActivity.java
+6
-1
app/src/main/java/live/nodiyphoneshell/cend/BaseFragment.java
+0
-12
app/src/main/java/live/nodiyphoneshell/cend/BaseMianActivity.java
+0
-2
app/src/main/java/live/nodiyphoneshell/cend/activities/MainActivity.java
+8
-0
app/src/main/java/live/nodiyphoneshell/cend/activities/SplashActivity.java
+0
-1
app/src/main/java/live/nodiyphoneshell/cend/config/Config.java
+2
-0
app/src/main/java/live/nodiyphoneshell/cend/modules/RxProcessBean.java
+10
-0
app/src/main/java/live/nodiyphoneshell/cend/utils/CommonUtil.java
+0
-19
app/src/main/java/live/nodiyphoneshell/cend/utils/DataCleanManager.java
+0
-3
app/src/main/java/live/nodiyphoneshell/cend/utils/DateUtils.java
+0
-8
app/src/main/java/live/nodiyphoneshell/cend/utils/DensityUtil.java
+0
-2
app/src/main/java/live/nodiyphoneshell/cend/utils/ImageUtils.java
+1
-109
app/src/main/java/live/nodiyphoneshell/cend/utils/LinearGradientUtil.java
+0
-214
app/src/main/java/live/nodiyphoneshell/cend/utils/Matrix3.java
+0
-31
app/src/main/java/live/nodiyphoneshell/cend/utils/MatrixExtend.java
+0
-1
app/src/main/java/live/nodiyphoneshell/cend/utils/MyAnimationUtil.java
+0
-5
app/src/main/java/live/nodiyphoneshell/cend/utils/PaintUtil.java
+5
-54
app/src/main/java/live/nodiyphoneshell/cend/utils/PointRect.java
+0
-7
app/src/main/java/live/nodiyphoneshell/cend/utils/PopupWindowUtil.java
+0
-59
app/src/main/java/live/nodiyphoneshell/cend/utils/QRCodeUtil.java
+0
-1
app/src/main/java/live/nodiyphoneshell/cend/utils/RegainToken.java
+0
-2
app/src/main/java/live/nodiyphoneshell/cend/utils/Regular.java
+0
-38
app/src/main/java/live/nodiyphoneshell/cend/utils/SquareRoot.java
+0
-69
app/src/main/java/live/nodiyphoneshell/cend/utils/StatusUtil.java
+0
-49
app/src/main/java/live/nodiyphoneshell/cend/utils/TagAnimationUtils.java
+0
-35
app/src/main/java/live/nodiyphoneshell/cend/utils/TranslateHelper.java
+0
-46
app/src/main/java/live/nodiyphoneshell/cend/utils/Upload.java
+0
-3
app/src/main/java/live/nodiyphoneshell/cend/view/process/ProcessActivity.java
+42
-37
app/src/main/java/live/nodiyphoneshell/cend/view/process/complete/ProcessCompleteActivity.java
+1
-16
app/src/main/java/live/nodiyphoneshell/cend/websocket/XYDClient.java
+20
-9
app/src/main/java/live/nodiyphoneshell/cend/widget/CircleImageView.java
+12
-13
app/src/main/java/live/nodiyphoneshell/cend/widget/CornerTransform.java
+0
-1
app/src/main/java/live/nodiyphoneshell/cend/wsmanager/IWsManager.java
+1
-3
app/src/main/res/layout/activity_process.xml
+25
-108
app/src/main/res/layout/activity_process_complete.xml
+0
-22
app/unused.txt
+0
-2
No files found.
app/priguardMapping.txt
View file @
8d7854d9
This diff is collapsed.
Click to expand it.
app/seeds.txt
View file @
8d7854d9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
app/src/main/java/live/nodiyphoneshell/cend/BaseActivity.java
View file @
8d7854d9
...
@@ -16,6 +16,7 @@ import androidx.core.app.ActivityCompat;
...
@@ -16,6 +16,7 @@ import androidx.core.app.ActivityCompat;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.core.content.ContextCompat
;
import
androidx.core.content.ContextCompat
;
import
butterknife.ButterKnife
;
import
butterknife.ButterKnife
;
import
live.nodiyphoneshell.cend.activities.MainActivity
;
import
live.nodiyphoneshell.cend.utils.ScreenUtils
;
import
live.nodiyphoneshell.cend.utils.ScreenUtils
;
import
live.nodiyphoneshell.cend.websocket.XYDClient
;
import
live.nodiyphoneshell.cend.websocket.XYDClient
;
import
me.jessyan.autosize.AutoSizeCompat
;
import
me.jessyan.autosize.AutoSizeCompat
;
...
@@ -45,6 +46,9 @@ public abstract class BaseActivity extends AppCompatActivity {
...
@@ -45,6 +46,9 @@ public abstract class BaseActivity extends AppCompatActivity {
ScreenUtils
.
setDensityByWidth
(
this
,
getApplication
());
ScreenUtils
.
setDensityByWidth
(
this
,
getApplication
());
setContentView
(
initLayout
());
//重点是这句
setContentView
(
initLayout
());
//重点是这句
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
if
(!(
this
instanceof
MainActivity
))
{
CustomApplication
.
activitys
.
add
(
this
);
}
initView
();
initView
();
initData
();
initData
();
}
}
...
@@ -67,7 +71,7 @@ public abstract class BaseActivity extends AppCompatActivity {
...
@@ -67,7 +71,7 @@ public abstract class BaseActivity extends AppCompatActivity {
@Override
@Override
protected
void
onResume
()
{
protected
void
onResume
()
{
super
.
onResume
();
super
.
onResume
();
if
(!
IsMainActivity
)
{
if
(!
IsMainActivity
)
{
XYDClient
.
getInstance
(
this
).
init
();
XYDClient
.
getInstance
(
this
).
init
();
}
}
}
}
...
@@ -179,6 +183,7 @@ public abstract class BaseActivity extends AppCompatActivity {
...
@@ -179,6 +183,7 @@ public abstract class BaseActivity extends AppCompatActivity {
public
interface
PermissionCall
{
public
interface
PermissionCall
{
//申请成功
//申请成功
void
requestSuccess
();
void
requestSuccess
();
//拒绝
//拒绝
void
refused
();
void
refused
();
}
}
...
...
app/src/main/java/live/nodiyphoneshell/cend/BaseFragment.java
View file @
8d7854d9
...
@@ -49,18 +49,6 @@ public class BaseFragment extends Fragment{
...
@@ -49,18 +49,6 @@ public class BaseFragment extends Fragment{
parent
=
(
FragmentActivity
)
context
;
parent
=
(
FragmentActivity
)
context
;
}
}
/* @Override
public void onAttach(Context context) {
if (context instanceof OnCoverChangeListener) {
mListener = (ABC_Listener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement ABC_Listener");
}
super.onAttach(context);
}*/
@Override
@Override
public
void
setUserVisibleHint
(
boolean
isVisibleToUser
)
{
public
void
setUserVisibleHint
(
boolean
isVisibleToUser
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
);
super
.
setUserVisibleHint
(
isVisibleToUser
);
...
...
app/src/main/java/live/nodiyphoneshell/cend/BaseMianActivity.java
View file @
8d7854d9
...
@@ -24,7 +24,6 @@ public class BaseMianActivity extends AppCompatActivity {
...
@@ -24,7 +24,6 @@ public class BaseMianActivity extends AppCompatActivity {
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
ScreenUtils
.
setDensityByWidth
(
this
,
getApplication
());
ScreenUtils
.
setDensityByWidth
(
this
,
getApplication
());
//ScreenUtils.setCustomDensity(this);
}
}
@Override
@Override
...
@@ -58,7 +57,6 @@ public class BaseMianActivity extends AppCompatActivity {
...
@@ -58,7 +57,6 @@ public class BaseMianActivity extends AppCompatActivity {
super
.
onSaveInstanceState
(
outState
);
super
.
onSaveInstanceState
(
outState
);
}
}
/*处理权限问题*/
/**
/**
* 对子类提供的申请权限方法
* 对子类提供的申请权限方法
* @param permissions 申请的权限
* @param permissions 申请的权限
...
...
app/src/main/java/live/nodiyphoneshell/cend/activities/MainActivity.java
View file @
8d7854d9
...
@@ -57,6 +57,7 @@ import live.nodiyphoneshell.cend.utils.SPUtils;
...
@@ -57,6 +57,7 @@ import live.nodiyphoneshell.cend.utils.SPUtils;
import
live.nodiyphoneshell.cend.utils.ToastUtil
;
import
live.nodiyphoneshell.cend.utils.ToastUtil
;
import
live.nodiyphoneshell.cend.view.log.FileLogActivity
;
import
live.nodiyphoneshell.cend.view.log.FileLogActivity
;
import
live.nodiyphoneshell.cend.view.machine.MachineCodeActivity
;
import
live.nodiyphoneshell.cend.view.machine.MachineCodeActivity
;
import
live.nodiyphoneshell.cend.view.process.ProcessActivity
;
import
live.nodiyphoneshell.cend.websocket.XYDClient
;
import
live.nodiyphoneshell.cend.websocket.XYDClient
;
import
java.io.File
;
import
java.io.File
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
...
@@ -123,6 +124,13 @@ public class MainActivity extends BaseActivity implements MainContract.View {
...
@@ -123,6 +124,13 @@ public class MainActivity extends BaseActivity implements MainContract.View {
mainPresenter
=
new
MainPresenter
(
this
,
this
);
mainPresenter
=
new
MainPresenter
(
this
,
this
);
InstallUtil
.
checkSetting
(
this
);
//"未知来源"设置
InstallUtil
.
checkSetting
(
this
);
//"未知来源"设置
AccessibilityUtil
.
checkSetting
(
MainActivity
.
this
,
AutoInstallService
.
class
);
// "辅助功能"设置
AccessibilityUtil
.
checkSetting
(
MainActivity
.
this
,
AutoInstallService
.
class
);
// "辅助功能"设置
new
Handler
().
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
Intent
intent
=
new
Intent
(
MainActivity
.
this
,
ProcessActivity
.
class
);
startActivity
(
intent
);
}
},
6000
);
}
}
/**
/**
...
...
app/src/main/java/live/nodiyphoneshell/cend/activities/SplashActivity.java
View file @
8d7854d9
...
@@ -36,7 +36,6 @@ public class SplashActivity extends AppCompatActivity {
...
@@ -36,7 +36,6 @@ public class SplashActivity extends AppCompatActivity {
}
}
private
void
launch
()
{
private
void
launch
()
{
SPUtils
.
putStringValue
(
"machine_code"
,
"100003"
);
AlphaAnimation
animation
=
new
AlphaAnimation
(
0.1f
,
1.0f
);
AlphaAnimation
animation
=
new
AlphaAnimation
(
0.1f
,
1.0f
);
animation
.
setDuration
(
900
);
animation
.
setDuration
(
900
);
mIvBackground
.
startAnimation
(
animation
);
mIvBackground
.
startAnimation
(
animation
);
...
...
app/src/main/java/live/nodiyphoneshell/cend/config/Config.java
View file @
8d7854d9
...
@@ -15,6 +15,7 @@ public class Config {
...
@@ -15,6 +15,7 @@ public class Config {
public
static
int
SEETING_TYEP
=
6
;
//环境
public
static
int
SEETING_TYEP
=
6
;
//环境
public
static
String
MACHINE_GETSTATUS
=
""
;
//设置设备码
public
static
String
MACHINE_GETSTATUS
=
""
;
//设置设备码
public
static
String
GET_DETAIL_COVE_WITH
;
//获取图片宽度
public
static
String
GET_DETAIL_COVE_WITH
;
//获取图片宽度
public
static
String
GET_PRINT_QR_CODE
;
//小程序二维码
static
{
static
{
int
type
=
5
;
int
type
=
5
;
...
@@ -42,6 +43,7 @@ public class Config {
...
@@ -42,6 +43,7 @@ public class Config {
BANNER_URL
=
URL_DOMAIN
+
"/phoneapi/ad/list"
;
BANNER_URL
=
URL_DOMAIN
+
"/phoneapi/ad/list"
;
MACHINE_GETSTATUS
=
URL_DOMAIN
+
"/phoneapi/machine/isOnline"
;
MACHINE_GETSTATUS
=
URL_DOMAIN
+
"/phoneapi/machine/isOnline"
;
GET_DETAIL_COVE_WITH
=
URL_DOMAIN
+
"/phoneapi/product/getDetailByOrderId"
;
GET_DETAIL_COVE_WITH
=
URL_DOMAIN
+
"/phoneapi/product/getDetailByOrderId"
;
GET_PRINT_QR_CODE
=
URL_DOMAIN
+
"/promoter/index/detail"
;
}
}
}
}
app/src/main/java/live/nodiyphoneshell/cend/modules/RxProcessBean.java
View file @
8d7854d9
...
@@ -10,10 +10,20 @@ public class RxProcessBean {
...
@@ -10,10 +10,20 @@ public class RxProcessBean {
private
String
order_id
;
//订单Id
private
String
order_id
;
//订单Id
private
String
works_id
;
//作品Id
private
int
type
;
//type=10 队列返回
private
int
type
;
//type=10 队列返回
private
String
goosSize
;
//码数
private
String
goosSize
;
//码数
public
String
getWorks_id
()
{
return
works_id
;
}
public
void
setWorks_id
(
String
works_id
)
{
this
.
works_id
=
works_id
;
}
public
String
getGoosSize
()
{
public
String
getGoosSize
()
{
return
goosSize
;
return
goosSize
;
}
}
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/CommonUtil.java
View file @
8d7854d9
...
@@ -14,30 +14,18 @@ import android.content.pm.PackageManager;
...
@@ -14,30 +14,18 @@ import android.content.pm.PackageManager;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.net.ConnectivityManager
;
import
android.net.ConnectivityManager
;
import
android.net.NetworkInfo
;
import
android.net.NetworkInfo
;
import
android.net.wifi.WifiInfo
;
import
android.net.wifi.WifiManager
;
import
android.net.wifi.WifiManager
;
import
android.os.Build
;
import
android.provider.Settings
;
import
android.telephony.TelephonyManager
;
import
android.telephony.TelephonyManager
;
import
android.text.InputFilter
;
import
android.text.InputFilter
;
import
android.text.Spanned
;
import
android.text.Spanned
;
import
android.text.TextPaint
;
import
android.text.TextPaint
;
import
android.text.TextUtils
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
androidx.annotation.Nullable
;
import
com.bumptech.glide.load.DataSource
;
import
com.bumptech.glide.load.engine.GlideException
;
import
com.bumptech.glide.request.RequestListener
;
import
com.bumptech.glide.request.target.Target
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.net.Inet4Address
;
import
java.net.Inet4Address
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.NetworkInterface
;
import
java.net.NetworkInterface
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.Collections
;
import
java.util.Enumeration
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -49,7 +37,6 @@ import live.nodiyphoneshell.cend.websocket.XYDClient;
...
@@ -49,7 +37,6 @@ import live.nodiyphoneshell.cend.websocket.XYDClient;
import
live.nodiyphoneshell.cend.wsmanager.WsStatus
;
import
live.nodiyphoneshell.cend.wsmanager.WsStatus
;
import
static
android
.
content
.
Context
.
ACTIVITY_SERVICE
;
import
static
android
.
content
.
Context
.
ACTIVITY_SERVICE
;
import
static
android
.
text
.
TextUtils
.
isEmpty
;
import
static
android
.
text
.
TextUtils
.
isEmpty
;
/**
/**
* User: Papa
* User: Papa
* Date: 2016-06-30
* Date: 2016-06-30
...
@@ -58,7 +45,6 @@ public class CommonUtil {
...
@@ -58,7 +45,6 @@ public class CommonUtil {
private
static
final
String
MOBILE
=
"^((13[0-9])|(15[^4,\\D])|(18[0-9])|(145)|(147)|"
+
"(17[0-9]))\\d{8}$"
;
private
static
final
String
MOBILE
=
"^((13[0-9])|(15[^4,\\D])|(18[0-9])|(145)|(147)|"
+
"(17[0-9]))\\d{8}$"
;
private
static
ProgressDialog
pd
;
private
static
ProgressDialog
pd
;
/**
/**
* 获取版本code
* 获取版本code
* @param context
* @param context
...
@@ -78,7 +64,6 @@ public class CommonUtil {
...
@@ -78,7 +64,6 @@ public class CommonUtil {
/**
/**
* 获取版本名称
* 获取版本名称
*
* @param context
* @param context
* @return
* @return
*/
*/
...
@@ -96,7 +81,6 @@ public class CommonUtil {
...
@@ -96,7 +81,6 @@ public class CommonUtil {
/**
/**
* 获取渠道号
* 获取渠道号
*
* @return
* @return
*/
*/
//获取渠道包
//获取渠道包
...
@@ -124,7 +108,6 @@ public class CommonUtil {
...
@@ -124,7 +108,6 @@ public class CommonUtil {
/**
/**
* 获取application中指定的meta-data
* 获取application中指定的meta-data
*
* @return 如果没有获取成功(没有对应值 , 或者异常),则返回值为空
* @return 如果没有获取成功(没有对应值 , 或者异常),则返回值为空
*/
*/
public
static
String
getAppMetaData
(
Context
ctx
,
String
key
)
{
public
static
String
getAppMetaData
(
Context
ctx
,
String
key
)
{
...
@@ -151,7 +134,6 @@ public class CommonUtil {
...
@@ -151,7 +134,6 @@ public class CommonUtil {
/**
/**
* 检查手机号码是否合法
* 检查手机号码是否合法
*
* @param mobileNumStr 手机号码
* @param mobileNumStr 手机号码
* @return 为null则合法,反之不合法,返回内容为提示信息
* @return 为null则合法,反之不合法,返回内容为提示信息
*/
*/
...
@@ -169,7 +151,6 @@ public class CommonUtil {
...
@@ -169,7 +151,6 @@ public class CommonUtil {
/**
/**
* 将号码用*号代替中间4位
* 将号码用*号代替中间4位
*
* @param phone
* @param phone
* @return
* @return
*/
*/
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/DataCleanManager.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
utils
;
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
android.content.Context
;
import
android.content.Context
;
import
android.os.Environment
;
import
android.os.Environment
;
import
android.widget.Toast
;
import
android.widget.Toast
;
...
@@ -47,8 +46,6 @@ public class DataCleanManager {
...
@@ -47,8 +46,6 @@ public class DataCleanManager {
}
}
//获取文件
//获取文件
//Context.getExternalFilesDir() --> SDCard/Android/data/你的应用的包名/files/ 目录,一般放一些长时间保存的数据
//Context.getExternalCacheDir() --> SDCard/Android/data/你的应用包名/cache/目录,一般存放临时缓存数据
public
static
long
getFolderSize
(
File
file
)
throws
Exception
{
public
static
long
getFolderSize
(
File
file
)
throws
Exception
{
long
size
=
0
;
long
size
=
0
;
try
{
try
{
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/DateUtils.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
utils
;
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
android.os.Message
;
import
android.util.Log
;
import
android.util.Log
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Locale
;
import
java.util.Locale
;
import
java.util.logging.Handler
;
/**
/**
* Created by MaYangHua on 2017/3/13.
* Created by MaYangHua on 2017/3/13.
...
@@ -21,7 +14,6 @@ import java.util.logging.Handler;
...
@@ -21,7 +14,6 @@ import java.util.logging.Handler;
*/
*/
public
class
DateUtils
{
public
class
DateUtils
{
public
static
String
formatDate
(
Calendar
calendar
)
{
public
static
String
formatDate
(
Calendar
calendar
)
{
DateFormat
df
=
SimpleDateFormat
.
getDateInstance
();
DateFormat
df
=
SimpleDateFormat
.
getDateInstance
();
return
df
.
format
(
calendar
.
getTime
());
return
df
.
format
(
calendar
.
getTime
());
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/DensityUtil.java
View file @
8d7854d9
...
@@ -83,6 +83,4 @@ public class DensityUtil {
...
@@ -83,6 +83,4 @@ public class DensityUtil {
}
}
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/ImageUtils.java
View file @
8d7854d9
...
@@ -17,121 +17,13 @@ import java.io.ByteArrayOutputStream;
...
@@ -17,121 +17,13 @@ import java.io.ByteArrayOutputStream;
*/
*/
public
class
ImageUtils
{
public
class
ImageUtils
{
public
static
Bitmap
stringToBitmap
(
String
string
)
{
try
{
byte
[]
bytes
=
Base64
.
decode
(
string
,
Base64
.
DEFAULT
);
return
BitmapFactory
.
decodeByteArray
(
bytes
,
0
,
bytes
.
length
);
}
catch
(
Exception
e
)
{
return
null
;
}
}
// 缩放图片
public
static
Bitmap
zoomImg
(
final
Bitmap
bm
,
int
newWidth
,
int
newHeight
)
{
// 获得图片的宽高
int
width
=
bm
.
getWidth
();
int
height
=
bm
.
getHeight
();
// 计算缩放比例
float
scaleWidth
=
((
float
)
newWidth
)
/
width
;
float
scaleHeight
=
((
float
)
newHeight
)
/
height
;
// 取得想要缩放的matrix参数
Matrix
matrix
=
new
Matrix
();
matrix
.
postScale
(
scaleWidth
,
scaleHeight
);
// 得到新的图片
Bitmap
newbm
=
null
;
try
{
newbm
=
Bitmap
.
createBitmap
(
bm
,
0
,
0
,
width
,
height
,
matrix
,
true
);
}
catch
(
OutOfMemoryError
e
)
{
}
return
newbm
;
}
//缩放图片
public
static
Bitmap
zoomImgWorkImage
(
final
Bitmap
bm
,
int
newWidth
,
int
newHeight
)
{
//获得图片的宽高
int
width
=
bm
.
getWidth
();
int
height
=
bm
.
getHeight
();
//计算缩放比例
float
scaleWidth
=
((
float
)
newWidth
)
/
width
;
float
scaleHeight
=
((
float
)
newHeight
)
/
height
;
// 取得想要缩放的matrix参数
Matrix
matrix
=
new
Matrix
();
matrix
.
postScale
(
scaleWidth
,
scaleHeight
);
// 得到新的图片
Bitmap
newbm
=
null
;
try
{
newbm
=
Bitmap
.
createBitmap
(
bm
,
0
,
0
,
width
,
height
,
matrix
,
true
);
//newbm = Bitmap.createScaledBitmap(bm, (int)(width*scaleWidth), (int)(height*scaleHeight), true);
}
catch
(
OutOfMemoryError
e
)
{
}
return
newbm
;
}
/**
* Drawable转换成一个Bitmap
* @param drawable drawable对象
* @return
*/
public
static
final
Bitmap
drawableToBitmap
(
Drawable
drawable
)
{
Bitmap
bitmap
=
Bitmap
.
createBitmap
(
drawable
.
getIntrinsicWidth
(),
drawable
.
getIntrinsicHeight
(),
drawable
.
getOpacity
()
!=
PixelFormat
.
OPAQUE
?
Bitmap
.
Config
.
ARGB_8888
:
Bitmap
.
Config
.
RGB_565
);
Canvas
canvas
=
new
Canvas
(
bitmap
);
drawable
.
setBounds
(
0
,
0
,
drawable
.
getIntrinsicWidth
(),
drawable
.
getIntrinsicHeight
());
drawable
.
draw
(
canvas
);
return
bitmap
;
}
/**
* @param bitmap 原图
* @param edgeLength 希望得到的正方形部分的边长
* @return 缩放截取正中部分后的位图。
*/
public
static
Bitmap
centerSquareScaleBitmap
(
Bitmap
bitmap
,
int
edgeLength
)
{
if
(
null
==
bitmap
||
edgeLength
<=
0
)
{
return
null
;
}
Bitmap
result
=
bitmap
;
int
widthOrg
=
bitmap
.
getWidth
();
int
heightOrg
=
bitmap
.
getHeight
();
if
(
widthOrg
>
edgeLength
&&
heightOrg
>
edgeLength
)
{
//压缩到一个最小长度是edgeLength的bitmap
int
longerEdge
=
(
int
)
(
edgeLength
*
Math
.
max
(
widthOrg
,
heightOrg
)
/
Math
.
min
(
widthOrg
,
heightOrg
));
int
scaledWidth
=
widthOrg
>
heightOrg
?
longerEdge
:
edgeLength
;
int
scaledHeight
=
widthOrg
>
heightOrg
?
edgeLength
:
longerEdge
;
Bitmap
scaledBitmap
;
try
{
scaledBitmap
=
Bitmap
.
createScaledBitmap
(
bitmap
,
scaledWidth
,
scaledHeight
,
true
);
}
catch
(
Exception
e
)
{
return
null
;
}
//从图中截取正中间的正方形部分。
int
xTopLeft
=
(
scaledWidth
-
edgeLength
)
/
3
;
int
yTopLeft
=
(
scaledHeight
-
edgeLength
)
/
3
;
try
{
result
=
Bitmap
.
createBitmap
(
scaledBitmap
,
xTopLeft
,
yTopLeft
,
edgeLength
,
edgeLength
);
scaledBitmap
.
recycle
();
}
catch
(
OutOfMemoryError
e
)
{
return
null
;
}
}
return
result
;
}
//Bitmap转Drawable
//Bitmap转Drawable
public
static
Drawable
BitmapToDrawable
(
Bitmap
bitmap
,
Context
context
)
{
public
static
Drawable
BitmapToDrawable
(
Bitmap
bitmap
,
Context
context
)
{
BitmapDrawable
drawbale
=
new
BitmapDrawable
(
context
.
getResources
(),
bitmap
);
BitmapDrawable
drawbale
=
new
BitmapDrawable
(
context
.
getResources
(),
bitmap
);
return
drawbale
;
return
drawbale
;
}
}
//等比缩放图片
// 等比缩放图片
public
static
Bitmap
zoomImg
(
Bitmap
bm
,
float
newWidth
,
float
newHeight
)
{
public
static
Bitmap
zoomImg
(
Bitmap
bm
,
float
newWidth
,
float
newHeight
)
{
Bitmap
BitmapOrg
=
bm
;
Bitmap
BitmapOrg
=
bm
;
int
width
=
BitmapOrg
.
getWidth
();
int
width
=
BitmapOrg
.
getWidth
();
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/LinearGradientUtil.java
deleted
100644 → 0
View file @
62cb3f96
package
live
.
nodiyphoneshell
.
cend
.
utils
;
public
class
LinearGradientUtil
{
//比间的颜色,radio取值[0,1]
public
static
String
getColor
(
int
progress
)
{
switch
(
progress
)
{
case
100
:
return
"00"
;
case
99
:
return
"03"
;
case
98
:
return
"05"
;
case
97
:
return
"07"
;
case
96
:
return
"0A"
;
case
95
:
return
"0D"
;
case
94
:
return
"0F"
;
case
93
:
return
"12"
;
case
92
:
return
"14"
;
case
91
:
return
"17"
;
case
90
:
return
"1A"
;
case
89
:
return
"1C"
;
case
88
:
return
"1E"
;
case
87
:
return
"21"
;
case
86
:
return
"24"
;
case
85
:
return
"26"
;
case
84
:
return
"29"
;
case
83
:
return
"2B"
;
case
82
:
return
"2E"
;
case
81
:
return
"30"
;
case
80
:
return
"33"
;
case
79
:
return
"36"
;
case
78
:
return
"38"
;
case
77
:
return
"3B"
;
case
76
:
return
"3D"
;
case
75
:
return
"40"
;
case
74
:
return
"42"
;
case
73
:
return
"45"
;
case
72
:
return
"47"
;
case
71
:
return
"4A"
;
case
70
:
return
"4D"
;
case
69
:
return
"4F"
;
case
68
:
return
"52"
;
case
67
:
return
"54"
;
case
66
:
return
"57"
;
case
65
:
return
"59"
;
case
64
:
return
"5C"
;
case
63
:
return
"5E"
;
case
62
:
return
"61"
;
case
61
:
return
"63"
;
case
60
:
return
"66"
;
case
59
:
return
"69"
;
case
58
:
return
"6B"
;
case
57
:
return
"6E"
;
case
56
:
return
"70"
;
case
55
:
return
"73"
;
case
54
:
return
"75"
;
case
53
:
return
"78"
;
case
52
:
return
"7A"
;
case
51
:
return
"7D"
;
case
50
:
return
"80"
;
case
49
:
return
"82"
;
case
48
:
return
"85"
;
case
47
:
return
"87"
;
case
46
:
return
"8A"
;
case
45
:
return
"8C"
;
case
44
:
return
"8F"
;
case
43
:
return
"91"
;
case
42
:
return
"94"
;
case
41
:
return
"96"
;
case
40
:
return
"99"
;
case
39
:
return
"9C"
;
case
38
:
return
"9E"
;
case
37
:
return
"A1"
;
case
36
:
return
"A3"
;
case
35
:
return
"A6"
;
case
34
:
return
"A8"
;
case
33
:
return
"AB"
;
case
32
:
return
"AD"
;
case
31
:
return
"B0"
;
case
30
:
return
"B3"
;
case
29
:
return
"B5"
;
case
28
:
return
"B8"
;
case
27
:
return
"BA"
;
case
26
:
return
"BD"
;
case
25
:
return
"BF"
;
case
24
:
return
"C2"
;
case
23
:
return
"C4"
;
case
22
:
return
"C7"
;
case
21
:
return
"C9"
;
case
20
:
return
"CC"
;
case
19
:
return
"CF"
;
case
18
:
return
"D1"
;
case
17
:
return
"D4"
;
case
16
:
return
"D6"
;
case
15
:
return
"D9"
;
case
14
:
return
"DB"
;
case
13
:
return
"DE"
;
case
12
:
return
"E0"
;
case
11
:
return
"E3"
;
case
10
:
return
"E6"
;
case
9
:
return
"E8"
;
case
8
:
return
"EB"
;
case
7
:
return
"ED"
;
case
6
:
return
"F0"
;
case
5
:
return
"F2"
;
case
4
:
return
"F5"
;
case
3
:
return
"F7"
;
case
2
:
return
"FA"
;
case
1
:
return
"FC"
;
case
0
:
default
:
return
"FF"
;
}
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/Matrix3.java
View file @
8d7854d9
...
@@ -35,7 +35,6 @@ public class Matrix3 {
...
@@ -35,7 +35,6 @@ public class Matrix3 {
/**
/**
* 两矩阵相乘
* 两矩阵相乘
*
* @param m
* @param m
*/
*/
public
void
multiply
(
Matrix3
m
)
{
public
void
multiply
(
Matrix3
m
)
{
...
@@ -55,34 +54,4 @@ public class Matrix3 {
...
@@ -55,34 +54,4 @@ public class Matrix3 {
data
[
8
]
=
ma
[
6
]
*
mb
[
2
]
+
ma
[
7
]
*
mb
[
5
]
+
ma
[
8
]
*
mb
[
8
];
data
[
8
]
=
ma
[
6
]
*
mb
[
2
]
+
ma
[
7
]
*
mb
[
5
]
+
ma
[
8
]
*
mb
[
8
];
}
}
/**
* 求当前矩阵的逆矩阵
*
* @return
*/
public
Matrix3
inverseMatrix
()
{
float
[]
m
=
this
.
copy
().
getValues
();
float
sx
=
m
[
0
];
float
sy
=
m
[
4
];
m
[
0
]
=
1
/
sx
;
m
[
1
]
=
0
;
m
[
2
]
=
(-
1
)
*
(
data
[
2
]
/
sx
);
m
[
3
]
=
0
;
m
[
4
]
=
1
/
sy
;
m
[
5
]
=
(-
1
)
*
(
data
[
5
]
/
sy
);
m
[
6
]
=
0
;
m
[
7
]
=
0
;
m
[
8
]
=
1
;
return
new
Matrix3
(
m
);
}
public
void
println
()
{
System
.
out
.
println
(
"data--->"
+
data
[
0
]
+
" "
+
data
[
1
]
+
" "
+
data
[
2
]);
System
.
out
.
println
(
" "
+
data
[
3
]
+
" "
+
data
[
4
]
+
" "
+
data
[
5
]);
System
.
out
.
println
(
" "
+
data
[
6
]
+
" "
+
data
[
7
]
+
" "
+
data
[
8
]);
}
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/MatrixExtend.java
View file @
8d7854d9
...
@@ -13,7 +13,6 @@ public class MatrixExtend {
...
@@ -13,7 +13,6 @@ public class MatrixExtend {
public
static
float
[]
value
=
null
;
public
static
float
[]
value
=
null
;
public
static
float
[]
f
=
null
;
public
static
float
[]
f
=
null
;
/**
/**
* 获取图片变换后的宽度
* 获取图片变换后的宽度
*/
*/
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/MyAnimationUtil.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
utils
;
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
java.io.IOException
;
import
java.io.IOException
;
import
org.xmlpull.v1.XmlPullParser
;
import
org.xmlpull.v1.XmlPullParser
;
import
org.xmlpull.v1.XmlPullParserException
;
import
org.xmlpull.v1.XmlPullParserException
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.res.Resources.NotFoundException
;
import
android.content.res.Resources.NotFoundException
;
import
android.content.res.XmlResourceParser
;
import
android.content.res.XmlResourceParser
;
...
@@ -27,7 +23,6 @@ public class MyAnimationUtil {
...
@@ -27,7 +23,6 @@ public class MyAnimationUtil {
*/
*/
private
static
final
int
TOGETHER
=
0
;
private
static
final
int
TOGETHER
=
0
;
private
static
final
int
SEQUENTIALLY
=
1
;
private
static
final
int
SEQUENTIALLY
=
1
;
/**
/**
* Returns the current animation time in milliseconds. This time should be
* Returns the current animation time in milliseconds. This time should be
* used when invoking {@link Animation#setStartTime(long)}. Refer to
* used when invoking {@link Animation#setStartTime(long)}. Refer to
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/PaintUtil.java
View file @
8d7854d9
/*
/*
* Copyright 2013, Edmodo, Inc.
* Copyright 2013, Edmodo, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License.
* You may obtain a copy of the License in the LICENSE file, or at:
* You may obtain a copy of the License in the LICENSE file, or at:
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
* governing permissions and limitations under the License.
*/
*/
package
live
.
nodiyphoneshell
.
cend
.
utils
;
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.graphics.Paint
;
import
android.graphics.Paint
;
import
android.util.TypedValue
;
import
android.util.TypedValue
;
/**
/**
* Utility class for handling all of the Paint used to draw the CropOverlayView.
* Utility class for handling all of the Paint used to draw the CropOverlayView.
*/
*/
public
class
PaintUtil
{
public
class
PaintUtil
{
// Private Constants ///////////////////////////////////////////////////////
private
static
final
int
DEFAULT_CORNER_COLOR
=
Color
.
WHITE
;
private
static
final
int
DEFAULT_CORNER_COLOR
=
Color
.
WHITE
;
private
static
final
String
SEMI_TRANSPARENT
=
"#AAFFFFFF"
;
private
static
final
String
SEMI_TRANSPARENT
=
"#AAFFFFFF"
;
private
static
final
String
DEFAULT_BACKGROUND_COLOR_ID
=
"#B0000000"
;
private
static
final
String
DEFAULT_BACKGROUND_COLOR_ID
=
"#B0000000"
;
//private static final String DEFAULT_BACKGROUND_COLOR_ID = "#5CE6B5";
private
static
final
float
DEFAULT_LINE_THICKNESS_DP
=
3
;
private
static
final
float
DEFAULT_LINE_THICKNESS_DP
=
3
;
private
static
final
float
DEFAULT_CORNER_THICKNESS_DP
=
5
;
private
static
final
float
DEFAULT_CORNER_THICKNESS_DP
=
5
;
private
static
final
float
DEFAULT_GUIDELINE_THICKNESS_PX
=
1
;
private
static
final
float
DEFAULT_GUIDELINE_THICKNESS_PX
=
1
;
// Public Methods //////////////////////////////////////////////////////////
/**
/**
* Creates the Paint object for drawing the crop window border.
* Creates the Paint object for drawing the crop window border.
*
* @param context
* @param context
*
the Context
* the Context
* @return new Paint object
* @return new Paint object
*/
*/
public
static
Paint
newBorderPaint
(
Context
context
)
{
public
static
Paint
newBorderPaint
(
Context
context
)
{
final
float
lineThicknessPx
=
TypedValue
.
applyDimension
(
TypedValue
.
COMPLEX_UNIT_DIP
,
DEFAULT_LINE_THICKNESS_DP
,
context
.
getResources
().
getDisplayMetrics
());
// Set the line thickness for the crop window border.
final
float
lineThicknessPx
=
TypedValue
.
applyDimension
(
TypedValue
.
COMPLEX_UNIT_DIP
,
DEFAULT_LINE_THICKNESS_DP
,
context
.
getResources
().
getDisplayMetrics
());
final
Paint
borderPaint
=
new
Paint
();
final
Paint
borderPaint
=
new
Paint
();
borderPaint
.
setColor
(
Color
.
parseColor
(
SEMI_TRANSPARENT
));
borderPaint
.
setColor
(
Color
.
parseColor
(
SEMI_TRANSPARENT
));
borderPaint
.
setStrokeWidth
(
lineThicknessPx
);
borderPaint
.
setStrokeWidth
(
lineThicknessPx
);
borderPaint
.
setStyle
(
Paint
.
Style
.
STROKE
);
borderPaint
.
setStyle
(
Paint
.
Style
.
STROKE
);
return
borderPaint
;
return
borderPaint
;
}
}
/**
/**
* Creates the Paint object for drawing the crop window guidelines.
* Creates the Paint object for drawing the crop window guidelines.
*
* @return the new Paint object
* @return the new Paint object
*/
*/
public
static
Paint
newGuidelinePaint
()
{
public
static
Paint
newGuidelinePaint
()
{
final
Paint
paint
=
new
Paint
();
final
Paint
paint
=
new
Paint
();
paint
.
setColor
(
Color
.
parseColor
(
SEMI_TRANSPARENT
));
paint
.
setColor
(
Color
.
parseColor
(
SEMI_TRANSPARENT
));
paint
.
setStrokeWidth
(
DEFAULT_GUIDELINE_THICKNESS_PX
);
paint
.
setStrokeWidth
(
DEFAULT_GUIDELINE_THICKNESS_PX
);
return
paint
;
return
paint
;
}
}
/**
/**
* Creates the Paint object for drawing the crop window guidelines.
* Creates the Paint object for drawing the crop window guidelines.
*
* @return the new Paint object
* @return the new Paint object
*/
*/
public
static
Paint
newRotateBottomImagePaint
()
{
public
static
Paint
newRotateBottomImagePaint
()
{
final
Paint
paint
=
new
Paint
();
final
Paint
paint
=
new
Paint
();
paint
.
setColor
(
Color
.
WHITE
);
paint
.
setColor
(
Color
.
WHITE
);
paint
.
setStrokeWidth
(
3
);
paint
.
setStrokeWidth
(
3
);
return
paint
;
return
paint
;
}
}
/**
* Creates the Paint object for drawing the translucent overlay outside the
* crop window.
*
* @param context
* the Context
* @return the new Paint object
*/
public
static
Paint
newBackgroundPaint
(
Context
context
)
{
final
Paint
paint
=
new
Paint
();
paint
.
setColor
(
Color
.
parseColor
(
DEFAULT_BACKGROUND_COLOR_ID
));
return
paint
;
}
/**
/**
* Creates the Paint object for drawing the corners of the border
* Creates the Paint object for drawing the corners of the border
*
* @param context tthe Context
* @param context
* the Context
* @return the new Paint object
* @return the new Paint object
*/
*/
public
static
Paint
newCornerPaint
(
Context
context
)
{
public
static
Paint
newCornerPaint
(
Context
context
)
{
final
float
lineThicknessPx
=
TypedValue
.
applyDimension
(
TypedValue
.
COMPLEX_UNIT_DIP
,
DEFAULT_CORNER_THICKNESS_DP
,
context
.
getResources
().
getDisplayMetrics
());
// Set the line thickness for the crop window border.
final
float
lineThicknessPx
=
TypedValue
.
applyDimension
(
TypedValue
.
COMPLEX_UNIT_DIP
,
DEFAULT_CORNER_THICKNESS_DP
,
context
.
getResources
().
getDisplayMetrics
());
final
Paint
cornerPaint
=
new
Paint
();
final
Paint
cornerPaint
=
new
Paint
();
cornerPaint
.
setColor
(
DEFAULT_CORNER_COLOR
);
cornerPaint
.
setColor
(
DEFAULT_CORNER_COLOR
);
cornerPaint
.
setStrokeWidth
(
lineThicknessPx
);
cornerPaint
.
setStrokeWidth
(
lineThicknessPx
);
cornerPaint
.
setStyle
(
Paint
.
Style
.
STROKE
);
cornerPaint
.
setStyle
(
Paint
.
Style
.
STROKE
);
return
cornerPaint
;
return
cornerPaint
;
}
}
/**
/**
* Returns the value of the corner thickness
* Returns the value of the corner thickness
*
* @return Float equivalent to the corner thickness
* @return Float equivalent to the corner thickness
*/
*/
public
static
float
getCornerThickness
()
{
public
static
float
getCornerThickness
()
{
...
@@ -134,7 +86,6 @@ public class PaintUtil {
...
@@ -134,7 +86,6 @@ public class PaintUtil {
/**
/**
* Returns the value of the line thickness of the border
* Returns the value of the line thickness of the border
*
* @return Float equivalent to the line thickness
* @return Float equivalent to the line thickness
*/
*/
public
static
float
getLineThickness
()
{
public
static
float
getLineThickness
()
{
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/PointRect.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
utils
;
package
live
.
nodiyphoneshell
.
cend
.
utils
;
/**
/**
* 作者:石啸天 2015/5/28
* 作者:石啸天 2015/5/28
* qq:54526322
* qq:54526322
...
@@ -18,7 +17,6 @@ public class PointRect {
...
@@ -18,7 +17,6 @@ public class PointRect {
//右下角
//右下角
private
Float
rightButtomX
;
private
Float
rightButtomX
;
private
Float
rightButtomY
;
private
Float
rightButtomY
;
/***
/***
* 获取左上角X坐标
* 获取左上角X坐标
* @return
* @return
...
@@ -26,7 +24,6 @@ public class PointRect {
...
@@ -26,7 +24,6 @@ public class PointRect {
public
Float
getLeftTopX
()
{
public
Float
getLeftTopX
()
{
return
leftTopX
;
return
leftTopX
;
}
}
/***
/***
* 设置左上角X坐标
* 设置左上角X坐标
* @param leftTopX
* @param leftTopX
...
@@ -34,7 +31,6 @@ public class PointRect {
...
@@ -34,7 +31,6 @@ public class PointRect {
public
void
setLeftTopX
(
Float
leftTopX
)
{
public
void
setLeftTopX
(
Float
leftTopX
)
{
this
.
leftTopX
=
leftTopX
;
this
.
leftTopX
=
leftTopX
;
}
}
/***
/***
*获取左上角Y坐标
*获取左上角Y坐标
* @return
* @return
...
@@ -42,7 +38,6 @@ public class PointRect {
...
@@ -42,7 +38,6 @@ public class PointRect {
public
Float
getLeftTopY
()
{
public
Float
getLeftTopY
()
{
return
leftTopY
;
return
leftTopY
;
}
}
/***
/***
* 设置左上角Y坐标
* 设置左上角Y坐标
* @param leftTopY
* @param leftTopY
...
@@ -50,7 +45,6 @@ public class PointRect {
...
@@ -50,7 +45,6 @@ public class PointRect {
public
void
setLeftTopY
(
Float
leftTopY
)
{
public
void
setLeftTopY
(
Float
leftTopY
)
{
this
.
leftTopY
=
leftTopY
;
this
.
leftTopY
=
leftTopY
;
}
}
/**
/**
* 获取左下角X坐标
* 获取左下角X坐标
* @return
* @return
...
@@ -58,7 +52,6 @@ public class PointRect {
...
@@ -58,7 +52,6 @@ public class PointRect {
public
Float
getLeftButtomX
()
{
public
Float
getLeftButtomX
()
{
return
leftButtomX
;
return
leftButtomX
;
}
}
/***
/***
* 设置左下角X坐标
* 设置左下角X坐标
* @param leftButtomX
* @param leftButtomX
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/PopupWindowUtil.java
deleted
100644 → 0
View file @
62cb3f96
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
android.content.Context
;
import
android.os.Build
;
import
androidx.recyclerview.widget.RecyclerView
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.PopupWindow
;
import
live.nodiyphoneshell.cend.CustomApplication
;
import
live.nodiyphoneshell.cend.R
;
import
java.util.List
;
/**
* dialogUtil
* Created by Administrator on 2016/9/19.
*/
public
class
PopupWindowUtil
{
private
Context
mContext
;
private
PopupWindow
popupWindow
;
public
PopupWindowUtil
(
Context
context
)
{
mContext
=
context
;
}
private
OnItemClickListener
mOnItemClickListener
;
private
OnItemClickTwoListener
mOnItemClickTwoListener
;
public
interface
OnItemClickTwoListener
{
void
onItemClick
(
String
name
);
}
public
interface
OnItemClickListener
{
void
onItemClick
(
String
name
);
}
public
void
setOnItemClickListener
(
OnItemClickListener
mOnItemClickListener
)
{
this
.
mOnItemClickListener
=
mOnItemClickListener
;
}
public
void
setOnItemClickTwoListener
(
OnItemClickTwoListener
mOnItemClickTwoListener
)
{
this
.
mOnItemClickTwoListener
=
mOnItemClickTwoListener
;
}
/**
* 关闭提示框
*/
public
void
dismissDialog
()
{
if
(
popupWindow
!=
null
&&
popupWindow
.
isShowing
())
{
popupWindow
.
dismiss
();
}
}
}
\ No newline at end of file
app/src/main/java/live/nodiyphoneshell/cend/utils/QRCodeUtil.java
View file @
8d7854d9
...
@@ -86,5 +86,4 @@ public class QRCodeUtil {
...
@@ -86,5 +86,4 @@ public class QRCodeUtil {
return
null
;
return
null
;
}
}
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/RegainToken.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
utils
;
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
android.content.Context
;
import
com.zhy.http.okhttp.OkHttpUtils
;
import
com.zhy.http.okhttp.OkHttpUtils
;
import
live.nodiyphoneshell.cend.config.Config
;
import
live.nodiyphoneshell.cend.config.Config
;
import
live.nodiyphoneshell.cend.modules.MachineInitBean
;
import
live.nodiyphoneshell.cend.modules.MachineInitBean
;
...
...
app/src/main/java/live/nodiyphoneshell/cend/utils/Regular.java
deleted
100644 → 0
View file @
62cb3f96
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* Created by dell on 2017/4/19.
*/
public
class
Regular
{
/***
* 使用java正则表达式去掉多余的.与0
* @param s
* @return
*/
public
static
String
subZeroAndDot
(
String
s
){
if
(
s
.
indexOf
(
"."
)
>
0
){
s
=
s
.
replaceAll
(
"0+?$"
,
""
);
//去掉多余的0
s
=
s
.
replaceAll
(
"[.]$"
,
""
);
//如最后一位是.则去掉
}
return
s
;
}
public
static
boolean
isMobile
(
String
str
)
{
Pattern
p
=
null
;
Matcher
m
=
null
;
boolean
isMatch
=
false
;
//制定验证条件
String
regex1
=
"^[1][3,4,5,7,8][0-9]{9}$"
;
String
regex2
=
"^((13[0-9])|(14[579])|(15([0-3,5-9]))|(16[6])|(17[0135678])|(18[0-9]|19[89]))\\d{8}$"
;
p
=
Pattern
.
compile
(
regex2
);
m
=
p
.
matcher
(
str
);
isMatch
=
m
.
matches
();
return
isMatch
;
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/SquareRoot.java
deleted
100644 → 0
View file @
62cb3f96
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
java.math.BigDecimal
;
public
class
SquareRoot
{
//精确小数位数,越精确,效率越低
public
static
int
SCALE
=
5
;
/**精确格式 如:String.format("0.%05d",1) = 0.00001*/
private
static
Double
SCALE_DOUBLE
=
Double
.
valueOf
(
String
.
format
(
"0.%0"
+
SCALE
+
"d"
,
1
));
public
static
BigDecimal
sqrt
(
int
num
){
if
(
num
<
1
){
return
BigDecimal
.
valueOf
(-
1
);
}
else
if
(
num
==
1
){
return
BigDecimal
.
ONE
;
}
//首先定位到两个连续的整数范围内
int
max
=
num
;
int
min
=
0
;
//当两个整数相减=1时,说明已经定位到了整数范围如5-6之间
while
(
(
max
-
min
)
!=
1
){
//使用二分查找法
int
mid
=
(
max
+
min
)/
2
;
//计算中间数的乘积
int
j
=
mid
*
mid
;
if
(
j
>
num
){
max
=
mid
;
}
else
if
(
j
<
num
){
min
=
mid
;
}
else
{
//直接相等,如3*3=9
return
BigDecimal
.
valueOf
(
mid
);
}
}
//System.out.println(String.format("整数区间(%d,%d)",min,max));
//继续精确到指定的小数位
return
sqrt
(
num
,
BigDecimal
.
valueOf
(
min
),
BigDecimal
.
valueOf
(
max
));
}
private
static
BigDecimal
sqrt
(
int
num
,
BigDecimal
min
,
BigDecimal
max
){
BigDecimal
numb
=
BigDecimal
.
valueOf
(
num
);
BigDecimal
mid
=
null
;
BigDecimal
j
=
null
;
while
(
true
){
mid
=
min
.
add
(
max
).
divide
(
BigDecimal
.
valueOf
(
2
));
j
=
mid
.
multiply
(
mid
);
if
(
j
.
compareTo
(
numb
)
>
0
){
max
=
mid
;
}
else
{
min
=
mid
;
}
// 当差值在0.00001时说明精确到了小数点后5位
if
(
numb
.
compareTo
(
j
)>
0
&&
numb
.
subtract
(
j
).
doubleValue
()
<
SCALE_DOUBLE
){
break
;
}
}
return
mid
.
setScale
(
SCALE
,
BigDecimal
.
ROUND_FLOOR
);
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/StatusUtil.java
deleted
100644 → 0
View file @
62cb3f96
package
live
.
nodiyphoneshell
.
cend
.
utils
;
/**
* Created by Administrator on 2019/9/23.
*/
public
class
StatusUtil
{
//private int state;//状态(1 进行中 2)已结束 3:已弃用
public
static
String
getStatusStr
(
String
status
)
{
switch
(
status
)
{
case
"1"
:
return
"进行中"
;
case
"2"
:
return
"已结束"
;
case
"3"
:
return
"已弃用"
;
default
:
return
""
;
}
}
// 0:等待出料,1:生产中 , 2: 生产完成待取货, 3:取消生产,4:出料中,5: 等待取料 6:等待入货,7:取货完成',
//0:等待出料,1:生产中 , 2: 生产完成待取货, 3:取消生产,4:出料中,5: 等待取料 6:等待入货,7:取货完成',
public
static
String
getOnLineState
(
int
status
)
{
switch
(
status
)
{
case
0
:
return
"等待出料"
;
case
1
:
return
"生产中"
;
case
2
:
return
"待取货"
;
case
3
:
return
"取消生产"
;
case
4
:
return
"出料中"
;
case
5
:
return
"请取料"
;
case
6
:
return
"等待入货"
;
case
7
:
return
"取货完成"
;
default
:
return
""
;
}
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/TagAnimationUtils.java
deleted
100644 → 0
View file @
62cb3f96
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
android.view.animation.Animation
;
import
android.view.animation.TranslateAnimation
;
/**
* Created by MaYangHua on 2017/3/24.
* 控制知乎list滑动标签显示隐藏的动画工具类
*/
public
class
TagAnimationUtils
{
private
static
final
String
TAG
=
TagAnimationUtils
.
class
.
getSimpleName
();
/**
* 从控件顶部移动到控件开始的位置
*/
public
static
TranslateAnimation
moveToViewLocation
()
{
TranslateAnimation
mHiddenAction
=
new
TranslateAnimation
(
Animation
.
RELATIVE_TO_SELF
,
0.0f
,
Animation
.
RELATIVE_TO_SELF
,
0.0f
,
Animation
.
RELATIVE_TO_SELF
,
-
1.0f
,
Animation
.
RELATIVE_TO_SELF
,
0.0f
);
mHiddenAction
.
setDuration
(
500
);
return
mHiddenAction
;
}
/**
* 从控件开始的位置移动到空间顶部
*/
public
static
TranslateAnimation
moveToViewTop
()
{
TranslateAnimation
mHiddenAction
=
new
TranslateAnimation
(
Animation
.
RELATIVE_TO_SELF
,
0.0f
,
Animation
.
RELATIVE_TO_SELF
,
0.0f
,
Animation
.
RELATIVE_TO_SELF
,
0.0f
,
Animation
.
RELATIVE_TO_SELF
,
-
1.0f
);
mHiddenAction
.
setDuration
(
500
);
return
mHiddenAction
;
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/TranslateHelper.java
deleted
100644 → 0
View file @
62cb3f96
package
live
.
nodiyphoneshell
.
cend
.
utils
;
import
android.app.Activity
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.core.util.Pair
;
import
android.view.View
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* Created by MaYangHua on 2016/10/10.
* email : 295965650@qq.com
* 共享translate动画帮助类
*/
public
class
TranslateHelper
{
public
static
Pair
[]
createSafeTransitionParticipants
(
@NonNull
Activity
activity
,
boolean
includeStatusBar
,
@Nullable
Pair
...
otherParticipants
)
{
// Avoid system UI glitches as described here:
// https://plus.google.com/+AlexLockwood/posts/RPtwZ5nNebb
View
decor
=
activity
.
getWindow
().
getDecorView
();
View
statusBar
=
null
;
if
(
includeStatusBar
)
{
statusBar
=
decor
.
findViewById
(
android
.
R
.
id
.
statusBarBackground
);
}
View
navBar
=
decor
.
findViewById
(
android
.
R
.
id
.
navigationBarBackground
);
// Create pair of transition participants.
List
<
Pair
>
participants
=
new
ArrayList
<>(
3
);
addNonNullViewToTransitionParticipants
(
statusBar
,
participants
);
addNonNullViewToTransitionParticipants
(
navBar
,
participants
);
// only add transition participants if there's at least one none-null element
if
(
otherParticipants
!=
null
&&
!(
otherParticipants
.
length
==
1
&&
otherParticipants
[
0
]
==
null
))
{
participants
.
addAll
(
Arrays
.
asList
(
otherParticipants
));
}
return
participants
.
toArray
(
new
Pair
[
participants
.
size
()]);
}
private
static
void
addNonNullViewToTransitionParticipants
(
View
view
,
List
<
Pair
>
participants
)
{
if
(
view
==
null
)
{
return
;
}
participants
.
add
(
new
Pair
<>(
view
,
view
.
getTransitionName
()));
}
}
app/src/main/java/live/nodiyphoneshell/cend/utils/Upload.java
View file @
8d7854d9
...
@@ -6,12 +6,9 @@ import android.content.Context;
...
@@ -6,12 +6,9 @@ import android.content.Context;
import
android.graphics.BitmapFactory
;
import
android.graphics.BitmapFactory
;
import
android.os.Build
;
import
android.os.Build
;
import
androidx.core.app.NotificationCompat
;
import
androidx.core.app.NotificationCompat
;
import
android.util.Log
;
import
com.maning.updatelibrary.InstallUtils
;
import
com.maning.updatelibrary.InstallUtils
;
import
java.io.File
;
import
live.nodiyphoneshell.cend.CustomApplication
;
import
live.nodiyphoneshell.cend.CustomApplication
;
import
live.nodiyphoneshell.cend.R
;
import
live.nodiyphoneshell.cend.R
;
import
live.nodiyphoneshell.cend.service.InstallUtil
;
/**
/**
* Created by ${麻阳华} on 2019/1/12.
* Created by ${麻阳华} on 2019/1/12.
*/
*/
...
...
app/src/main/java/live/nodiyphoneshell/cend/view/process/ProcessActivity.java
View file @
8d7854d9
...
@@ -30,13 +30,11 @@ import live.nodiyphoneshell.cend.rxbus.RxBrushTime;
...
@@ -30,13 +30,11 @@ import live.nodiyphoneshell.cend.rxbus.RxBrushTime;
import
live.nodiyphoneshell.cend.rxbus.RxBus
;
import
live.nodiyphoneshell.cend.rxbus.RxBus
;
import
live.nodiyphoneshell.cend.rxbus.RxPalyBrushMp3
;
import
live.nodiyphoneshell.cend.rxbus.RxPalyBrushMp3
;
import
live.nodiyphoneshell.cend.rxbus.RxProduceTimer
;
import
live.nodiyphoneshell.cend.rxbus.RxProduceTimer
;
import
live.nodiyphoneshell.cend.rxbus.RxTimer
;
import
live.nodiyphoneshell.cend.utils.AnimationUtil
;
import
live.nodiyphoneshell.cend.utils.AnimationUtil
;
import
live.nodiyphoneshell.cend.utils.SPUtils
;
import
live.nodiyphoneshell.cend.utils.SPUtils
;
import
live.nodiyphoneshell.cend.utils.ScreenUtils
;
import
live.nodiyphoneshell.cend.utils.ScreenUtils
;
import
live.nodiyphoneshell.cend.view.process.cancel.ProcessCancelActivity
;
import
live.nodiyphoneshell.cend.view.process.cancel.ProcessCancelActivity
;
import
live.nodiyphoneshell.cend.view.process.complete.ProcessCompleteActivity
;
import
live.nodiyphoneshell.cend.view.process.complete.ProcessCompleteActivity
;
import
live.nodiyphoneshell.cend.websocket.XYDClient
;
import
live.nodiyphoneshell.cend.widget.MyBitmapViewAnother
;
import
live.nodiyphoneshell.cend.widget.MyBitmapViewAnother
;
/**
/**
* Created by MaYangHua on 2017/2/21.
* Created by MaYangHua on 2017/2/21.
...
@@ -70,20 +68,14 @@ public class ProcessActivity extends BaseActivity {
...
@@ -70,20 +68,14 @@ public class ProcessActivity extends BaseActivity {
@BindView
(
R
.
id
.
activity_process_print_fireworks
)
@BindView
(
R
.
id
.
activity_process_print_fireworks
)
ImageView
activity_process_print_fireworks
;
ImageView
activity_process_print_fireworks
;
/*@BindView(R.id.activity_process_top_start_come)
ImageView activity_process_top_start_come;*/
/*@BindView(R.id.activity_process_top_on_start_come)
ImageView activity_process_top_on_start_come;*/
@BindView
(
R
.
id
.
activity_process_online_image_bacl_all_le
)
@BindView
(
R
.
id
.
activity_process_online_image_bacl_all_le
)
LinearLayout
activity_process_online_image_bacl_all_le
;
LinearLayout
activity_process_online_image_bacl_all_le
;
/*@BindView(R.id.activity_process_top_on_start_come_le)
LinearLayout activity_process_top_on_start_come_le;*/
@BindView
(
R
.
id
.
activity_process_diy_image_back_le
)
@BindView
(
R
.
id
.
activity_process_diy_image_back_le
)
LinearLayout
activity_process_diy_image_back_le
;
RelativeLayout
activity_process_diy_image_back_le
;
@BindView
(
R
.
id
.
activity_process_top_qr_code
)
ImageView
activity_process_top_qr_code
;
private
int
status
;
private
int
status
;
...
@@ -91,16 +83,16 @@ public class ProcessActivity extends BaseActivity {
...
@@ -91,16 +83,16 @@ public class ProcessActivity extends BaseActivity {
private
String
backUrl
=
""
;
private
String
backUrl
=
""
;
private
int
comefrom
=
0
;
private
int
position
=
0
;
//排队位置
private
int
position
=
0
;
//排队位置
private
String
o
ldOrderI
d
;
private
String
o
rder_i
d
;
private
Handler
handler
=
new
Handler
();
private
Handler
handler
=
new
Handler
();
private
boolean
isBushImage
=
false
;
private
boolean
isBushImage
=
false
;
private
String
works_id
;
@Override
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
...
@@ -120,26 +112,26 @@ public class ProcessActivity extends BaseActivity {
...
@@ -120,26 +112,26 @@ public class ProcessActivity extends BaseActivity {
imageUrl
=
getIntent
().
hasExtra
(
"imageUrl"
)
?
getIntent
().
getStringExtra
(
"imageUrl"
)
:
""
;
imageUrl
=
getIntent
().
hasExtra
(
"imageUrl"
)
?
getIntent
().
getStringExtra
(
"imageUrl"
)
:
""
;
//获取背景图片地址
//获取背景图片地址
backUrl
=
getIntent
().
hasExtra
(
"backUrl"
)
?
getIntent
().
getStringExtra
(
"backUrl"
)
:
""
;
backUrl
=
getIntent
().
hasExtra
(
"backUrl"
)
?
getIntent
().
getStringExtra
(
"backUrl"
)
:
""
;
//获取回来状态值
comefrom
=
getIntent
().
hasExtra
(
"comefrom"
)
?
getIntent
().
getIntExtra
(
"comefrom"
,
0
)
:
0
;
//获取位置
//获取位置
position
=
getIntent
().
hasExtra
(
"position"
)
?
getIntent
().
getIntExtra
(
"position"
,
0
)
:
0
;
position
=
getIntent
().
hasExtra
(
"position"
)
?
getIntent
().
getIntExtra
(
"position"
,
0
)
:
0
;
//订单ID
//订单ID
oldOrderId
=
getIntent
().
hasExtra
(
"order_id"
)
?
getIntent
().
getStringExtra
(
"order_id"
)
:
""
;
order_id
=
getIntent
().
hasExtra
(
"order_id"
)
?
getIntent
().
getStringExtra
(
"order_id"
)
:
""
;
//作品Id
works_id
=
getIntent
().
hasExtra
(
"works_id"
)
?
getIntent
().
getStringExtra
(
"works_id"
)
:
""
;
activity_process_status_text
.
setText
(
""
);
activity_process_status_text
.
setText
(
""
);
getScoketData
();
getScoketData
();
String
url
=
Config
.
GET_PRINT_QR_CODE
+
"?machine="
+
SPUtils
.
getStringValue
(
"machine_code"
,
""
)
+
"&order_id="
+
order_id
+
"&type=3"
;
//activity_process_top_qr_code.setImageBitmap(QRCodeUtil.createQRCodeBitmap(url, ScreenUtils.dip2px(this, 80), ScreenUtils.dip2px(this, 80)));
Glide
.
with
(
this
).
load
(
url
).
into
(
activity_process_top_qr_code
);
}
}
//imageUrl="http://img.colorpark.cn/yun/10962_16284751746847.png";
//backUrl="http://img.colorpark.cn/back/1628055499610a27cb1b984.png";
@Override
@Override
//初始化数据
//初始化数据
protected
void
initData
()
{
protected
void
initData
()
{
//测试
//测试
//status = 1;
backUrl
=
"http://img.colorpark.cn/back/1628055499610a27cb1b984.png"
;
//position = 4;
imageUrl
=
"http://img.colorpark.cn/yun/10962_16284751746847.png"
;
//backUrl = "http://img.colorpark.cn/back/1628055499610a27cb1b984.png";
//imageUrl = "http://img.colorpark.cn/yun/10962_16284751746847.png";*/
selctStatus
(
status
);
selctStatus
(
status
);
//startBrushImage();
//startBrushImage();
/*handler.postDelayed(new Runnable() {
/*handler.postDelayed(new Runnable() {
...
@@ -147,18 +139,18 @@ public class ProcessActivity extends BaseActivity {
...
@@ -147,18 +139,18 @@ public class ProcessActivity extends BaseActivity {
public void run() {
public void run() {
startBrushImage();
startBrushImage();
}
}
}, 12000);*/
}, 12000);*/
/*
handler.postDelayed(new Runnable() {
handler
.
postDelayed
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//backUrl = "http://img.colorpark.cn/back/16274542866100fb4e7002a
.png";
backUrl
=
"http://img.colorpark.cn/back/1628055499610a27cb1b984
.png"
;
//imageUrl = "http://img.colorpark.cn/yun/10192_16269162139511
.png";
imageUrl
=
"http://img.colorpark.cn/yun/10962_16284751746847
.png"
;
//
selctStatus(status);
selctStatus
(
status
);
SPUtils
.
putIntValue
(
"initMinX"
,
ScreenUtils
.
dip2px
(
ProcessActivity
.
this
,
235
));
SPUtils
.
putIntValue
(
"initMinX"
,
ScreenUtils
.
dip2px
(
ProcessActivity
.
this
,
235
));
RxBrushTime
.
getInstance
(
ProcessActivity
.
this
).
count
=
2
;
RxBrushTime
.
getInstance
(
ProcessActivity
.
this
).
count
=
2
;
startBrushImage
();
startBrushImage
();
}
}
},
25
000);
},
8
000
);
handler
.
postDelayed
(
new
Runnable
()
{
handler
.
postDelayed
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
...
@@ -167,7 +159,7 @@ public class ProcessActivity extends BaseActivity {
...
@@ -167,7 +159,7 @@ public class ProcessActivity extends BaseActivity {
loadFireworks
();
loadFireworks
();
comeInComplete
();
comeInComplete
();
}
}
}, 1
40000);*/
},
1
2000
);
}
}
...
@@ -220,9 +212,9 @@ public class ProcessActivity extends BaseActivity {
...
@@ -220,9 +212,9 @@ public class ProcessActivity extends BaseActivity {
return
;
return
;
}
}
status
=
rxProcessBean
.
getProcessStatus
();
status
=
rxProcessBean
.
getProcessStatus
();
String
order_id
=
rxProcessBean
.
getOrder
_id
();
String
worksId
=
rxProcessBean
.
getWorks
_id
();
//状态50取消
//状态50取消
if
(
status
==
50
&&
order_id
.
equals
(
oldOrderI
d
))
{
if
(
status
==
50
&&
worksId
.
equals
(
works_i
d
))
{
RxProduceTimer
.
getInstance
(
ProcessActivity
.
this
).
progressTime
=
0
;
RxProduceTimer
.
getInstance
(
ProcessActivity
.
this
).
progressTime
=
0
;
RxProduceTimer
.
getInstance
(
ProcessActivity
.
this
).
waiteTime
=
0
;
RxProduceTimer
.
getInstance
(
ProcessActivity
.
this
).
waiteTime
=
0
;
RxProduceTimer
.
getInstance
(
ProcessActivity
.
this
).
cancel
();
RxProduceTimer
.
getInstance
(
ProcessActivity
.
this
).
cancel
();
...
@@ -237,7 +229,7 @@ public class ProcessActivity extends BaseActivity {
...
@@ -237,7 +229,7 @@ public class ProcessActivity extends BaseActivity {
backUrl
=
rxProcessBean
.
getBackUrl
();
backUrl
=
rxProcessBean
.
getBackUrl
();
initData
();
initData
();
}
}
oldOrderId
=
order_i
d
;
works_id
=
worksI
d
;
}
}
});
});
}
}
...
@@ -371,7 +363,7 @@ public class ProcessActivity extends BaseActivity {
...
@@ -371,7 +363,7 @@ public class ProcessActivity extends BaseActivity {
break
;
break
;
default
:
default
:
break
;
break
;
}
}
}
}
...
@@ -392,7 +384,16 @@ public class ProcessActivity extends BaseActivity {
...
@@ -392,7 +384,16 @@ public class ProcessActivity extends BaseActivity {
//正在打印处理有进度条逻辑
//正在打印处理有进度条逻辑
private
void
startPrintprogress
(
int
type
)
{
private
void
startPrintprogress
(
int
type
)
{
onLineShowAndHide
(
3
);
onLineShowAndHide
(
3
);
AnimationUtil
.
getInstance
(
this
).
translationXAnimation
(
activity_process_diy_image_back_le
,
5000
,
new
AnimationUtil
.
onAnimationAction
()
{
int
count
=
0
;
try
{
count
=
RxBrushTime
.
getInstance
(
ProcessActivity
.
this
).
count
;
}
catch
(
Exception
e
)
{
}
if
(
type
==
2
&&
count
>
1
)
{
startBrushImage
();
}
/*AnimationUtil.getInstance(this).translationXAnimation(activity_process_diy_image_back_le, 5000, new AnimationUtil.onAnimationAction() {
@Override
@Override
public void onAnimationEnd() {
public void onAnimationEnd() {
isBushImage = true;
isBushImage = true;
...
@@ -411,7 +412,7 @@ public class ProcessActivity extends BaseActivity {
...
@@ -411,7 +412,7 @@ public class ProcessActivity extends BaseActivity {
}
}
}, 1f);
}, 1f);
}
}
},
ScreenUtils
.
getScreenWidth
(
ProcessActivity
.
this
)
/
2
-
ScreenUtils
.
dip2px
(
ProcessActivity
.
this
,
85
));
}, ScreenUtils.getScreenWidth(ProcessActivity.this) / 2 - ScreenUtils.dip2px(ProcessActivity.this, 85));
*/
}
}
...
@@ -633,6 +634,8 @@ public class ProcessActivity extends BaseActivity {
...
@@ -633,6 +634,8 @@ public class ProcessActivity extends BaseActivity {
activity_process_diy_image_back_le.setLayoutParams(layoutParams);
activity_process_diy_image_back_le.setLayoutParams(layoutParams);
activity_process_diy_image_back_le.setVisibility(View.VISIBLE);
activity_process_diy_image_back_le.setVisibility(View.VISIBLE);
activity_process_online_image_bacl_all_le.setVisibility(View.VISIBLE);*/
activity_process_online_image_bacl_all_le.setVisibility(View.VISIBLE);*/
activity_process_diy_image_back_le
.
setVisibility
(
View
.
VISIBLE
);
activity_process_online_image_bacl_all_le
.
setVisibility
(
View
.
VISIBLE
);
if
(
IsComeProcess
&&
type
!=
0
)
{
if
(
IsComeProcess
&&
type
!=
0
)
{
startPrintprogress
(
type
);
startPrintprogress
(
type
);
}
}
...
@@ -655,6 +658,8 @@ public class ProcessActivity extends BaseActivity {
...
@@ -655,6 +658,8 @@ public class ProcessActivity extends BaseActivity {
//开始排队进来动画
//开始排队进来动画
private
void
statProcessOnLineImage
()
{
private
void
statProcessOnLineImage
()
{
activity_process_diy_image_back_le
.
setVisibility
(
View
.
VISIBLE
);
activity_process_online_image_bacl_all_le
.
setVisibility
(
View
.
VISIBLE
);
/*activity_process_diy_image_back_le.setTranslationX(0);
/*activity_process_diy_image_back_le.setTranslationX(0);
activity_process_diy_image_back_le.setVisibility(View.GONE);
activity_process_diy_image_back_le.setVisibility(View.GONE);
activity_process_online_image_bacl_all_le.setVisibility(View.GONE);
activity_process_online_image_bacl_all_le.setVisibility(View.GONE);
...
...
app/src/main/java/live/nodiyphoneshell/cend/view/process/complete/ProcessCompleteActivity.java
View file @
8d7854d9
...
@@ -47,8 +47,6 @@ public class ProcessCompleteActivity extends BaseActivity {
...
@@ -47,8 +47,6 @@ public class ProcessCompleteActivity extends BaseActivity {
@BindView
(
R
.
id
.
activity_make_complete_on_come_le
)
@BindView
(
R
.
id
.
activity_make_complete_on_come_le
)
LinearLayout
activity_make_complete_on_come_le
;
LinearLayout
activity_make_complete_on_come_le
;
@BindView
(
R
.
id
.
activity_process_complete_back_le
)
LinearLayout
activity_process_complete_back_le
;
private
String
imageUrl
=
""
;
private
String
imageUrl
=
""
;
...
@@ -118,8 +116,7 @@ public class ProcessCompleteActivity extends BaseActivity {
...
@@ -118,8 +116,7 @@ public class ProcessCompleteActivity extends BaseActivity {
RxTimer
rxTimer
=
RxTimer
.
getInstance
(
ProcessCompleteActivity
.
this
);
RxTimer
rxTimer
=
RxTimer
.
getInstance
(
ProcessCompleteActivity
.
this
);
rxTimer
.
cancel
();
rxTimer
.
cancel
();
activity_process_complete_time_minutes
.
setText
(
"15S"
);
activity_process_complete_time_minutes
.
setText
(
"15S"
);
rxTimer
.
initProcessTime
(
15
,
2
,
rxTimer
.
initProcessTime
(
15
,
2
,
activity_process_complete_time_minutes
);
activity_process_complete_time_minutes
);
rxTimer
.
interval
(
1000
);
rxTimer
.
interval
(
1000
);
downAndUp
();
downAndUp
();
}
}
...
@@ -202,18 +199,6 @@ public class ProcessCompleteActivity extends BaseActivity {
...
@@ -202,18 +199,6 @@ public class ProcessCompleteActivity extends BaseActivity {
}
}
@OnClick
({
R
.
id
.
activity_process_complete_back_le
})
void
onclick
(
View
button
)
{
switch
(
button
.
getId
())
{
case
R
.
id
.
activity_process_complete_back_le
:
CustomApplication
.
allfinish
();
break
;
default
:
break
;
}
}
@Override
@Override
protected
void
onResume
()
{
protected
void
onResume
()
{
...
...
app/src/main/java/live/nodiyphoneshell/cend/websocket/XYDClient.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
websocket
;
package
live
.
nodiyphoneshell
.
cend
.
websocket
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.ut.device.UTDevice
;
import
com.ut.device.UTDevice
;
...
@@ -41,6 +42,7 @@ import live.nodiyphoneshell.cend.utils.ScreenUtils;
...
@@ -41,6 +42,7 @@ import live.nodiyphoneshell.cend.utils.ScreenUtils;
import
live.nodiyphoneshell.cend.utils.ToastUtil
;
import
live.nodiyphoneshell.cend.utils.ToastUtil
;
import
live.nodiyphoneshell.cend.utils.UpLoadSceenShot
;
import
live.nodiyphoneshell.cend.utils.UpLoadSceenShot
;
import
live.nodiyphoneshell.cend.utils.Upload
;
import
live.nodiyphoneshell.cend.utils.Upload
;
import
live.nodiyphoneshell.cend.view.process.ProcessActivity
;
import
live.nodiyphoneshell.cend.wsmanager.WsManager
;
import
live.nodiyphoneshell.cend.wsmanager.WsManager
;
import
live.nodiyphoneshell.cend.wsmanager.listener.WsStatusListener
;
import
live.nodiyphoneshell.cend.wsmanager.listener.WsStatusListener
;
import
okhttp3.Call
;
import
okhttp3.Call
;
...
@@ -78,7 +80,6 @@ public class XYDClient {
...
@@ -78,7 +80,6 @@ public class XYDClient {
return
instance
;
return
instance
;
}
}
/**
/**
* 初始化对象信息
* 初始化对象信息
**/
**/
...
@@ -92,7 +93,6 @@ public class XYDClient {
...
@@ -92,7 +93,6 @@ public class XYDClient {
rxScokerTimer
.
interval
(
5000
,
number
->
sendPingText
());
rxScokerTimer
.
interval
(
5000
,
number
->
sendPingText
());
}
}
/**
/**
* 初始化一个WebScoket对象
* 初始化一个WebScoket对象
**/
**/
...
@@ -124,7 +124,7 @@ public class XYDClient {
...
@@ -124,7 +124,7 @@ public class XYDClient {
if
(
rxScokerTimer
==
null
)
{
if
(
rxScokerTimer
==
null
)
{
rxScokerTimer
=
new
RxScokerTimer
(
context
);
rxScokerTimer
=
new
RxScokerTimer
(
context
);
rxScokerTimer
.
interval
(
5000
,
number
->
sendPingText
());
rxScokerTimer
.
interval
(
5000
,
number
->
sendPingText
());
}
}
}
}
/**
/**
...
@@ -136,7 +136,6 @@ public class XYDClient {
...
@@ -136,7 +136,6 @@ public class XYDClient {
}
}
saveFileText
(
"发送消息开始"
,
message
);
saveFileText
(
"发送消息开始"
,
message
);
if
(
wsManager
==
null
)
{
if
(
wsManager
==
null
)
{
//init();
return
;
return
;
}
}
saveFileText
(
"发送消息结束"
,
message
);
saveFileText
(
"发送消息结束"
,
message
);
...
@@ -157,7 +156,6 @@ public class XYDClient {
...
@@ -157,7 +156,6 @@ public class XYDClient {
}
}
}
}
/**
/**
* <>发送ping信息</>
* <>发送ping信息</>
**/
**/
...
@@ -202,9 +200,9 @@ public class XYDClient {
...
@@ -202,9 +200,9 @@ public class XYDClient {
String
jsonStr
=
JSON
.
toJSONString
(
receiveMessageBean
);
String
jsonStr
=
JSON
.
toJSONString
(
receiveMessageBean
);
sendData
(
jsonStr
);
sendData
(
jsonStr
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
}
}
}
}
/**
/**
...
@@ -427,6 +425,18 @@ public class XYDClient {
...
@@ -427,6 +425,18 @@ public class XYDClient {
}
}
public
void
getCoveWidth
(
String
order_id
,
ProcessBean
processBean
)
{
public
void
getCoveWidth
(
String
order_id
,
ProcessBean
processBean
)
{
Intent
intent
=
new
Intent
(
context
,
ProcessActivity
.
class
);
ProcessBean
.
DataBean
dataBean
=
processBean
.
getData
();
if
(
dataBean
!=
null
)
{
intent
.
putExtra
(
"status"
,
1
);
//状态
intent
.
putExtra
(
"imageUrl"
,
dataBean
.
getWorks_image
());
//图片
intent
.
putExtra
(
"backUrl"
,
dataBean
.
getBack_image
());
//背景图片
intent
.
putExtra
(
"position"
,
0
);
//位置
intent
.
putExtra
(
"works_id"
,
dataBean
.
getWorks_id
());
//作品Id
intent
.
putExtra
(
"order_id"
,
dataBean
.
getOrder_id
());
//订单Id
context
.
startActivity
(
intent
);
}
context
.
startActivity
(
intent
);
OkHttpUtils
.
get
()
OkHttpUtils
.
get
()
.
addParams
(
"order_id"
,
order_id
)
.
addParams
(
"order_id"
,
order_id
)
.
url
(
Config
.
GET_DETAIL_COVE_WITH
)
.
url
(
Config
.
GET_DETAIL_COVE_WITH
)
...
@@ -436,6 +446,7 @@ public class XYDClient {
...
@@ -436,6 +446,7 @@ public class XYDClient {
public
void
onError
(
Call
call
,
Exception
e
,
int
id
)
{
public
void
onError
(
Call
call
,
Exception
e
,
int
id
)
{
initFailData
();
initFailData
();
}
}
@Override
@Override
public
void
onResponse
(
String
response
,
int
id
)
{
public
void
onResponse
(
String
response
,
int
id
)
{
GetWidAndHeightBean
getWidAndHeightBean
=
JsonUtils
.
deserialize
(
response
,
GetWidAndHeightBean
.
class
);
GetWidAndHeightBean
getWidAndHeightBean
=
JsonUtils
.
deserialize
(
response
,
GetWidAndHeightBean
.
class
);
...
@@ -471,7 +482,6 @@ public class XYDClient {
...
@@ -471,7 +482,6 @@ public class XYDClient {
RxBus
.
getDefault
().
post
(
rxProcessBean
);
RxBus
.
getDefault
().
post
(
rxProcessBean
);
}
}
});
});
sendProcessData
(
1
,
processBean
);
}
}
});
});
}
}
...
@@ -493,7 +503,8 @@ public class XYDClient {
...
@@ -493,7 +503,8 @@ public class XYDClient {
if
(
processBean
!=
null
&&
processBean
.
getData
()
!=
null
)
{
if
(
processBean
!=
null
&&
processBean
.
getData
()
!=
null
)
{
rxProcessBean
.
setImageUrl
(
processBean
.
getData
().
getWorks_image
());
rxProcessBean
.
setImageUrl
(
processBean
.
getData
().
getWorks_image
());
rxProcessBean
.
setBackUrl
(
processBean
.
getData
().
getBack_image
());
rxProcessBean
.
setBackUrl
(
processBean
.
getData
().
getBack_image
());
rxProcessBean
.
setOrder_id
(
processBean
.
getData
().
getWorks_id
());
rxProcessBean
.
setOrder_id
(
processBean
.
getData
().
getOrder_id
());
rxProcessBean
.
setWorks_id
(
processBean
.
getData
().
getWorks_id
());
}
}
//通过Rxjava观察者模式发送数据
//通过Rxjava观察者模式发送数据
RxBus
.
getDefault
().
post
(
rxProcessBean
);
RxBus
.
getDefault
().
post
(
rxProcessBean
);
...
...
app/src/main/java/live/nodiyphoneshell/cend/widget/CircleImageView.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
widget
;
package
live
.
nodiyphoneshell
.
cend
.
widget
;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.graphics.Canvas
;
import
android.graphics.Canvas
;
import
android.graphics.Matrix
;
import
android.graphics.Matrix
;
import
android.graphics.Paint
;
import
android.graphics.Paint
;
import
android.graphics.PorterDuff
;
import
android.graphics.PorterDuff
;
import
android.graphics.PorterDuffXfermode
;
import
android.graphics.PorterDuffXfermode
;
import
android.graphics.Xfermode
;
import
android.graphics.Xfermode
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.graphics.drawable.Drawable
;
import
android.graphics.drawable.Drawable
;
import
android.util.AttributeSet
;
import
android.util.AttributeSet
;
import
androidx.appcompat.widget.AppCompatImageView
;
import
androidx.appcompat.widget.AppCompatImageView
;
public
class
CircleImageView
extends
AppCompatImageView
{
public
class
CircleImageView
extends
AppCompatImageView
{
...
@@ -69,7 +69,6 @@ public class CircleImageView extends AppCompatImageView {
...
@@ -69,7 +69,6 @@ public class CircleImageView extends AppCompatImageView {
float
scale
=
Math
.
max
(
widthScale
,
heightScale
);
float
scale
=
Math
.
max
(
widthScale
,
heightScale
);
Matrix
matrix
=
new
Matrix
();
Matrix
matrix
=
new
Matrix
();
matrix
.
postScale
(
scale
,
scale
);
matrix
.
postScale
(
scale
,
scale
);
return
Bitmap
.
createBitmap
(
sourceBitmap
,
0
,
0
,
width
,
height
,
matrix
,
true
);
return
Bitmap
.
createBitmap
(
sourceBitmap
,
0
,
0
,
width
,
height
,
matrix
,
true
);
}
}
...
...
app/src/main/java/live/nodiyphoneshell/cend/widget/CornerTransform.java
View file @
8d7854d9
...
@@ -70,7 +70,6 @@ public class CornerTransform implements Transformation<Bitmap> {
...
@@ -70,7 +70,6 @@ public class CornerTransform implements Transformation<Bitmap> {
finalHeight
=
source
.
getHeight
();
finalHeight
=
source
.
getHeight
();
finalWidth
=
finalHeight
;
finalWidth
=
finalHeight
;
}
}
//修正圆角
//修正圆角
this
.
radius
*=
(
float
)
finalHeight
/
(
float
)
outHeight
;
this
.
radius
*=
(
float
)
finalHeight
/
(
float
)
outHeight
;
Bitmap
outBitmap
=
this
.
mBitmapPool
.
get
(
finalWidth
,
finalHeight
,
Bitmap
.
Config
.
ARGB_8888
);
Bitmap
outBitmap
=
this
.
mBitmapPool
.
get
(
finalWidth
,
finalHeight
,
Bitmap
.
Config
.
ARGB_8888
);
...
...
app/src/main/java/live/nodiyphoneshell/cend/wsmanager/IWsManager.java
View file @
8d7854d9
package
live
.
nodiyphoneshell
.
cend
.
wsmanager
;
package
live
.
nodiyphoneshell
.
cend
.
wsmanager
;
import
okhttp3.WebSocket
;
import
okhttp3.WebSocket
;
import
okio.ByteString
;
import
okio.ByteString
;
/**
/**
* @author rabtman
* @author rabtman
*/
*/
interface
IWsManager
{
interface
IWsManager
{
WebSocket
getWebSocket
();
WebSocket
getWebSocket
();
...
@@ -24,4 +21,5 @@ interface IWsManager {
...
@@ -24,4 +21,5 @@ interface IWsManager {
boolean
sendMessage
(
String
msg
);
boolean
sendMessage
(
String
msg
);
boolean
sendMessage
(
ByteString
byteString
);
boolean
sendMessage
(
ByteString
byteString
);
}
}
app/src/main/res/layout/activity_process.xml
View file @
8d7854d9
...
@@ -6,149 +6,82 @@
...
@@ -6,149 +6,82 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/icon_process_bg"
android:background=
"@drawable/icon_process_bg"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<ImageView
<ImageView
android:id=
"@+id/activity_process_top_start_come"
android:id=
"@+id/activity_process_top_start_come"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"740dp"
android:background=
"@drawable/icon_process_back_print"
android:layout_marginLeft=
"-40dip"
/>
android:background=
"@drawable/icon_process_back_print"
/>
<ImageView
android:id=
"@+id/activity_process_top_qr_code"
<!--<live.nodiyphoneshell.cend.widget.RecyclerScrollview
android:layout_width=
"80dp"
android:layout_width="match_parent"
android:layout_height=
"80dp"
android:layout_height="match_parent"
android:layout_marginLeft=
"10dp"
android:layout_marginTop="-10dp"
android:layout_marginTop=
"360dp"
/>
android:orientation="horizontal"
android:overScrollMode="never">
<LinearLayout
android:id="@+id/activity_process_top_on_start_come_le"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<!– <ImageView
android:id="@+id/activity_process_top_on_start_come"
android:layout_width="360dp"
android:layout_height="match_parent"
android:background="@drawable/icon_pay_back" />–>
<ImageView
android:id="@+id/activity_process_top_start_come"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_process_back_print"
/>
</LinearLayout>
</live.nodiyphoneshell.cend.widget.RecyclerScrollview>-->
<!-- <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/activity_process_back_le"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@drawable/make_back_shap"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/activity_make_back_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_make_white_back" />
<TextView
android:id="@+id/activity_process_back_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dip"
android:text="返回"
android:textColor="@color/white_FFFFFF"
android:textSize="13sp" />
</LinearLayout>
</RelativeLayout>-->
<RelativeLayout
<RelativeLayout
android:id=
"@+id/activity_process_diy_image_back_le"
android:id=
"@+id/activity_process_diy_image_back_le"
android:layout_width=
"254dp"
android:layout_width=
"254dp"
android:layout_height=
"468dp"
android:layout_height=
"468dp"
android:layout_marginLeft=
"-40dp"
android:layout_marginLeft=
"85dp"
android:layout_marginTop=
"70dp"
android:layout_marginTop=
"70dp"
>
android:scaleX=
"0.5"
android:scaleY=
"0.5"
android:visibility=
"gone"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
<ImageView
android:id=
"@+id/activity_proces_diy_image_white"
android:id=
"@+id/activity_proces_diy_image_white"
android:layout_width=
"232dp"
android:layout_width=
"232dp"
android:layout_height=
"430dp"
android:layout_height=
"430dp"
android:layout_centerInParent=
"true"
android:layout_centerInParent=
"true"
android:background=
"@color/white_FFFFFF"
android:background=
"@color/white_FFFFFF"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<live.nodiyphoneshell.cend.widget.MyBitmapViewAnother
<live.nodiyphoneshell.cend.widget.MyBitmapViewAnother
android:id=
"@+id/activity_proces_diy_image"
android:id=
"@+id/activity_proces_diy_image"
android:layout_width=
"252dp"
android:layout_width=
"252dp"
android:layout_height=
"466dp"
android:layout_height=
"466dp"
android:layout_centerInParent=
"true"
/>
android:layout_centerInParent=
"true"
/>
<ImageView
<ImageView
android:id=
"@+id/activity_process_diy_image_back"
android:id=
"@+id/activity_process_diy_image_back"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_centerInParent=
"true"
/>
android:layout_centerInParent=
"true"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_centerInParent=
"true"
>
<ImageView
<ImageView
android:id=
"@+id/activity_process_diy_image_brush"
android:id=
"@+id/activity_process_diy_image_brush"
android:layout_width=
"28dp"
android:layout_width=
"28dp"
android:layout_height=
"60dp"
android:layout_height=
"60dp"
android:background=
"@drawable/icon_shuan_zi"
android:background=
"@drawable/icon_shuan_zi"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/activity_process_online_image_bacl_all_le"
android:id=
"@+id/activity_process_online_image_bacl_all_le"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"452dp"
android:layout_height=
"452dp"
android:layout_marginLeft=
"190dp"
android:layout_marginLeft=
"190dp"
android:layout_marginTop=
"
8
0dp"
android:layout_marginTop=
"
11
0dp"
android:background=
"@color/transparent"
android:background=
"@color/transparent"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:visibility=
"gone"
android:visibility=
"gone"
>
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
<ImageView
android:id=
"@+id/activity_process_online_image_one"
android:id=
"@+id/activity_process_online_image_one"
android:layout_width=
"20dip"
android:layout_width=
"20dip"
android:layout_height=
"234dp"
android:layout_height=
"234dp"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center_vertical"
android:background=
"@drawable/icon_proces_online_image_one"
android:background=
"@drawable/icon_proces_online_image_one"
/>
android:visibility=
"gone"
/>
<ImageView
<ImageView
android:id=
"@+id/activity_process_online_image_two"
android:id=
"@+id/activity_process_online_image_two"
android:layout_width=
"20dip"
android:layout_width=
"20dip"
android:layout_height=
"234dp"
android:layout_height=
"234dp"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"5dip"
android:layout_marginLeft=
"5dip"
android:background=
"@drawable/icon_proces_online_image_one"
android:background=
"@drawable/icon_proces_online_image_one"
/>
android:visibility=
"gone"
/>
<ImageView
<ImageView
android:id=
"@+id/activity_process_online_image_three"
android:id=
"@+id/activity_process_online_image_three"
android:layout_width=
"20dip"
android:layout_width=
"20dip"
android:layout_height=
"234dp"
android:layout_height=
"234dp"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"5dip"
android:layout_marginLeft=
"5dip"
android:background=
"@drawable/icon_proces_online_image_one"
android:background=
"@drawable/icon_proces_online_image_one"
/>
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"12dp"
android:layout_width=
"12dp"
android:layout_height=
"18dp"
android:layout_height=
"18dp"
...
@@ -170,33 +103,17 @@
...
@@ -170,33 +103,17 @@
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/activity_process_status_text_content"
android:id=
"@+id/activity_process_status_text_content"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
200dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:layout_
centerHorizontal=
"true
"
android:layout_
marginLeft=
"115dp
"
android:layout_marginBottom=
"35dp"
android:layout_marginBottom=
"35dp"
android:gravity=
"center"
android:gravity=
"center"
android:lineSpacingMultiplier=
"1.5"
android:lineSpacingMultiplier=
"1.5"
android:text=
""
android:text=
""
android:textColor=
"
#cbcbcb
"
android:textColor=
"
@color/white_FFFFFF
"
android:textSize=
"10sp"
android:textSize=
"10sp"
android:visibility=
"gone"
android:visibility=
"gone"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<!--android:background="@drawable/icon_shuan_zi"-->
<TextView
android:id=
"@+id/activity_process_print_continue_back_home"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_gravity=
"center"
android:layout_marginBottom=
"40dip"
android:background=
"@drawable/icon_process_back_diy"
android:gravity=
"center"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<ImageView
<ImageView
android:id=
"@+id/activity_process_print_fireworks"
android:id=
"@+id/activity_process_print_fireworks"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/activity_process_complete.xml
View file @
8d7854d9
...
@@ -29,28 +29,6 @@
...
@@ -29,28 +29,6 @@
</LinearLayout>
</LinearLayout>
</live.nodiyphoneshell.cend.widget.RecyclerScrollview>
</live.nodiyphoneshell.cend.widget.RecyclerScrollview>
<LinearLayout
android:id=
"@+id/activity_process_complete_back_le"
android:layout_width=
"65dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dip"
android:background=
"@drawable/make_back_shap"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_make_white_back"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"4dip"
android:text=
"返回"
android:textColor=
"@color/white_FFFFFF"
android:textSize=
"13sp"
/>
</LinearLayout>
<RelativeLayout
<RelativeLayout
android:id=
"@+id/activity_process_complete_diy_image_back_le"
android:id=
"@+id/activity_process_complete_diy_image_back_le"
android:layout_width=
"122dip"
android:layout_width=
"122dip"
...
...
app/unused.txt
View file @
8d7854d9
...
@@ -1869,8 +1869,6 @@ android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$4:
...
@@ -1869,8 +1869,6 @@ android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$4:
final synthetic android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase this$0
final synthetic android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase this$0
androidx.lifecycle.LiveData$AlwaysActiveObserver:
androidx.lifecycle.LiveData$AlwaysActiveObserver:
final synthetic androidx.lifecycle.LiveData this$0
final synthetic androidx.lifecycle.LiveData this$0
live.nodiyphoneshell.cend.view.process.complete.ProcessCompleteActivity_ViewBinding$1:
final synthetic live.nodiyphoneshell.cend.view.process.complete.ProcessCompleteActivity_ViewBinding this$0
androidx.versionedparcelable.VersionedParcel$1:
androidx.versionedparcelable.VersionedParcel$1:
final synthetic androidx.versionedparcelable.VersionedParcel this$0
final synthetic androidx.versionedparcelable.VersionedParcel this$0
com.google.gson.internal.ConstructorConstructor$13:
com.google.gson.internal.ConstructorConstructor$13:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment