no_apply
This commit is contained in:
parent
7fc42259a9
commit
5d67f8e7ca
15
.idea/deploymentTargetDropDown.xml
generated
15
.idea/deploymentTargetDropDown.xml
generated
@ -3,7 +3,20 @@
|
||||
<component name="deploymentTargetDropDown">
|
||||
<value>
|
||||
<entry key="app">
|
||||
<State />
|
||||
<State>
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="ZX1G22HXL8" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2024-04-03T03:35:41.455486600Z" />
|
||||
</State>
|
||||
</entry>
|
||||
</value>
|
||||
</component>
|
||||
|
||||
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
|
||||
@ -52,4 +52,7 @@ dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -2,11 +2,9 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
@ -26,6 +24,9 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".activity.DetailsActivity" />
|
||||
<activity android:name=".activity.ApplyActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -0,0 +1,36 @@
|
||||
package com.timber.soft.newkeyboard.activity
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.timber.soft.newkeyboard.databinding.ActivityApplyBinding
|
||||
import com.timber.soft.newkeyboard.tools.StatusBarTools
|
||||
|
||||
class ApplyActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: ActivityApplyBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityApplyBinding.inflate(layoutInflater)
|
||||
val view = binding.root
|
||||
setContentView(view)
|
||||
// 设置Padding上边距留出沉浸式状态栏空间
|
||||
binding.root.setPadding(0, StatusBarTools.dpCovertPx(this), 0, 0)
|
||||
// 设置沉浸式状态栏
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.decorView.systemUiVisibility =
|
||||
(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE) or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
||||
window.statusBarColor = Color.TRANSPARENT
|
||||
}
|
||||
|
||||
|
||||
binding.applyBack.setOnClickListener() {
|
||||
finish()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package com.timber.soft.newkeyboard.activity
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.DataSource
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.load.engine.GlideException
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||
import com.bumptech.glide.request.RequestListener
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import com.timber.soft.newkeyboard.R
|
||||
import com.timber.soft.newkeyboard.databinding.ActivityDetailsBinding
|
||||
import com.timber.soft.newkeyboard.model.DataModel
|
||||
import com.timber.soft.newkeyboard.tools.StatusBarTools
|
||||
|
||||
class DetailsActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: ActivityDetailsBinding
|
||||
private lateinit var previewUrl: String
|
||||
private lateinit var zipPath: String
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityDetailsBinding.inflate(layoutInflater)
|
||||
val view = binding.root
|
||||
setContentView(view)
|
||||
// 设置Padding上边距留出沉浸式状态栏空间
|
||||
binding.root.setPadding(0, StatusBarTools.dpCovertPx(this), 0, 0)
|
||||
// 设置沉浸式状态栏
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.decorView.systemUiVisibility =
|
||||
(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE) or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
||||
window.statusBarColor = Color.TRANSPARENT
|
||||
}
|
||||
|
||||
val dataModel = intent.getSerializableExtra("KEY_EXTRA") as DataModel
|
||||
previewUrl = dataModel.thumb
|
||||
zipPath = dataModel.zipUrl
|
||||
|
||||
|
||||
|
||||
binding.detailsBack.setOnClickListener(View.OnClickListener {
|
||||
finish()
|
||||
})
|
||||
binding.themeSet.setOnClickListener(View.OnClickListener {
|
||||
applyTheme()
|
||||
})
|
||||
binding.themeName.text = dataModel.title
|
||||
|
||||
|
||||
|
||||
binding.themePreloading.visibility = View.VISIBLE
|
||||
val radius = 80 // 圆角半径,单位为像素
|
||||
val transformation = RoundedCorners(radius)
|
||||
try {
|
||||
Glide.with(this@DetailsActivity).load(previewUrl)
|
||||
// 缓存
|
||||
// .diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.addListener(object : RequestListener<Drawable> {
|
||||
override fun onLoadFailed(
|
||||
e: GlideException?,
|
||||
model: Any?,
|
||||
target: Target<Drawable>?,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
binding.themePreloading.visibility = View.GONE
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onResourceReady(
|
||||
resource: Drawable?,
|
||||
model: Any?,
|
||||
target: Target<Drawable>?,
|
||||
dataSource: DataSource?,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
binding.themePreloading.visibility = View.GONE
|
||||
return false
|
||||
}
|
||||
})
|
||||
// 淡入动画
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
// 加载失败占位图
|
||||
.error(R.drawable.png_loading_err)
|
||||
.transform(transformation)
|
||||
.into(binding.themeImage)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun applyTheme() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -155,6 +155,10 @@ class MainActivity : AppCompatActivity() {
|
||||
intent.putExtra(Intent.EXTRA_TEXT, url)
|
||||
startActivity(intent)
|
||||
}
|
||||
binding.layoutSet.setOnClickListener() {
|
||||
val intent = Intent(this, ApplyActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
// 绑定抽屉中的版本信息
|
||||
val versionName = getVersionName()
|
||||
binding.textAppVersion.text = versionName
|
||||
|
||||
@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.timber.soft.newkeyboard.R
|
||||
import com.timber.soft.newkeyboard.model.DataModel
|
||||
import com.timber.soft.newkeyboard.model.RootModel
|
||||
@ -22,20 +23,23 @@ class MyPagerAdapter(
|
||||
private val dataModels = model.list
|
||||
|
||||
inner class PreViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
/**
|
||||
* 640*444
|
||||
*/
|
||||
fun loadPreImg(context: Context, thumb: String, imgItemView: ImageView) {
|
||||
try {
|
||||
Glide.with(context).load(thumb)
|
||||
// 缓存
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
// 加载占位图
|
||||
// .apply(
|
||||
// RequestOptions().placeholder(R.drawable.img_loading)
|
||||
// )
|
||||
.apply(
|
||||
RequestOptions().placeholder(R.drawable.png_loading)
|
||||
)
|
||||
// 淡入动画
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
// 加载失败占位图
|
||||
// .error(R.drawable.img_loading_err)
|
||||
.into(imgItemView)
|
||||
.error(R.drawable.png_loading_err).into(imgItemView)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
@ -11,8 +11,8 @@ import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager
|
||||
import androidx.viewpager.widget.PagerAdapter
|
||||
import com.timber.soft.newkeyboard.R
|
||||
import com.timber.soft.newkeyboard.activity.DetailsActivity
|
||||
import com.timber.soft.newkeyboard.adapter.MyPagerAdapter
|
||||
import com.timber.soft.newkeyboard.model.DataModel
|
||||
import com.timber.soft.newkeyboard.model.RootModel
|
||||
@ -32,15 +32,10 @@ class VPFragment(private val rootModel: RootModel) : Fragment() {
|
||||
requireContext(), rootModel,
|
||||
object : MyPagerAdapter.OnItemClickListener {
|
||||
override fun onItemClick(position: Int, dataModel: DataModel) {
|
||||
// val intent = Intent(requireContext(), SetImgActivity::class.java)
|
||||
// intent.putExtra("KEY_EXTRA", dataModel)
|
||||
|
||||
Log.e("onClick", "item has been click!")
|
||||
Toast.makeText(
|
||||
context,
|
||||
"item has been click!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
val intent = Intent(requireContext(), DetailsActivity::class.java)
|
||||
intent.putExtra("KEY_EXTRA", dataModel)
|
||||
startActivity(intent)
|
||||
Log.d("onClick", "item has been click!")
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
package com.timber.soft.newkeyboard.tools
|
||||
|
||||
object ImgTools {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
BIN
app/src/main/res/drawable/png_loading.png
Normal file
BIN
app/src/main/res/drawable/png_loading.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/drawable/png_loading_err.png
Normal file
BIN
app/src/main/res/drawable/png_loading_err.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
7
app/src/main/res/drawable/shape_theme_set.xml
Normal file
7
app/src/main/res/drawable/shape_theme_set.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/theme_color"/>
|
||||
<corners android:radius="10dp"/>
|
||||
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/svg_img_err.xml
Normal file
9
app/src/main/res/drawable/svg_img_err.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M725.3,85.3a213.3,213.3 0,0 1,213.1 204.1L938.7,298.7v174.5a42.7,42.7 0,0 1,-85 4.9L853.3,473.2L853.3,298.7a128,128 0,0 0,-120.5 -127.8L725.3,170.7L213.3,170.7a128,128 0,0 0,-127.8 120.5L85.3,298.7v426.7a128,128 0,0 0,106.4 126.2l26.8,-28.3 245.7,-245.7a128,128 0,0 1,174.8 -5.8l6.1,5.8 77.2,77.2a42.7,42.7 0,0 1,-56.3 63.8l-4.1,-3.5 -77.2,-77.2a42.7,42.7 0,0 0,-56.3 -3.5l-4,3.5L308.9,853.3L725.3,853.3a42.7,42.7 0,0 1,5 85L725.3,938.7L209.2,938.7c-1.2,0 -2.3,0 -3.5,-0.1L213.3,938.7a213.3,213.3 0,0 1,-213.1 -204.1L0,725.3L0,298.7a213.3,213.3 0,0 1,204.1 -213.1L213.3,85.3h512zM821,590l60.3,60.4 60.3,-60.4a42.7,42.7 0,0 1,60.3 60.4l-60.3,60.3 60.3,60.3a42.7,42.7 0,0 1,-60.3 60.3l-60.3,-60.3 -60.3,60.3a42.7,42.7 0,0 1,-60.4 -60.3l60.4,-60.3 -60.4,-60.3a42.7,42.7 0,0 1,60.4 -60.4zM298.7,298.7a85.3,85.3 0,1 1,0 170.7,85.3 85.3,0 0,1 0,-170.7z"
|
||||
android:fillColor="#BB86FC"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/svg_loading.xml
Normal file
9
app/src/main/res/drawable/svg_loading.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M782.1,901.7c10.9,18.4 4.8,43 -14.3,53.4 -18.7,10.9 -42.5,4.5 -53.1,-14.3 -11.4,-18.4 -4.8,-42.5 13.7,-53.4 19.4,-10.8 42.8,-4.2 53.7,14.3zM551.7,984.9c0,21.3 -17.6,39.1 -39.7,39.1 -21.3,0 -39.1,-17.4 -39.1,-39.1v-27.4c0,-21.8 17.9,-39.2 39.1,-39.2 21.8,0 39.7,17.4 39.7,39.2v27.4zM310.6,940.8c-11.1,19.3 -35.2,25.4 -53.7,14.5 -19,-10.7 -25.7,-34.6 -14.5,-53.7l29.1,-50.9c11.2,-18.7 35.2,-25.2 54.2,-14.5 18.4,10.9 25.2,35.2 14,53.7l-29.1,50.9zM123.4,782.8c-19,10.6 -43.3,4.2 -53.7,-14.5 -11.1,-18.4 -4.8,-42.8 14,-53.7l78.1,-45.3c18.7,-10.4 43,-4.5 53.7,14.5 10.6,18.4 4.1,42.8 -14.5,53.7l-77.6,45.3zM40.3,551.8c-21.8,0 -39.1,-17.6 -39.1,-39.1 0,-21.8 17.3,-39.4 39.1,-39.4h121.7c21.8,0 39.1,17.6 39.1,39.1 0,21.8 -17.3,39.4 -39.1,39.4L40.3,551.8zM83.8,310.3c-19,-10.6 -25.2,-34.6 -14,-53.4 10.4,-19 34.6,-25.4 53.7,-14.5L255.8,319.3c18.7,10.7 24.9,34.6 14.5,53.1 -11.1,19 -35.2,25.1 -53.6,14.5l-132.9,-76.5zM242.4,123.2l92.1,160c11.2,18.7 35.2,25.4 53.9,14.3 18.7,-10.6 24.9,-34.9 14,-53.7L309.9,84.1C299.3,65.7 275.3,59 256.8,69.9c-19,10.9 -25.1,35 -14.4,53.4zM473.1,40.6c0,-21.3 17.9,-39.4 39.1,-39.4 21.8,0 39.7,17.7 39.7,39.4L551.8,224.8c0,21.8 -17.6,39.4 -39.7,39.7 -21.3,0 -39.1,-17.3 -39.1,-39.7L473.1,40.6zM714.2,84.1c11.2,-19 34.9,-25.2 53.7,-14.5 19,10.6 25.7,34.6 14.5,53.7l-92.3,160c-10.4,18.7 -35,25.3 -53.7,14.5 -18.7,-10.9 -24.9,-35.2 -14.3,-54l92.1,-159.7zM901.9,242.4L741.7,334.8c-18.7,10.6 -25.2,34.6 -14.5,53.7 11.1,18.4 35.2,24.6 53.7,14.3l160.3,-92.3c18.4,-10.6 25.2,-34.6 14,-53.4 -10.8,-19 -34.9,-25.8 -53.3,-14.6zM984.2,473.4c22,0 39.4,17.6 39.1,39.4 0,21.5 -17,39.1 -39.1,39.1L799.8,551.8c-21.3,0 -39.2,-17.6 -39.2,-39.4 0,-21.5 17.9,-39.1 39.2,-39.1h184.5z"
|
||||
android:fillColor="#BB86FC"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/svg_set.xml
Normal file
9
app/src/main/res/drawable/svg_set.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M925.6,443.1h-41.4c-19,0 -39.1,-14.8 -44.7,-32.9l-23.7,-57.7c-9,-16.7 -5.3,-41.3 8,-54.7l29.4,-29.3c13.4,-13.5 13.4,-35.4 0,-48.8L804.4,171c-13.4,-13.4 -35.3,-13.4 -48.8,0l-29.3,29.3c-13.4,13.4 -38,17.1 -54.8,8.1l-57.6,-23.7C595.8,179.1 581,159 581,140V98.5c0,-18.9 -15.6,-34.5 -34.4,-34.5h-68.9c-19,0 -34.5,15.6 -34.5,34.5v41.4c0,19 -14.8,39.1 -32.9,44.7l-57.7,23.7c-16.7,9 -41.3,5.3 -54.7,-8.1l-29.4,-29.3c-13.4,-13.4 -35.3,-13.4 -48.7,0l-48.7,48.7c-13.4,13.4 -13.4,35.4 0,48.8l29.3,29.3c13.5,13.4 17.1,38 8.1,54.7l-23.7,57.7c-5.6,18.1 -25.7,32.9 -44.7,32.9H98.8c-19,0 -34.5,15.5 -34.5,34.5v68.9c0,19 15.5,34.5 34.5,34.5h41.3c19,0 39,14.9 44.6,32.9l23.8,57.7c8.9,16.7 5.3,41.4 -8.1,54.8l-29.3,29.3c-13.3,13.4 -13.3,35.3 0,48.8l48.8,48.8c13.4,13.4 35.3,13.4 48.7,0l29.4,-29.3c13.3,-13.4 38,-17 54.6,-8l57.8,23.7c18.1,5.6 32.9,25.7 32.9,44.7v41.2c0,18.9 15.5,34.5 34.5,34.5h68.9c18.9,0 34.4,-15.5 34.4,-34.5v-41.2c0,-19 14.9,-39.1 32.9,-44.7l57.7,-23.7c16.7,-9 41.4,-5.4 54.8,8l29.2,29.3c13.4,13.4 35.4,13.4 48.8,0l48.8,-48.8c13.4,-13.4 13.4,-35.4 0,-48.8l-29.4,-29.3c-13.3,-13.3 -17,-38 -8,-54.8l23.7,-57.7c5.7,-18.1 25.8,-32.9 44.7,-32.9h41.4c18.9,0 34.4,-15.5 34.4,-34.5v-69c-0.1,-18.8 -15.6,-34.3 -34.5,-34.3m-241.2,68.8c0,95.2 -77.1,172.3 -172.3,172.3 -95.2,0 -172.3,-77.1 -172.3,-172.3 0,-95.1 77.1,-172.3 172.3,-172.3 95.2,0.1 172.3,77.2 172.3,172.3"
|
||||
android:fillColor="#2c2c2c"/>
|
||||
</vector>
|
||||
83
app/src/main/res/layout/activity_apply.xml
Normal file
83
app/src/main/res/layout/activity_apply.xml
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
tools:context=".activity.DetailsActivity">
|
||||
|
||||
<!--主视图-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/backgroundLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/apply_back"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/svg_return"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/theme_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/apply_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id_hint"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/backgroundLayout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:text="@string/more_feature"
|
||||
android:textColor="@color/theme_color"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id_step1"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_below="@id/id_hint"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="96dp"
|
||||
android:background="@drawable/shape_theme_set"
|
||||
android:gravity="center"
|
||||
android:text="@string/apply_step1_select"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id_step2"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_below="@id/id_step1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="26dp"
|
||||
android:background="@drawable/shape_theme_set"
|
||||
android:gravity="center"
|
||||
android:text="@string/apply_step2_eanble"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
81
app/src/main/res/layout/activity_details.xml
Normal file
81
app/src/main/res/layout/activity_details.xml
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
tools:context=".activity.DetailsActivity">
|
||||
|
||||
<!--主视图-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/backgroundLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/details_back"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="5dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/svg_return"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/theme_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/theme_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="260dp"
|
||||
android:layout_below="@id/backgroundLayout"
|
||||
android:layout_marginTop="25dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/theme_set"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="43dp"
|
||||
android:layout_below="@id/theme_image"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/shape_theme_set"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_apply"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/theme_progressbar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/theme_set"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:indeterminateTint="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/theme_preloading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/theme_image"
|
||||
android:layout_alignBottom="@id/theme_image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:indeterminateTint="@color/theme_color" />
|
||||
</RelativeLayout>
|
||||
@ -45,7 +45,7 @@
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
@ -177,6 +177,32 @@
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutSet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_below="@id/layoutShare"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_set"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/svg_set" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/main_menu_share"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/image_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="156dp"
|
||||
android:layout_height="140dp"
|
||||
android:scaleType="fitXY" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
@ -2,5 +2,11 @@
|
||||
<string name="app_name">NewKeyboard</string>
|
||||
<string name="main_menu_share">Share our Apps</string>
|
||||
<string name="main_menu_rate">Find us in store</string>
|
||||
<string name="main_menu_set">Setting</string>
|
||||
<string name="share_link">https://play.google.com/store/apps/details?id=</string>
|
||||
<string name="download_apply">Download & Apply</string>
|
||||
<string name="apply_title">Applying</string>
|
||||
<string name="more_feature">Activate Soft Keyboard to enable more features!</string>
|
||||
<string name="apply_step1_select">Step 1: Select</string>
|
||||
<string name="apply_step2_eanble">Step 2: Enable</string>
|
||||
</resources>
|
||||
Loading…
Reference in New Issue
Block a user