diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..c846c5b6d46c7c53a03b41c5cbb65053c7528c80 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +0.0.1-SNAPSHOT +-------------- + +ohos 第一个版本,完整实现了原库的全部 api \ No newline at end of file diff --git a/README.OPENSOURCE b/README.OPENSOURCE new file mode 100644 index 0000000000000000000000000000000000000000..9408b52c125cfdb400ad4b79f0b2d54d9ea7cdf5 --- /dev/null +++ b/README.OPENSOURCE @@ -0,0 +1,19 @@ +[ + + { + + "Name": "RadarView", + + "License": "", + + "License File": "", + + "Version Number": "master", + + "Upstream URL": "https://github.com/Blowing/RadarView", + + "Description": "这是一款高仿360清理功能的动画view" + + } + +] \ No newline at end of file diff --git a/README.md b/README.md index 9152d7081c3e7e02b16dc1313b6abe4e24d3b752..64912252d8b166d8ca1d8fbddd91e8d8e18182e9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,87 @@ -# RadarView -高仿360检测评分动画 -![image](https://github.com/Blowing/RadarView/blob/master/raderView.gif ) +# RadarView + +#### 项目介绍 +- 项目名称:RadarView +- 所属系列:openharmony的第三方组件适配移植 +- 功能:实现360清理动画 +- 项目移植状态:主功能完成 +- 调用差异:无 +- 基线版本 master +- 开发版本:sdk5,DevEco Studio2.1 beta4 + +#### 效果演示 + + + +#### 安装教程 + +1.在项目根目录下的build.gradle文件中, + ``` + allprojects { + repositories { + maven { + url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + } + } + } +``` +2.在entry模块的build.gradle文件中, + ``` + dependencies { + implementation('com.gitee.chinasoft_ohos:radarvie:0.0.1-SNAPSHOT') + ...... + } +``` + +在sdk5,DevEco Studio2.1 beta4下项目可直接运行 +如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, +并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下 + +#### 使用说明 + +此效果主要是通过自定义view,设置属性动画形成的效果。 + +1、XML中引用控件: + +```xml + + +``` + +2、启动动画: + +```java + CHANNEL_ID 目前demo中设置的是12 + RadarCommpent radarCommpent = (RadarCommpent) findComponentById(ResourceTable.Id_radarview); + radarCommpent.showCheckProcess(CHANNEL_ID); +``` + +自定义MaterialSpinner控件,可以添加自定义属性,具体可用属性如下: + +| name | type | info | +|-------------------------|-----------|--------------------------------------------------------| +| topColor | int | 检测值是90%-100%的颜色 | +| middColor | int | 检测值是75%-90%的颜色 | +| lowColor | int | 设置值低于75%的颜色 | + +#### 测试信息 + +CodeCheck代码测试无异常 + +CloudTest代码测试无异常 + +火绒安全病毒安全检测通过 + +当前版本demo功能与原组件基本无差异 + +#### 版本迭代 + +- 0.0.1-SNAPSHOT diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index 06d913d435f50ac6f6e7ce9837ca02171104fbeb..0000000000000000000000000000000000000000 --- a/app/build.gradle +++ /dev/null @@ -1,36 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'com.neenbedankt.android-apt' -apply plugin: 'me.tatarka.retrolambda' - - -android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" - - defaultConfig { - applicationId "com.wujie.radarview" - minSdkVersion 14 - targetSdkVersion 25 - versionCode 1 - versionName "1.0" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:25.1.1' - compile 'com.jakewharton:butterknife:8.5.1' - apt 'com.jakewharton:butterknife-compiler:8.5.1' - compile 'io.reactivex:rxandroid:1.2.1' -} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro deleted file mode 100644 index 24d63f714d4d4ef265833cfd4984c4feb6f57261..0000000000000000000000000000000000000000 --- a/app/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in E:\android\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/app/src/androidTest/java/com/wujie/radarview/ApplicationTest.java b/app/src/androidTest/java/com/wujie/radarview/ApplicationTest.java deleted file mode 100644 index 40555d6c7baf24856303becec0a03120a7c5dc43..0000000000000000000000000000000000000000 --- a/app/src/androidTest/java/com/wujie/radarview/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.wujie.radarview; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml deleted file mode 100644 index 07ec33db3d0b8a52a4a58fce389ec3f883e7680b..0000000000000000000000000000000000000000 --- a/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/java/com/wujie/radarview/Main2Activity.java b/app/src/main/java/com/wujie/radarview/Main2Activity.java deleted file mode 100644 index 5eee08318fcdfa309794b4de1152eae4aca5339c..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/wujie/radarview/Main2Activity.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.wujie.radarview; - -import android.animation.ObjectAnimator; -import android.os.Bundle; -import android.os.Looper; -import android.support.v7.app.AppCompatActivity; -import android.view.animation.LinearInterpolator; -import android.widget.ImageView; - -import java.util.Timer; -import java.util.TimerTask; - -public class Main2Activity extends AppCompatActivity { - - private ObjectAnimator animator1,animator2, animator3; - private ImageView imageView1, imageView2, imageView3; - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main2); - initView(); - animator1 = new ObjectAnimator(); - animator2 = new ObjectAnimator(); - animator3 = new ObjectAnimator(); - initAnimator(animator1, imageView1, 90.0f, 450.0f); - - initAnimator(animator3, imageView3, 0.0f, 360.0f); - - - - final Timer timer = new Timer(); - timer.schedule(new TimerTask() { - @Override - public void run() { - Looper.prepare(); - - animator1.cancel(); - animator2.cancel(); - animator3.cancel(); - timer.cancel(); - Looper.loop(); - - - } - }, 6000); - - } - private void initView() { - imageView1 = (ImageView) findViewById(R.id.image1); - imageView2 = (ImageView) findViewById(R.id.image2); - imageView3 = (ImageView) findViewById(R.id.image3); - - - } - - private void initAnimator (ObjectAnimator animator, ImageView imageView , float f1, float f2) { - animator = ObjectAnimator.ofFloat(imageView, "rotation", f1, f2); - animator.setDuration(1000); - animator.setInterpolator(new LinearInterpolator());//不停顿 - animator.setRepeatCount(-1);//设置动画重复次数 - //animator.setRepeatMode(ValueAnimator.RESTART);//动画重复模式 - animator.start(); - } -} diff --git a/app/src/main/java/com/wujie/radarview/MainActivity.java b/app/src/main/java/com/wujie/radarview/MainActivity.java deleted file mode 100644 index 7171e6af90227041614b6b932420a38a1f94b90d..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/wujie/radarview/MainActivity.java +++ /dev/null @@ -1,334 +0,0 @@ -package com.wujie.radarview; - -import android.animation.ObjectAnimator; -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.util.Log; -import android.view.View; -import android.view.animation.LinearInterpolator; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.RelativeLayout; -import android.widget.TextView; - -import com.wujie.radarview.view.RaderWheelView; - -import java.util.Random; -import java.util.concurrent.TimeUnit; - -import butterknife.BindView; -import butterknife.ButterKnife; -import butterknife.OnClick; -import rx.Observable; -import rx.Subscription; -import rx.android.schedulers.AndroidSchedulers; -import rx.functions.Action1; - -public class MainActivity extends AppCompatActivity { - - - @BindView(R.id.check_layout_top_1) - View top1Layout; - @BindView(R.id.check_layout_top_2) - View top2Layout; - @BindView(R.id.check_radar_view) - com.wujie.radarview.view.RadarView mRadarView; - @BindView(R.id.check_radar_wheel_view) - RaderWheelView mRaderWheelView; - @BindView(R.id.wifi_acclerate_btn) - Button acclerateBtn; - @BindView(R.id.check_layout_animator) - RelativeLayout checkLayoutAnimator; - @BindView(R.id.wifi_acclerate_tv_tip) - TextView wifiAcclerateTvTip; - @BindView(R.id.wifi_acclerate_tv_check) - TextView mCheckTips; - @BindView(R.id.check_layout_acclerate) - RelativeLayout checkLayoutAcclerate; - @BindView(R.id.image3) - ImageView image3; - @BindView(R.id.image2) - ImageView image2; - @BindView(R.id.image1) - ImageView image1; - @BindView(R.id.wifi_acclerate_tv_optimze_core) - TextView wifiAcclerateTvOptimzeCore; - @BindView(R.id.checkd_layout_animator) - RelativeLayout checkdLayoutAnimator; - @BindView(R.id.wifi_optimize_tv_tip) - TextView optimzeCore; - @BindView(R.id.check_layout_optimize) - RelativeLayout checkLayoutOptimize; - @BindView(R.id.check_layout_top) - RelativeLayout checkLayoutTop; - @BindView(R.id.check_tv_score) - TextView scoreTv; - - private ObjectAnimator animator1 = new ObjectAnimator(), animator2 = new ObjectAnimator(), animator3 = new ObjectAnimator(); - - - int progress = 100; - private int core; - private int position = 0; - private int count = 0; - private int position1 = 0; - private int hasShowCheckImageViewCount = 0; - - private int during = 300;//检测时间间隔 - - private int mChannelID; - private String optimzeNames[]; - private String[] checkTips; - - private Subscription checkProcessSub, checkViewDoneSub; - - private Random mRandom = new Random(); - - private String result = ""; - - private boolean isToNext = false; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - ButterKnife.bind(this); - mRadarView.start(); - showCheckProcess(11); - - } - - - public void showCheckProcess(int chan_2g_sta) { - int time = 0; - chan_2g_sta = 11; - switch (chan_2g_sta) { - case -1: - case 0: - core = 50; - chan_2g_sta = 11; - break; - case 1: - core = 75; - chan_2g_sta = 15; - break; - case 2: - core = 100; - chan_2g_sta = 20; - break; - case 3: - core = 100; - chan_2g_sta = 20; - break; - case 11: - core = 50; - break; - case 12: - core = 60; - break; - case 13: - core = 65; - break; - case 14: - core = 70; - break; - case 15: - core = 75; - break; - case 16: - core = 80; - break; - case 17: - core = 85; - break; - case 18: - core = 90; - break; - case 19: - core = 95; - break; - case 20: - core = 100; - break; - default: - core = 50; - chan_2g_sta = 11; - break; - } - mChannelID = chan_2g_sta; - if (chan_2g_sta < 4) { - time = 34 - (4 - chan_2g_sta); - } else { - time = 34 - (21 - chan_2g_sta); - } - final int finalCore = core; - - - final int finalTime = time; - Observable.interval(during, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .take(34) - .subscribe(new Action1() { - @Override - public void call(Long aLong) { - int id = aLong.intValue(); - - //if (mCheckTips != null) { - // mCheckTips.setText(checkTips[id]); - //mProgressbar.setProgress(id+1); - if (id >= finalTime) { -// if (finalCore == 100) { -// toNextActivity(WifiAcclerateFullMarkActivity.class); -// } - if (progress > finalCore) { - if (progress > 60) { - progress = progress - (mRandom.nextInt(5) + 1); - - showBackground(progress); - scoreTv.setText(String.valueOf(progress)); - progress = (progress + 5) / 5 * 5 - 5; - } else { - progress = progress - (mRandom.nextInt(10) + 1); - - showBackground(progress); - scoreTv.setText(String.valueOf(progress)); - progress = progress / 10 * 10; - } - - } else { - - if (core <= 70) { - showBackground(50); - } else if (core > 70 && core <= 90) { - showBackground(75); - } else { - showBackground(100); - } - mRadarView.stop(); - mRadarView.setStart(0); - mRadarView.setStopRoate(true); - mRaderWheelView.stop(); - scoreTv.setText(String.valueOf(finalCore)); - mRadarView.setCodeangel(finalCore * 360 / 100); - - - // mProgressbar.setVisibility(View.INVISIBLE); - mCheckTips.setVisibility(View.INVISIBLE); - if (finalCore != 100) { - mRadarView.start(); - acclerateBtn.setVisibility(View.VISIBLE); - // tipTv.setVisibility(View.VISIBLE); - } else { - mRadarView.stop(); - } - } - } - //} - - - } - }, throwable -> { - Log.e("raderview", throwable.getMessage()+"error"); - }); - - } - - private void initAnimator(ObjectAnimator animator, ImageView imageView, float f1, float f2, int duration) { - animator = ObjectAnimator.ofFloat(imageView, "rotation", f1, f2); - animator.setDuration(duration); - animator.setInterpolator(new LinearInterpolator());//不停顿 - // animator.setRepeatMode(ValueAnimator.INFINITE); - animator.setRepeatCount(-1);//设置动画重复次数 -// //animator.setRepeatMode(ValueAnimator.RESTART);//动画重复模式 - animator.start(); - } - - - public void showBackground(int core) { - if (core > 90 && core <= 100) { - top1Layout.setAlpha(1); - top2Layout.setAlpha(1); - top2Layout.setBackgroundColor(getResources().getColor(R.color.wifi_acclerate_green)); - top1Layout.setBackgroundColor(getResources().getColor(R.color.transparent)); - } else if (core >= 75 && core <= 90) { - float topAlpha = (float) ((core - 75) * 0.04); - top2Layout.setAlpha(topAlpha); - top1Layout.setAlpha(1 - topAlpha); - top1Layout.setBackgroundColor(getResources().getColor(R.color.wifi_acclerate_orange)); - - } else { - float topAlpha = (float) ((core - 50) * 0.04); - top2Layout.setAlpha(topAlpha); - top1Layout.setAlpha(1 - topAlpha); - top2Layout.setBackgroundColor(getResources().getColor(R.color.wifi_acclerate_orange)); - top1Layout.setBackgroundColor(getResources().getColor(R.color.wifi_acclerate_red)); - - } - } - - - public void showOptimzeAnimator(int channelID) { - - /** - * 初始化优化的动画 - */ - animator1 = new ObjectAnimator(); - animator2 = new ObjectAnimator(); - animator3 = new ObjectAnimator(); - initAnimator(animator1, image1, 90.0f, 450.0f, 500); - initAnimator(animator3, image3, 360.0f, 0.0f, 1000); - optimzeCore.setText(String.valueOf(core)); - - - /** - * 这里是优化以后的自动加分 - */ - progress = core; - Observable.interval(500, 500, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .take(20 - channelID + 1) - .subscribe(aLong -> { - if (progress < 100) { - if (progress == 50) { - int score = progress + mRandom.nextInt(10) + 1; - showBackground(score); - wifiAcclerateTvOptimzeCore.setText(String.valueOf(score)); - progress = progress + 10; - } else if (progress >= 60 && progress < 100) { - int score = progress + mRandom.nextInt(5) + 1; - showBackground(score); - wifiAcclerateTvOptimzeCore.setText(String.valueOf(score)); - progress = progress + 5; - } else { - showBackground(99); - wifiAcclerateTvOptimzeCore.setText(String.valueOf(99)); - progress = progress + 5; - } - } else { - showBackground(100); - wifiAcclerateTvOptimzeCore.setText(String.valueOf(100)); - animator1.cancel(); - animator2.cancel(); - animator3.cancel(); - image1.setVisibility(View.GONE); - image3.setVisibility(View.GONE); - - //timer.cancel(); - - } - }, throwable -> { - Log.e("throwablecore", throwable.getMessage()); - // LogUtil.e("throwablecore", throwable.getMessage()); - }); - - } - - - @OnClick(R.id.wifi_acclerate_btn) - public void onClick() { - checkLayoutAcclerate.setVisibility(View.GONE); - checkLayoutOptimize.setVisibility(View.VISIBLE); - showOptimzeAnimator(mChannelID); - showOptimzeAnimator(11); - } -} diff --git a/app/src/main/java/com/wujie/radarview/MyProgressDrawable.java b/app/src/main/java/com/wujie/radarview/MyProgressDrawable.java deleted file mode 100644 index a31821bdb1c6f13c2bd2bfdff48c51ae36dab92d..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/wujie/radarview/MyProgressDrawable.java +++ /dev/null @@ -1,191 +0,0 @@ -package com.wujie.radarview; - -import android.animation.ObjectAnimator; -import android.animation.ValueAnimator; -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.ColorFilter; -import android.graphics.Matrix; -import android.graphics.Paint; -import android.graphics.Rect; -import android.graphics.drawable.Animatable; -import android.graphics.drawable.Drawable; -import android.util.Property; -import android.view.animation.LinearInterpolator; - -/** - * Created by wujie on 2016/10/31. - */ -public class MyProgressDrawable extends Drawable implements Animatable { - private static final int SCAN_DURATION = 800; /* 扫描频率,旋转一周时间 */ - - public static final int SCANNING = 0; - public static final int SCAN_SUCCESS = 1; - public static final int SCAN_ERROR = 2; - private int mState = SCANNING; - - private static final String COLOR_SUCCESS = "#2CBE1B"; /* 绿色 */ - private static final String COLOR_ERROR = "#FF9400"; /* 橙色 */ - - private Context context; - - private boolean mRunning; - - private ObjectAnimator mObjectAnimatorAngle; /* 旋转动画 */ - private float mCurrAngle; /* 旋转偏移角度 */ - - private Paint paint; - private int width, height; - - public MyProgressDrawable(Context context) { - this.context = context; - paint = new Paint(); - paint.setAntiAlias(true); /* 消除锯齿 */ - setupAnimations(); - } - - @Override - public void draw(Canvas canvas) { - switch (mState) { - case SCANNING: - paint.setColor(Color.parseColor(COLOR_SUCCESS)); - paint.setStyle(Paint.Style.FILL); /* 设置实心 */ - /* 扫描框 */ - Bitmap pb_scan = BitmapFactory.decodeResource(context.getResources(), - R.drawable.pb_scan); - pb_scan = Bitmap.createScaledBitmap(pb_scan, width, height, true); - Matrix matrix = new Matrix(); - matrix.postRotate(mCurrAngle % 360f, pb_scan.getWidth() / 2, - pb_scan.getHeight() / 2); - canvas.drawBitmap(pb_scan, matrix, paint); - break; - case SCAN_SUCCESS: - paint.setColor(Color.parseColor(COLOR_SUCCESS)); - paint.setStyle(Paint.Style.FILL); /* 设置实心 */ - break; - case SCAN_ERROR: - paint.setColor(Color.parseColor(COLOR_ERROR)); - paint.setStyle(Paint.Style.FILL); /* 设置实心 */ - break; - default: - break; - } - - /* 中心圆 */ - int centre = width / 2; /* 获取圆心的x坐标 */ - int radius = (int) (centre * 4 / 5); /* 圆环的半径 */ - canvas.drawCircle(centre, centre, radius, paint); /* 画出圆 */ - - /* 中心图标 */ - Rect rect = new Rect(centre - radius, centre - radius, centre + radius, - centre + radius); - Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), - R.drawable.pb_icon1); - canvas.drawBitmap(bitmap, null, rect, paint); - - } - - private Property mAngleProperty = new Property( - Float.class, "angle") { - @Override - public Float get(MyProgressDrawable object) { - return object.getCurrentGlobalAngle(); - } - - @Override - public void set(MyProgressDrawable object, Float value) { - object.setCurrentGlobalAngle(value); - } - }; - - private void setupAnimations() { - mObjectAnimatorAngle = ObjectAnimator.ofFloat(this, mAngleProperty, - 360f); - mObjectAnimatorAngle.setInterpolator(new LinearInterpolator()); - mObjectAnimatorAngle.setDuration(SCAN_DURATION); - mObjectAnimatorAngle.setRepeatMode(ValueAnimator.RESTART); - mObjectAnimatorAngle.setRepeatCount(ValueAnimator.INFINITE); - } - - public void setCurrentGlobalAngle(float currentGlobalAngle) { - mCurrAngle = currentGlobalAngle; - invalidateSelf(); - } - - public float getCurrentGlobalAngle() { - return mCurrAngle; - } - - @Override - public void setAlpha(int alpha) { - } - - @Override - public void setColorFilter(ColorFilter cf) { - - } - - @Override - public int getOpacity() { - return 0; - } - - @Override - protected void onBoundsChange(Rect bounds) { - super.onBoundsChange(bounds); - width = bounds.right - bounds.left; - height = bounds.bottom - bounds.top; - } - - @Override - public boolean isRunning() { - return mRunning; - } - - @Override - public void start() { - if (isRunning()) { - return; - } - mRunning = true; - mObjectAnimatorAngle.start(); - invalidateSelf(); - } - - @Override - public void stop() { - if (!isRunning()) { - return; - } - mRunning = false; - mObjectAnimatorAngle.cancel(); - invalidateSelf(); - } - - public void testStart() { - mRunning = true; - invalidateSelf(); - } - - public int getmState() { - return mState; - } - - public void setmState(int mState) { - this.mState = mState; - switch (mState) { - case SCANNING: - start(); - break; - case SCAN_SUCCESS: - stop(); - break; - default: - break; - } - invalidateSelf(); - } -} \ No newline at end of file diff --git a/app/src/main/java/com/wujie/radarview/Utils.java b/app/src/main/java/com/wujie/radarview/Utils.java deleted file mode 100644 index 186da6d119da2b0b87d3644b96a80aaa2e6449ef..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/wujie/radarview/Utils.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.wujie.radarview; - -import android.content.Context; - -/** - * Created by wujie on 2017/2/22. - */ -public class Utils { - - public static int dip2px (Context context, float dipValue) { - float density = context.getResources().getDisplayMetrics().density; - return (int) (density*dipValue + 0.5f); - } - - public static int px2dip(Context context, float pixValue) { - final float density = context.getResources().getDisplayMetrics().density; - return (int) (pixValue / density + 0.5f); - } -} diff --git a/app/src/main/res/drawable/pb_icon1.png b/app/src/main/res/drawable/pb_icon1.png deleted file mode 100644 index 2d45219863c49db93fa2be694d5398588652550c..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/drawable/pb_icon1.png and /dev/null differ diff --git a/app/src/main/res/drawable/pb_scan.png b/app/src/main/res/drawable/pb_scan.png deleted file mode 100644 index d338a1adb3a1d5fc892d95b50b93adc57cdf1013..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/drawable/pb_scan.png and /dev/null differ diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index f302535e99c03280c248c824974ae07b32c4b1a8..0000000000000000000000000000000000000000 --- a/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -