rele-per-2

This commit is contained in:
LUX-Timber 2024-04-08 10:36:09 +08:00
parent b3af89b9a9
commit 5396a2c41f
18 changed files with 41 additions and 43 deletions

View File

@ -3,7 +3,20 @@
<component name="deploymentTargetDropDown"> <component name="deploymentTargetDropDown">
<value> <value>
<entry key="app"> <entry key="app">
<State /> <State>
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\timbe\.android\avd\Pixel_8_API_34.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-04-08T02:01:13.600126200Z" />
</State>
</entry> </entry>
</value> </value>
</component> </component>

View File

@ -19,7 +19,7 @@ android {
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }

View File

@ -19,3 +19,4 @@
# If you keep the line number information, uncomment this to # If you keep the line number information, uncomment this to
# hide the original source file name. # hide the original source file name.
#-renamesourcefileattribute SourceFile #-renamesourcefileattribute SourceFile

View File

@ -16,7 +16,7 @@
android:theme="@style/Theme.NewKeyboard" android:theme="@style/Theme.NewKeyboard"
tools:targetApi="31"> tools:targetApi="31">
<activity <activity
android:name=".activity.MainActivity" android:name=".activityandview.MainActivity"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -38,10 +38,10 @@
</service> </service>
<activity <activity
android:name=".activity.DetailsActivity" android:name=".activityandview.DetailsActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".activity.ApplyActivity" android:name=".activityandview.ApplyActivity"
android:exported="false" /> android:exported="false" />
</application> </application>

View File

@ -1,4 +1,4 @@
package com.timber.soft.newkeyboard.activity package com.timber.soft.newkeyboard.activityandview
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
@ -67,7 +67,6 @@ class ApplyActivity : AppCompatActivity(), View.OnClickListener {
updateUi() updateUi()
listener = StepReceive() listener = StepReceive()
register() register()
binding.idStep1.setOnClickListener(this) binding.idStep1.setOnClickListener(this)
binding.idStep2.setOnClickListener(this) binding.idStep2.setOnClickListener(this)
binding.applyBack.setOnClickListener(this) binding.applyBack.setOnClickListener(this)

View File

@ -1,4 +1,4 @@
package com.timber.soft.newkeyboard.activity package com.timber.soft.newkeyboard.activityandview
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
@ -23,7 +23,7 @@ import com.bumptech.glide.request.target.Target
import com.timber.soft.newkeyboard.R import com.timber.soft.newkeyboard.R
import com.timber.soft.newkeyboard.databinding.ActivityDetailsBinding import com.timber.soft.newkeyboard.databinding.ActivityDetailsBinding
import com.timber.soft.newkeyboard.listener.ApplyListener import com.timber.soft.newkeyboard.listener.ApplyListener
import com.timber.soft.newkeyboard.model.DataModel import com.timber.soft.newkeyboard.tools.DataModel
import com.timber.soft.newkeyboard.tools.AppVal import com.timber.soft.newkeyboard.tools.AppVal
import com.timber.soft.newkeyboard.tools.StatusBarTools import com.timber.soft.newkeyboard.tools.StatusBarTools
import net.sf.sevenzipjbinding.ArchiveFormat import net.sf.sevenzipjbinding.ArchiveFormat
@ -266,7 +266,6 @@ class DetailsActivity : AppCompatActivity(), ApplyListener {
} }
private fun getAllThemePath(zip: String): String { private fun getAllThemePath(zip: String): String {
val result = sp.getString(zip, "") val result = sp.getString(zip, "")
return result!! return result!!

View File

@ -1,4 +1,4 @@
package com.timber.soft.newkeyboard.activity package com.timber.soft.newkeyboard.activityandview
import android.content.Intent import android.content.Intent
import android.content.pm.PackageInfo import android.content.pm.PackageInfo
@ -20,13 +20,12 @@ import androidx.core.view.GravityCompat
import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter import androidx.fragment.app.FragmentPagerAdapter
import com.google.android.material.button.MaterialButtonToggleGroup
import com.google.android.material.tabs.TabLayout import com.google.android.material.tabs.TabLayout
import com.timber.soft.newkeyboard.R import com.timber.soft.newkeyboard.R
import com.timber.soft.newkeyboard.databinding.ActivityMainBinding import com.timber.soft.newkeyboard.databinding.ActivityMainBinding
import com.timber.soft.newkeyboard.fragment.VPFragment import com.timber.soft.newkeyboard.fragment.VPFragment
import com.timber.soft.newkeyboard.model.JsonDeserializer.parseJsonFromAssets import com.timber.soft.newkeyboard.tools.JsonDeserializer.parseJsonFromAssets
import com.timber.soft.newkeyboard.model.RootModel import com.timber.soft.newkeyboard.tools.RootModel
import com.timber.soft.newkeyboard.tools.StatusBarTools.dpCovertPx import com.timber.soft.newkeyboard.tools.StatusBarTools.dpCovertPx
class MainActivity : AppCompatActivity() { class MainActivity : AppCompatActivity() {
@ -79,17 +78,6 @@ class MainActivity : AppCompatActivity() {
} }
binding.tabLayout.setupWithViewPager(binding.viewpager) binding.tabLayout.setupWithViewPager(binding.viewpager)
// val toggleGroup = findViewById<MaterialButtonToggleGroup>(R.id.toggle_group)
// toggleGroup.addOnButtonCheckedListener { group, checkedId, isChecked ->
// if (isChecked) {
// when (checkedId) {
// R.id.bt1 -> binding.drawerParent.closeDrawer(GravityCompat.END)
// R.id.bt2 -> binding.drawerParent.openDrawer(GravityCompat.END)
// }
// }
// }
binding.bt1.setOnClickListener(){ binding.bt1.setOnClickListener(){
binding.drawerParent.closeDrawer(GravityCompat.END) binding.drawerParent.closeDrawer(GravityCompat.END)
} }

View File

@ -1,4 +1,4 @@
package com.timber.soft.newkeyboard.view package com.timber.soft.newkeyboard.activityandview
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context

View File

@ -1,4 +1,4 @@
package com.timber.soft.newkeyboard.adapter package com.timber.soft.newkeyboard.fragment
import android.content.Context import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
@ -12,8 +12,8 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.timber.soft.newkeyboard.R import com.timber.soft.newkeyboard.R
import com.timber.soft.newkeyboard.model.DataModel import com.timber.soft.newkeyboard.tools.DataModel
import com.timber.soft.newkeyboard.model.RootModel import com.timber.soft.newkeyboard.tools.RootModel
class MyPagerAdapter( class MyPagerAdapter(
private val context: Context, private val context: Context,
@ -55,12 +55,12 @@ class MyPagerAdapter(
override fun onCreateViewHolder( override fun onCreateViewHolder(
parent: ViewGroup, viewType: Int parent: ViewGroup, viewType: Int
): MyPagerAdapter.PreViewHolder { ): PreViewHolder {
val view = LayoutInflater.from(context).inflate(R.layout.item_pre_img, parent, false) val view = LayoutInflater.from(context).inflate(R.layout.item_pre_img, parent, false)
return PreViewHolder(view) return PreViewHolder(view)
} }
override fun onBindViewHolder(holder: MyPagerAdapter.PreViewHolder, position: Int) { override fun onBindViewHolder(holder: PreViewHolder, position: Int) {
val dataModel = dataModels[position % dataModels.size] val dataModel = dataModels[position % dataModels.size]
holder.loadPreImg(context, dataModel.thumb, holder.imgItemView) holder.loadPreImg(context, dataModel.thumb, holder.imgItemView)

View File

@ -6,16 +6,14 @@ import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager import androidx.recyclerview.widget.StaggeredGridLayoutManager
import com.timber.soft.newkeyboard.R import com.timber.soft.newkeyboard.R
import com.timber.soft.newkeyboard.activity.DetailsActivity import com.timber.soft.newkeyboard.activityandview.DetailsActivity
import com.timber.soft.newkeyboard.adapter.MyPagerAdapter import com.timber.soft.newkeyboard.tools.DataModel
import com.timber.soft.newkeyboard.model.DataModel import com.timber.soft.newkeyboard.tools.RootModel
import com.timber.soft.newkeyboard.model.RootModel
class VPFragment(private val rootModel: RootModel) : Fragment() { class VPFragment(private val rootModel: RootModel) : Fragment() {

View File

@ -1,4 +1,4 @@
package com.timber.soft.newkeyboard.model package com.timber.soft.newkeyboard.tools
import android.content.Context import android.content.Context
import com.google.gson.Gson import com.google.gson.Gson

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingStart="12dp" android:paddingStart="12dp"
android:paddingEnd="12dp" android:paddingEnd="12dp"
tools:context=".activity.DetailsActivity"> tools:context=".activityandview.DetailsActivity">
<!--主视图--> <!--主视图-->
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingStart="12dp" android:paddingStart="12dp"
android:paddingEnd="12dp" android:paddingEnd="12dp"
tools:context=".activity.DetailsActivity"> tools:context=".activityandview.DetailsActivity">
<!--主视图--> <!--主视图-->
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".activity.MainActivity"> tools:context=".activityandview.MainActivity">
<androidx.drawerlayout.widget.DrawerLayout <androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/drawer_parent" android:id="@+id/drawer_parent"

View File

@ -3,7 +3,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<com.timber.soft.newkeyboard.view.MyKeyboardView <com.timber.soft.newkeyboard.activityandview.MyKeyboardView
android:id="@+id/my_custom_input" android:id="@+id/my_custom_input"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -2,6 +2,6 @@
<resources> <resources>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="theme_color">#FFBB86FC</color> <color name="theme_color">#E91E63</color>
<color name="gray">#FF888888</color> <color name="gray">#FF888888</color>
</resources> </resources>