After Width: | Height: | Size: 30 KiB |
@ -0,0 +1,77 @@ |
||||
package com.example.open_nsfw_android.util |
||||
|
||||
import android.content.Context |
||||
import android.content.pm.PackageManager |
||||
|
||||
object PackageUtils { |
||||
/** |
||||
* 获取版本名称 |
||||
* |
||||
* @param context 上下文 |
||||
* |
||||
* @return 版本名称 |
||||
*/ |
||||
fun getVersionName(context: Context): String? { |
||||
|
||||
//获取包管理器 |
||||
val pm = context.packageManager |
||||
//获取包信息 |
||||
try { |
||||
val packageInfo = |
||||
pm.getPackageInfo(context.packageName, 0) |
||||
//返回版本号 |
||||
return packageInfo.versionName |
||||
} catch (e: PackageManager.NameNotFoundException) { |
||||
e.printStackTrace() |
||||
} |
||||
return null |
||||
} |
||||
|
||||
/** |
||||
* 获取版本号 |
||||
* |
||||
* @param context 上下文 |
||||
* |
||||
* @return 版本号 |
||||
*/ |
||||
fun getVersionCode(context: Context): Int { |
||||
|
||||
//获取包管理器 |
||||
val pm = context.packageManager |
||||
//获取包信息 |
||||
try { |
||||
val packageInfo = |
||||
pm.getPackageInfo(context.packageName, 0) |
||||
//返回版本号 |
||||
return packageInfo.versionCode |
||||
} catch (e: PackageManager.NameNotFoundException) { |
||||
e.printStackTrace() |
||||
} |
||||
return 0 |
||||
} |
||||
|
||||
/** |
||||
* 获取App的名称 |
||||
* |
||||
* @param context 上下文 |
||||
* |
||||
* @return 名称 |
||||
*/ |
||||
fun getAppName(context: Context): String? { |
||||
val pm = context.packageManager |
||||
//获取包信息 |
||||
try { |
||||
val packageInfo = |
||||
pm.getPackageInfo(context.packageName, 0) |
||||
//获取应用 信息 |
||||
val applicationInfo = packageInfo.applicationInfo |
||||
//获取albelRes |
||||
val labelRes = applicationInfo.labelRes |
||||
//返回App的名称 |
||||
return context.resources.getString(labelRes) |
||||
} catch (e: PackageManager.NameNotFoundException) { |
||||
e.printStackTrace() |
||||
} |
||||
return null |
||||
} |
||||
} |
@ -0,0 +1,188 @@ |
||||
package com.example.open_nsfw_android.view |
||||
|
||||
import android.annotation.SuppressLint |
||||
import android.graphics.BitmapFactory |
||||
import android.graphics.ImageFormat |
||||
import android.graphics.Rect |
||||
import android.graphics.YuvImage |
||||
import android.hardware.Camera |
||||
import android.os.Bundle |
||||
import android.support.v7.app.AppCompatActivity |
||||
import android.view.SurfaceHolder |
||||
import android.view.Window |
||||
import android.view.WindowManager |
||||
import android.widget.Toast |
||||
import com.example.open_nsfw_android.R |
||||
import getNsfwScore |
||||
import kotlinx.android.synthetic.main.cameraaty.* |
||||
import java.io.ByteArrayOutputStream |
||||
import java.io.IOException |
||||
import java.util.* |
||||
|
||||
class CameraActivity : AppCompatActivity(), SurfaceHolder.Callback, Camera.PreviewCallback { |
||||
|
||||
lateinit var mSurfaceHolder: SurfaceHolder |
||||
lateinit var mCamera: Camera |
||||
private var cameraId = 1 |
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) { |
||||
super.onCreate(savedInstanceState) |
||||
requestWindowFeature(Window.FEATURE_NO_TITLE); |
||||
window.setFlags( |
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN, |
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN |
||||
) |
||||
setContentView(R.layout.cameraaty) |
||||
|
||||
mSurfaceHolder = surfaceView.holder |
||||
mSurfaceHolder.addCallback(this) |
||||
iv_back.setOnClickListener { |
||||
try { |
||||
mCamera.setPreviewCallback(null) |
||||
mCamera.stopPreview() |
||||
mCamera.release() |
||||
} catch (e: Exception) { |
||||
} |
||||
finish() |
||||
} |
||||
} |
||||
|
||||
//翻转摄像机 |
||||
fun cameraSwitch() { |
||||
cameraId = if (cameraId == 1) 0 else 1 |
||||
mCamera.setPreviewCallback(null) |
||||
mCamera.stopPreview() |
||||
mCamera.release() |
||||
CameraOpen() |
||||
} |
||||
|
||||
|
||||
//打开照相机 |
||||
fun CameraOpen() { |
||||
try { |
||||
//打开摄像机 |
||||
mCamera = Camera.open(cameraId) |
||||
mCamera.setDisplayOrientation(90) |
||||
//绑定Surface并开启预览 |
||||
mCamera.setPreviewDisplay(mSurfaceHolder) |
||||
val parameters = mCamera.parameters |
||||
// val focusModes = parameters.supportedFocusModes |
||||
// val size = calculatePerfectSize( |
||||
// parameters.supportedPreviewSizes, |
||||
// 1024, 1024 |
||||
// ) |
||||
// surfaceView.layoutParams.width = size!!.width |
||||
// surfaceView.layoutParams.height = size.height |
||||
// |
||||
// parameters.setPreviewSize(size.width, size.height) |
||||
parameters.focusMode = "fixed" |
||||
mCamera.parameters = parameters |
||||
mCamera.startPreview() |
||||
mCamera.setPreviewCallback(this) |
||||
iv_change.setOnClickListener { cameraSwitch() } |
||||
} catch (e: IOException) { |
||||
mCamera.release() |
||||
Toast.makeText(this, "视图创建失败", Toast.LENGTH_SHORT).show() |
||||
} |
||||
} |
||||
|
||||
override fun surfaceChanged(holder: SurfaceHolder?, format: Int, width: Int, height: Int) { |
||||
val parameters = mCamera.parameters |
||||
mCamera.parameters = parameters |
||||
mCamera.startPreview() |
||||
} |
||||
|
||||
/** |
||||
* 计算最完美的Size |
||||
* @param sizes |
||||
* @param expectWidth |
||||
* @param expectHeight |
||||
* @return |
||||
*/ |
||||
fun calculatePerfectSize( |
||||
sizes: List<Camera.Size>, expectWidth: Int, |
||||
expectHeight: Int |
||||
): Camera.Size? { |
||||
sortList(sizes) // 根据宽度进行排序 |
||||
var result = sizes[0] |
||||
var widthOrHeight = false // 判断存在宽或高相等的Size |
||||
// 辗转计算宽高最接近的值 |
||||
for (size in sizes) { |
||||
// 如果宽高相等,则直接返回 |
||||
if (size.width == expectWidth && size.height == expectHeight) { |
||||
result = size |
||||
break |
||||
} |
||||
// 仅仅是宽度相等,计算高度最接近的size |
||||
if (size.width == expectWidth) { |
||||
widthOrHeight = true |
||||
if (Math.abs(result.height - expectHeight) |
||||
> Math.abs(size.height - expectHeight) |
||||
) { |
||||
result = size |
||||
} |
||||
} else if (size.height == expectHeight) { |
||||
widthOrHeight = true |
||||
if (Math.abs(result.width - expectWidth) |
||||
> Math.abs(size.width - expectWidth) |
||||
) { |
||||
result = size |
||||
} |
||||
} else if (!widthOrHeight) { |
||||
if (Math.abs(result.width - expectWidth) |
||||
> Math.abs(size.width - expectWidth) |
||||
&& Math.abs(result.height - expectHeight) |
||||
> Math.abs(size.height - expectHeight) |
||||
) { |
||||
result = size |
||||
} |
||||
} |
||||
} |
||||
return result |
||||
} |
||||
|
||||
/** |
||||
* 排序 |
||||
* @param list |
||||
*/ |
||||
private fun sortList(list: List<Camera.Size>) { |
||||
Collections.sort(list, object : Comparator<Camera.Size?> { |
||||
|
||||
override fun compare(pre: Camera.Size?, after: Camera.Size?): Int { |
||||
if (pre!!.width > after!!.width) { |
||||
return 1 |
||||
} else if (pre.width < after.width) { |
||||
return -1 |
||||
} |
||||
return 0 |
||||
} |
||||
}) |
||||
} |
||||
|
||||
|
||||
override fun surfaceDestroyed(holder: SurfaceHolder?) { |
||||
mCamera.stopPreview() |
||||
mCamera.release() |
||||
} |
||||
|
||||
|
||||
override fun surfaceCreated(holder: SurfaceHolder?) { |
||||
CameraOpen() |
||||
} |
||||
|
||||
@SuppressLint("SetTextI18n") |
||||
override fun onPreviewFrame(data: ByteArray?, camera: Camera?) { |
||||
mCamera.addCallbackBuffer(data) |
||||
|
||||
val size = mCamera.parameters.previewSize; |
||||
val image = YuvImage(data, ImageFormat.NV21, size.width, size.height, null); |
||||
val stream = ByteArrayOutputStream() |
||||
image.compressToJpeg(Rect(0, 0, size.width, size.height), 80, stream) |
||||
val bmp = BitmapFactory.decodeByteArray(stream.toByteArray(), 0, stream.size()) |
||||
bmp.getNsfwScore() |
||||
val spText = bmp.getNsfwScore().toString().split(",") |
||||
textView.text = spText[0] + "\n" + spText[1] |
||||
stream.close() |
||||
} |
||||
|
||||
} |
@ -0,0 +1,23 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:width="108dp" |
||||
android:height="108dp" |
||||
android:viewportWidth="1148.6849" |
||||
android:viewportHeight="1148.6849" |
||||
android:tint="#4749FF"> |
||||
<group android:translateX="219.66045" |
||||
android:translateY="484.58157"> |
||||
<group android:translateY="147.79688"> |
||||
<path android:pathData="M86.4,-98.208L86.4,-83.52C85.968,-41.616,71.424,-11.232,42.768,7.776L51.264,15.408C80.928,-5.472,96.048,-38.448,96.624,-83.52L96.624,-98.208L123.12,-98.208C122.832,-54.72,122.256,-28.8,121.392,-20.16C119.952,-5.76,114.624,1.584,105.552,1.584C100.944,1.584,95.328,1.296,88.992,1.008L91.584,10.512C98.784,10.8,103.968,11.088,107.136,11.088C121.536,11.088,129.744,2.016,131.472,-16.128C132.768,-27.792,133.488,-58.464,133.488,-108.144L58.32,-108.144L58.32,-98.208L86.4,-98.208ZM64.8,-85.248L34.704,-79.2L34.704,-115.632L24.048,-115.632L24.048,-77.04L5.04,-73.296L6.624,-63.216L24.048,-66.672L24.048,-25.056C24.048,-21.6,22.176,-19.152,18.432,-17.712L21.456,-7.632C37.872,-13.248,51.408,-19.584,62.352,-26.496L59.76,-35.856C51.408,-30.96,43.056,-26.784,34.704,-23.328L34.704,-68.832L66.528,-75.168L64.8,-85.248Z" |
||||
android:fillColor="#000000"/> |
||||
<path android:pathData="M273.168,-77.904L247.68,-77.904C252,-83.808,256.32,-91.008,260.496,-99.36L260.496,-106.848L229.968,-106.848C231.696,-110.16,233.136,-113.616,234.432,-117.216L224.352,-118.512C219.168,-104.832,209.376,-93.168,194.976,-83.664L201.024,-75.6C210.528,-82.08,218.448,-89.568,224.496,-97.92L249.552,-97.92C245.52,-90.288,241.344,-83.664,237.168,-77.904L204.336,-77.904L204.336,-38.736L194.112,-38.736L194.112,-29.232L227.664,-29.232C221.904,-14.832,209.232,-3.024,189.648,6.192L196.416,14.832C217.728,3.6,231.408,-10.368,237.456,-27.072C245.52,-9.792,259.2,4.32,278.208,14.976L282.96,5.184C265.968,-3.168,253.584,-14.544,245.952,-29.232L282.24,-29.232L282.24,-38.736L273.168,-38.736L273.168,-77.904ZM213.552,-38.736L213.552,-68.832L233.568,-68.832C233.28,-57.168,232.272,-47.088,230.544,-38.736L213.552,-38.736ZM240.48,-38.736C241.92,-46.8,242.784,-56.88,243.072,-68.832L263.952,-68.832L263.952,-38.736L240.48,-38.736ZM166.608,12.816C174.96,12.816,179.136,8.496,179.136,0L179.136,-41.616C184.32,-43.92,189.36,-46.512,194.4,-49.104L194.4,-59.616C189.36,-56.736,184.32,-54.144,179.136,-51.84L179.136,-81.216L193.824,-81.216L193.824,-91.152L179.136,-91.152L179.136,-117.504L168.768,-117.504L168.768,-91.152L151.632,-91.152L151.632,-81.216L168.768,-81.216L168.768,-47.664C162.288,-45.216,155.664,-43.2,148.896,-41.472L151.488,-31.104C157.248,-32.976,163.008,-34.992,168.768,-37.296L168.768,-2.592C168.768,1.44,166.752,3.6,163.008,3.6C159.552,3.6,155.952,3.312,152.208,2.88L154.368,12.816L166.608,12.816Z" |
||||
android:fillColor="#000000"/> |
||||
<path android:pathData="M310.032,13.104C318.24,13.104,322.416,8.928,322.416,0.864L322.416,-41.328C326.736,-43.344,330.912,-45.648,335.088,-47.952L335.088,-58.176C330.912,-55.728,326.736,-53.424,322.416,-51.408L322.416,-80.208L336.096,-80.208L336.096,-89.856L322.416,-89.856L322.416,-117.216L312.048,-117.216L312.048,-89.856L295.92,-89.856L295.92,-80.208L312.048,-80.208L312.048,-46.8C306,-44.352,299.664,-42.336,293.328,-40.608L295.92,-30.672C301.392,-32.4,306.72,-34.416,312.048,-36.72L312.048,-1.872C312.048,1.872,310.176,3.888,306.432,3.888C303.408,3.888,300.24,3.6,296.784,3.168L298.944,13.104L310.032,13.104ZM339.12,-112.608L339.12,-104.256L351.216,-104.256L351.216,-60.48C346.896,-60.48,342.432,-60.336,337.824,-60.048L339.84,-52.128C360.288,-52.992,379.728,-53.856,398.448,-54.864L398.448,-48.24L408.384,-48.24L408.384,-55.44L421.92,-56.304L421.92,-64.368C417.456,-64.08,412.992,-63.792,408.384,-63.36L408.384,-104.256L420.048,-104.256L420.048,-112.608L339.12,-112.608ZM361.008,-60.912L361.008,-71.28L398.448,-71.28L398.448,-62.784C386.208,-62.064,373.68,-61.488,361.008,-60.912ZM361.008,-78.192L361.008,-87.552L398.448,-87.552L398.448,-78.192L361.008,-78.192ZM361.008,-94.608L361.008,-104.256L398.448,-104.256L398.448,-94.608L361.008,-94.608ZM343.584,-30.096L337.248,-23.904C342.72,-19.152,347.616,-14.4,352.224,-9.792C347.04,-3.168,340.272,2.304,331.92,6.768L337.392,15.12C345.888,10.512,353.088,4.608,358.992,-2.592C362.448,1.296,365.472,5.184,368.208,8.928L375.264,1.728C371.952,-2.304,368.352,-6.336,364.464,-10.512C368.496,-17.712,371.52,-25.92,373.392,-35.28L373.392,-43.776L337.392,-43.776L337.392,-34.848L364.32,-34.848C362.736,-28.512,360.432,-22.752,357.552,-17.568C353.232,-21.744,348.48,-25.92,343.584,-30.096ZM379.152,-43.776L379.152,-34.848L382.752,-34.848C385.056,-24.624,389.232,-15.408,395.568,-7.2C390.096,-1.728,383.472,3.024,375.552,6.912L380.88,15.12C388.944,11.088,396,6.048,402.048,0.144C407.232,5.328,413.424,9.936,420.912,14.256L426.096,6.048C419.04,2.304,412.992,-1.872,407.808,-6.624C413.856,-14.688,418.032,-24.336,420.48,-35.28L420.48,-43.776L379.152,-43.776ZM391.248,-34.848L410.976,-34.848C408.816,-27.072,405.504,-20.16,401.184,-13.968C396.432,-20.16,393.12,-27.072,391.248,-34.848Z" |
||||
android:fillColor="#000000"/> |
||||
<path android:pathData="M482.256,-83.376L482.256,-57.456L505.872,-57.456C498.384,-50.4,487.872,-45.36,474.192,-42.48L478.08,-33.84C492.192,-37.008,503.712,-42.624,512.352,-50.544C514.368,-48.24,516.384,-45.792,518.112,-43.2C507.744,-34.272,493.056,-26.928,474.048,-21.168L479.088,-12.672C497.232,-18.72,511.632,-26.64,522.288,-36.144C523.584,-33.408,524.736,-30.384,525.744,-27.216C513.36,-15.696,496.08,-6.192,473.616,1.008L478.8,9.936C498.96,2.736,515.232,-6.624,527.616,-17.856C527.76,-16.128,527.904,-14.4,527.904,-12.528C527.904,-5.616,526.896,-1.008,525.168,1.296C523.152,3.6,520.56,4.752,517.392,5.04C514.512,5.184,511.056,5.328,506.88,5.328L509.904,14.688C513.072,14.688,515.952,14.544,518.544,14.256C525.744,13.392,530.784,11.232,533.52,8.064C536.688,4.176,538.272,-2.736,538.272,-12.528C537.984,-18,537.12,-23.184,535.68,-28.368C537.552,-29.232,539.424,-30.096,541.44,-30.96C546.048,-16.704,553.536,-3.744,564.048,8.064L570.816,-0.432C560.448,-10.512,553.248,-22.032,549.216,-34.992C554.688,-38.016,559.584,-41.472,564.048,-45.36L557.28,-53.136C550.656,-46.8,542.304,-41.472,532.512,-37.152C529.344,-44.352,524.592,-50.976,518.4,-57.312L518.544,-57.456L561.6,-57.456L561.6,-88.848L534.816,-88.848C538.56,-92.448,542.304,-96.624,546.048,-101.52L546.048,-108.288L509.904,-108.288C511.92,-110.736,513.792,-113.328,515.808,-116.208L505.152,-118.656C496.224,-105.84,484.56,-95.472,470.448,-87.696L476.784,-79.92C478.512,-81.072,480.24,-82.224,482.256,-83.376ZM521.712,-88.848L489.888,-88.848C494.208,-92.304,498.528,-96.048,502.704,-100.224L533.952,-100.224C529.92,-96.192,525.888,-92.304,521.712,-88.848ZM551.52,-65.952L523.728,-65.952C525.744,-70.272,527.472,-75.168,528.624,-80.352L551.52,-80.352L551.52,-65.952ZM512.784,-65.952L492.336,-65.952L492.336,-80.352L518.544,-80.352C517.392,-75.168,515.376,-70.416,512.784,-65.952ZM454.32,-66.816L454.32,14.256L464.832,14.256L464.832,-85.392C469.152,-94.32,472.896,-103.824,475.776,-113.76L466.128,-118.368C460.08,-96.192,450.576,-76.464,437.328,-59.328L440.64,-48.384C445.536,-54.288,450.144,-60.48,454.32,-66.816Z" |
||||
android:fillColor="#000000"/> |
||||
<path android:pathData="M585.936,-50.112L585.936,-40.032L646.848,-40.032C644.544,-34.272,641.664,-28.944,638.208,-24.048C628.416,-11.808,610.848,-2.016,585.792,5.472L591.408,14.256C616.464,6.768,634.464,-3.456,645.552,-16.704C647.136,-18.864,648.72,-21.168,650.16,-23.472C672.336,-10.224,689.76,2.448,702.72,14.256L710.208,6.912C695.088,-5.76,676.512,-18.576,654.48,-31.392C655.776,-34.128,656.928,-37.008,657.936,-40.032L710.928,-40.032L710.928,-50.112L660.672,-50.112C662.256,-57.312,663.264,-65.088,663.552,-73.728L663.552,-117.36L653.04,-117.36L653.04,-73.728C652.752,-65.376,651.744,-57.456,650.016,-50.112L585.936,-50.112ZM597.6,-86.544L592.128,-78.48C603.216,-73.728,614.016,-67.248,624.528,-59.184L630.144,-67.68C620.352,-75.168,609.408,-81.36,597.6,-86.544ZM613.44,-109.728L607.968,-101.664C617.472,-97.632,626.688,-92.16,635.76,-84.96L641.232,-93.312C632.88,-99.648,623.52,-105.12,613.44,-109.728Z" |
||||
android:fillColor="#000000"/> |
||||
</group> |
||||
</group> |
||||
</vector> |
@ -0,0 +1,74 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<vector |
||||
android:height="108dp" |
||||
android:width="108dp" |
||||
android:viewportHeight="108" |
||||
android:viewportWidth="108" |
||||
xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<path android:fillColor="#3DDC84" |
||||
android:pathData="M0,0h108v108h-108z"/> |
||||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M19,0L19,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M29,0L29,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M39,0L39,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M49,0L49,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M59,0L59,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M69,0L69,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M79,0L79,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M89,0L89,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M99,0L99,108" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,9L108,9" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,19L108,19" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,29L108,29" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,39L108,39" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,49L108,49" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,59L108,59" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,69L108,69" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,79L108,79" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,89L108,89" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M0,99L108,99" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M19,29L89,29" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M19,39L89,39" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M19,49L89,49" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M19,59L89,59" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M19,69L89,69" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M19,79L89,79" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M29,19L29,89" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M39,19L39,89" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M49,19L49,89" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M59,19L59,89" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M69,19L69,89" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
<path android:fillColor="#00000000" android:pathData="M79,19L79,89" |
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> |
||||
</vector> |
@ -0,0 +1,5 @@ |
||||
<vector android:alpha="0.57" android:height="24dp" |
||||
android:tint="#0A0033" android:viewportHeight="24.0" |
||||
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<path android:fillColor="#FF000000" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> |
||||
</vector> |
@ -0,0 +1,5 @@ |
||||
<vector android:alpha="0.57" android:height="24dp" |
||||
android:tint="#FB2516" android:viewportHeight="24.0" |
||||
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<path android:fillColor="#FF000000" android:pathData="M9.4,10.5l4.77,-8.26C13.47,2.09 12.75,2 12,2c-2.4,0 -4.6,0.85 -6.32,2.25l3.66,6.35 0.06,-0.1zM21.54,9c-0.92,-2.92 -3.15,-5.26 -6,-6.34L11.88,9h9.66zM21.8,10h-7.49l0.29,0.5 4.76,8.25C21,16.97 22,14.61 22,12c0,-0.69 -0.07,-1.35 -0.2,-2zM8.54,12l-3.9,-6.75C3.01,7.03 2,9.39 2,12c0,0.69 0.07,1.35 0.2,2h7.49l-1.15,-2zM2.46,15c0.92,2.92 3.15,5.26 6,6.34L12.12,15L2.46,15zM13.73,15l-3.9,6.76c0.7,0.15 1.42,0.24 2.17,0.24 2.4,0 4.6,-0.85 6.32,-2.25l-3.66,-6.35 -0.93,1.6z"/> |
||||
</vector> |
@ -0,0 +1,40 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent"> |
||||
|
||||
<SurfaceView |
||||
android:id="@+id/surfaceView" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:padding="25dp" /> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_back" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginLeft="25dp" |
||||
android:layout_marginTop="25dp" |
||||
android:src="@drawable/ic_arrow_back_black_24dp" /> |
||||
|
||||
<ImageView |
||||
android:id="@+id/iv_change" |
||||
android:layout_width="45dp" |
||||
android:layout_height="45dp" |
||||
android:layout_alignParentBottom="true" |
||||
android:layout_centerHorizontal="true" |
||||
android:layout_marginRight="20dp" |
||||
android:layout_marginBottom="20dp" |
||||
android:src="@drawable/ic_camera_black_24dp" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/textView" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_above="@+id/iv_change" |
||||
android:layout_alignParentBottom="true" |
||||
android:layout_centerHorizontal="true" |
||||
android:layout_marginBottom="93dp" |
||||
android:text="适宜度:\n不适宜度:" |
||||
android:textColor="#008DFD" /> |
||||
</RelativeLayout> |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<background android:drawable="@drawable/change_background"/> |
||||
<foreground android:drawable="@drawable/ch"/> |
||||
</adaptive-icon> |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<background android:drawable="@drawable/change_background"/> |
||||
<foreground android:drawable="@drawable/ch"/> |
||||
</adaptive-icon> |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 17 KiB |