V1.0.0(1) 无Ad版本
17
.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
.idea/
|
||||
app/release/
|
||||
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
3
app/SignatureInfo
Normal file
@ -0,0 +1,3 @@
|
||||
签名文件:funnystickers.jks
|
||||
别名:funnystickerskey0
|
||||
密码:funnystickers
|
||||
56
app/build.gradle.kts
Normal file
@ -0,0 +1,56 @@
|
||||
import java.util.Date
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
android {
|
||||
namespace = "com.emoticon.funnystickers.whatsapp"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.emoticon.funnystickers.whatsapp"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0.0"
|
||||
setProperty("archivesBaseName", "Funny Stickers_V" + versionName + "(${versionCode})_$timestamp")
|
||||
testInstrumentationRunner = "androidx.whatsapp.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildFeatures{
|
||||
viewBinding = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.core:core-ktx:1.9.0")
|
||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||
implementation("com.google.android.material:material:1.11.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.whatsapp.ext:junit:1.1.5")
|
||||
androidTestImplementation("androidx.whatsapp.espresso:espresso-core:3.5.1")
|
||||
implementation ("com.squareup.okhttp3:okhttp:4.11.0")
|
||||
implementation("io.coil-kt:coil:2.2.2")
|
||||
implementation("io.coil-kt:coil-gif:2.2.2")
|
||||
}
|
||||
BIN
app/funnystickers.jks
Normal file
22
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# 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 *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-keep class com.emoticon.funnystickers.whatsapp.data.json.*{ *; }
|
||||
@ -0,0 +1,24 @@
|
||||
package com.emoticon.funnystickers.whatsapp
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented whatsapp, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under whatsapp.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.emoticon.funnystickers.whatsapp", appContext.packageName)
|
||||
}
|
||||
}
|
||||
42
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:name=".MyApplication"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/funnysticker"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/funnysticker"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.FunnyStickers"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".ui.ParentActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ui.ActivityLauncher"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".ui.ActivityMain"
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<activity android:name=".ui.ActivityAdd"
|
||||
android:screenOrientation="portrait"/>
|
||||
<provider
|
||||
android:name=".provider.MyProvider"
|
||||
android:authorities="com.emoticon.funnystickers.whatsapp.StickerProvider"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:readPermission="com.whatsapp.sticker.READ" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
3032
app/src/main/assets/emoticons.json
Normal file
@ -0,0 +1,44 @@
|
||||
package com.emoticon.funnystickers.whatsapp
|
||||
|
||||
import android.app.Application
|
||||
import com.emoticon.funnystickers.whatsapp.data.json.BeanParent
|
||||
import com.emoticon.funnystickers.whatsapp.utils.DataUtil
|
||||
import com.emoticon.funnystickers.whatsapp.utils.SaveData
|
||||
|
||||
class MyApplication : Application() {
|
||||
|
||||
companion object {
|
||||
lateinit var myApplication: MyApplication
|
||||
var data: List<BeanParent>? = null
|
||||
}
|
||||
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
myApplication = this
|
||||
|
||||
val data1 = SaveData.getData()
|
||||
if (!data1.isNullOrEmpty()){
|
||||
getSaveData(data1)
|
||||
}else{
|
||||
val inputStream = assets.open("emoticons.json")
|
||||
DataUtil.getJsonString({
|
||||
it?.also { jsonStr ->
|
||||
SaveData.saveData(jsonStr)
|
||||
getSaveData(jsonStr)
|
||||
}
|
||||
}, inputStream)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun getSaveData(jsonStr: String){
|
||||
DataUtil.getData(jsonStr) { dataList ->
|
||||
data = dataList
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.emoticon.funnystickers.whatsapp.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.isVisible
|
||||
import coil.load
|
||||
import coil.request.ErrorResult
|
||||
import coil.request.ImageRequest
|
||||
import coil.request.SuccessResult
|
||||
import com.emoticon.funnystickers.whatsapp.adapter.base.ParentAdapter
|
||||
import com.emoticon.funnystickers.whatsapp.adapter.base.ParentViewHolder
|
||||
import com.emoticon.funnystickers.whatsapp.databinding.StickerLayoutBinding
|
||||
import java.io.File
|
||||
|
||||
class DetailAdapter(var context: Context) :
|
||||
ParentAdapter<StickerLayoutBinding>() {
|
||||
|
||||
private var data: List<File> = emptyList()
|
||||
|
||||
fun setData(allFilePath: List<File>) {
|
||||
data = allFilePath
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ParentViewHolder<StickerLayoutBinding>, position: Int) {
|
||||
val bean = data[position]
|
||||
holder.vb.itemLoading.isVisible = true
|
||||
if (bean.exists()) {
|
||||
holder.vb.imDetail.load(bean){
|
||||
listener(onSuccess = { _: ImageRequest, _: SuccessResult ->
|
||||
holder.vb.itemLoading.isVisible = false
|
||||
|
||||
}, onError = { _: ImageRequest, _: ErrorResult ->
|
||||
|
||||
holder.vb.itemLoading.isVisible = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getViewBing(parent: ViewGroup): StickerLayoutBinding {
|
||||
return StickerLayoutBinding.inflate(LayoutInflater.from(context),parent,false)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = data.size
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.emoticon.funnystickers.whatsapp.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.ProgressBar
|
||||
import androidx.core.view.isVisible
|
||||
import coil.load
|
||||
import coil.request.ErrorResult
|
||||
import coil.request.ImageRequest
|
||||
import coil.request.SuccessResult
|
||||
import com.emoticon.funnystickers.whatsapp.adapter.base.ParentAdapter
|
||||
import com.emoticon.funnystickers.whatsapp.adapter.base.ParentViewHolder
|
||||
import com.emoticon.funnystickers.whatsapp.data.json.BeanChild
|
||||
import com.emoticon.funnystickers.whatsapp.databinding.PreviewLayoutBinding
|
||||
|
||||
class PreviewAdapter(
|
||||
var context: Context,
|
||||
private var beanChildList: List<BeanChild>,
|
||||
private var clickCall: (BeanChild) -> Unit
|
||||
) :
|
||||
ParentAdapter<PreviewLayoutBinding>() {
|
||||
override fun onBindViewHolder(holder: ParentViewHolder<PreviewLayoutBinding>, position: Int) {
|
||||
val beanChild = beanChildList[position]
|
||||
|
||||
holder.vb.run {
|
||||
allItem.setOnClickListener {
|
||||
clickCall.invoke(beanChild)
|
||||
}
|
||||
val shuffled = beanChild.preview.shuffled()
|
||||
|
||||
loadImageView(im1, shuffled[0], pb1)
|
||||
loadImageView(im1, shuffled[1], pb1)
|
||||
loadImageView(im1, shuffled[2], pb1)
|
||||
loadImageView(im1, shuffled[3], pb1)
|
||||
loadImageView(im1, shuffled[4], pb1)
|
||||
|
||||
for ((index, url) in shuffled.withIndex()) {
|
||||
when (index) {
|
||||
0 -> loadImageView(im1, url, pb1)
|
||||
1 -> loadImageView(im2, url, pb2)
|
||||
2 -> loadImageView(im3, url, pb3)
|
||||
3 -> loadImageView(im4, url, pb4)
|
||||
4 -> loadImageView(im5, url, pb5)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun loadImageView(im: ImageView, imUrl: String, loading: ProgressBar) {
|
||||
loading.isVisible = true
|
||||
im.load(imUrl) {
|
||||
listener(onSuccess = { _: ImageRequest, _: SuccessResult ->
|
||||
loading.isVisible = false
|
||||
|
||||
}, onError = { _: ImageRequest, _: ErrorResult ->
|
||||
loading.isVisible = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
override fun getViewBing(parent: ViewGroup): PreviewLayoutBinding {
|
||||
return PreviewLayoutBinding.inflate(LayoutInflater.from(context), parent, false)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = beanChildList.size
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.emoticon.funnystickers.whatsapp.adapter
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter
|
||||
|
||||
class VPAdapter(var stringList:List<String>, var fragments:List<Fragment>, fragmentManager: FragmentManager): FragmentStatePagerAdapter(fragmentManager,
|
||||
BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
|
||||
) {
|
||||
override fun getCount(): Int {
|
||||
return fragments.size
|
||||
}
|
||||
|
||||
|
||||
override fun getPageTitle(position: Int): CharSequence? {
|
||||
return stringList[position]
|
||||
}
|
||||
override fun getItem(position: Int): Fragment {
|
||||
|
||||
return fragments[position]
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.emoticon.funnystickers.whatsapp.adapter.base
|
||||
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.viewbinding.ViewBinding
|
||||
|
||||
|
||||
abstract class ParentAdapter<viewbinding : ViewBinding> : RecyclerView.Adapter<ParentViewHolder<viewbinding>>() {
|
||||
|
||||
|
||||
private lateinit var viewBind: viewbinding
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ParentViewHolder<viewbinding> {
|
||||
viewBind = getViewBing(parent)
|
||||
|
||||
return ParentViewHolder(viewBind)
|
||||
}
|
||||
|
||||
|
||||
abstract fun getViewBing(parent: ViewGroup): viewbinding
|
||||
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.emoticon.funnystickers.whatsapp.adapter.base
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.viewbinding.ViewBinding
|
||||
|
||||
class ParentViewHolder<viewbinding : ViewBinding>(private var view: ViewBinding) :
|
||||
RecyclerView.ViewHolder(view.root) {
|
||||
var vb: viewbinding = view as viewbinding
|
||||
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package com.emoticon.funnystickers.whatsapp.data.content
|
||||
|
||||
class PackFile(var image:String,var emojis:List<String>) {
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.emoticon.funnystickers.whatsapp.data.content
|
||||
|
||||
class PackList(var identifier:String,
|
||||
var tray:String,
|
||||
var name:String,
|
||||
var author:String,
|
||||
// var share:String,
|
||||
// var isAnim:Boolean,
|
||||
// var isPremium:Boolean,
|
||||
// var email:String,
|
||||
// var webPrivacy:String,
|
||||
// var webPublisher:String,
|
||||
// var webLicense:String,
|
||||
// var publisher:String,
|
||||
var fileList:List<PackFile>) {
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.emoticon.funnystickers.whatsapp.data.json
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class BeanChild (
|
||||
var id: String,
|
||||
var preview: List<String>,
|
||||
var zip: String,
|
||||
var name: String
|
||||
): Serializable
|
||||
@ -0,0 +1,7 @@
|
||||
package com.emoticon.funnystickers.whatsapp.data.json
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class BeanParent(var childList: List<BeanChild>, var className: String):Serializable{
|
||||
|
||||
}
|
||||
@ -0,0 +1,166 @@
|
||||
package com.emoticon.funnystickers.whatsapp.provider
|
||||
|
||||
import android.content.ContentProvider
|
||||
import android.content.ContentValues
|
||||
import android.content.Context
|
||||
import android.content.UriMatcher
|
||||
import android.content.res.AssetFileDescriptor
|
||||
import android.database.Cursor
|
||||
import android.database.MatrixCursor
|
||||
import android.net.Uri
|
||||
import android.os.ParcelFileDescriptor
|
||||
import com.emoticon.funnystickers.whatsapp.R
|
||||
import com.emoticon.funnystickers.whatsapp.utils.SaveData
|
||||
import com.emoticon.funnystickers.whatsapp.utils.DataUtil
|
||||
|
||||
import java.io.File
|
||||
|
||||
class MyProvider : ContentProvider() {
|
||||
|
||||
private var mContext: Context? = null
|
||||
override fun onCreate(): Boolean {
|
||||
mContext = context
|
||||
mContext?.let {
|
||||
if (!my_author.startsWith(it.packageName)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
uriMatcher.addURI(
|
||||
my_author,
|
||||
"$metadata/*",
|
||||
match_code_2
|
||||
)
|
||||
uriMatcher.addURI(my_author, "$stickers/*", match_code_3)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun query(
|
||||
uri: Uri,
|
||||
projection: Array<out String>?,
|
||||
selection: String?,
|
||||
selectionArgs: Array<out String>?,
|
||||
sortOrder: String?
|
||||
): Cursor? {
|
||||
|
||||
val match: Int = uriMatcher.match(uri)
|
||||
|
||||
var myCursor: Cursor? = null
|
||||
val queryJsonFile = SaveData.getJsonFile(uri.lastPathSegment)
|
||||
if (queryJsonFile != null) {
|
||||
DataUtil.getPack(queryJsonFile) {
|
||||
if (it != null) {
|
||||
if (match == match_code_3) {
|
||||
val array = arrayOf(file_name_sticker, emoji)
|
||||
val cursor: MatrixCursor = DataUtil.getCursor3(it,array)
|
||||
cursor.setNotificationUri(mContext!!.contentResolver, uri)
|
||||
myCursor = cursor
|
||||
return@getPack
|
||||
} else if (match == match_code_2) {
|
||||
val array = arrayOf(
|
||||
sticker_icon,
|
||||
sticker_id,
|
||||
sticker_name,
|
||||
sticker_author
|
||||
// email
|
||||
// website_author,
|
||||
// agreement,
|
||||
// privacy_policy,
|
||||
// is_anim
|
||||
)
|
||||
val matrixCursor: MatrixCursor? = DataUtil.getCursor2(it,array)
|
||||
if (matrixCursor != null) {
|
||||
matrixCursor.setNotificationUri(mContext!!.contentResolver, uri)
|
||||
myCursor = matrixCursor
|
||||
return@getPack
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return myCursor
|
||||
}
|
||||
|
||||
|
||||
override fun getType(uri: Uri): String? {
|
||||
return if (uriMatcher.match(uri) == match_code_3) {
|
||||
java.lang.String.format(
|
||||
mContext!!.getString(R.string.str_format_provider),
|
||||
my_author,
|
||||
stickers
|
||||
)
|
||||
} else null
|
||||
}
|
||||
override fun openAssetFile(uri: Uri, mode: String): AssetFileDescriptor? {
|
||||
|
||||
val pathSegments = uri.pathSegments
|
||||
if (pathSegments.size < 3) return null
|
||||
val fileName = pathSegments[pathSegments.size - 1]
|
||||
val id = pathSegments[pathSegments.size - 2]
|
||||
if (fileName.isEmpty() || id.isEmpty()) return null
|
||||
|
||||
val fileDir = DataUtil.getPackDir(id) ?: return null
|
||||
|
||||
val path = fileDir + fileName
|
||||
|
||||
val file = File(path)
|
||||
return if (file.exists()) {
|
||||
AssetFileDescriptor(
|
||||
ParcelFileDescriptor.open(
|
||||
file,
|
||||
ParcelFileDescriptor.MODE_READ_ONLY
|
||||
), 0L, -1L
|
||||
)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun insert(uri: Uri, values: ContentValues?): Uri? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun delete(uri: Uri, selection: String?, selectionArgs: Array<out String>?): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
override fun update(
|
||||
uri: Uri,
|
||||
values: ContentValues?,
|
||||
selection: String?,
|
||||
selectionArgs: Array<out String>?
|
||||
): Int {
|
||||
return 0
|
||||
}
|
||||
companion object {
|
||||
const val action = "com.whatsapp.intent.action.ENABLE_STICKER_PACK"
|
||||
const val key_id = "sticker_pack_id"
|
||||
const val key_authority = "sticker_pack_authority"
|
||||
const val key_pack_name = "sticker_pack_name"
|
||||
|
||||
//
|
||||
// const val link_ios = "ios_app_download_link"
|
||||
// const val email = "sticker_pack_publisher_email"
|
||||
// const val website_author = "sticker_pack_publisher_website"
|
||||
const val metadata = "metadata"
|
||||
const val sticker_id = "sticker_pack_identifier"
|
||||
const val sticker_name = "sticker_pack_name"
|
||||
const val sticker_author = "sticker_pack_publisher"
|
||||
const val sticker_icon = "sticker_pack_icon"
|
||||
// const val link_android = "android_play_store_link"
|
||||
const val match_code_2 = 2
|
||||
// const val is_anim = "animated_sticker_pack"
|
||||
const val stickers = "stickers"
|
||||
// const val privacy_policy = "sticker_pack_privacy_policy_website"
|
||||
// const val agreement = "sticker_pack_license_agreement_website"
|
||||
|
||||
const val file_name_sticker = "sticker_file_name"
|
||||
const val emoji = "sticker_emoji"
|
||||
const val match_code_3 = 3
|
||||
|
||||
const val my_author: String = "com.emoticon.funnystickers.whatsapp.StickerProvider"
|
||||
private val uriMatcher = UriMatcher(UriMatcher.NO_MATCH)
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
package com.emoticon.funnystickers.whatsapp.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.emoticon.funnystickers.whatsapp.R
|
||||
import com.emoticon.funnystickers.whatsapp.adapter.DetailAdapter
|
||||
import com.emoticon.funnystickers.whatsapp.data.json.BeanChild
|
||||
import com.emoticon.funnystickers.whatsapp.databinding.AddLayoutBinding
|
||||
import com.emoticon.funnystickers.whatsapp.provider.MyProvider
|
||||
import com.emoticon.funnystickers.whatsapp.utils.DataUtil
|
||||
import com.emoticon.funnystickers.whatsapp.utils.SaveData
|
||||
import java.io.File
|
||||
|
||||
class ActivityAdd : ParentActivity<AddLayoutBinding>(), View.OnClickListener {
|
||||
private lateinit var data: BeanChild
|
||||
private lateinit var mZipPath: String
|
||||
private lateinit var detailAdapter: DetailAdapter
|
||||
private var allFiles: MutableList<File> = mutableListOf()
|
||||
private lateinit var mUnZipPath: String
|
||||
|
||||
companion object {
|
||||
const val key_detail = "detail_data"
|
||||
}
|
||||
|
||||
override fun getVB(): AddLayoutBinding {
|
||||
return AddLayoutBinding.inflate(layoutInflater)
|
||||
}
|
||||
|
||||
override fun onInit() {
|
||||
data = intent.getSerializableExtra(key_detail) as BeanChild
|
||||
detailAdapter = DetailAdapter(this)
|
||||
data.run {
|
||||
mZipPath = DataUtil.getZipPath(id)
|
||||
mUnZipPath = DataUtil.getUnZipPath(id)
|
||||
view.run {
|
||||
textviewAddWhatsapp.setOnClickListener(this@ActivityAdd)
|
||||
back.setOnClickListener(this@ActivityAdd)
|
||||
textviewName.text = name
|
||||
|
||||
allSticker.run {
|
||||
layoutManager = GridLayoutManager(this@ActivityAdd, 3)
|
||||
adapter = detailAdapter
|
||||
setItemViewCacheSize(30)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
goLoadData()
|
||||
}
|
||||
|
||||
|
||||
private fun goLoadData() {
|
||||
view.progressLoading.isVisible = true
|
||||
val unFile = File(mUnZipPath)
|
||||
|
||||
if (unFile.exists()) {
|
||||
view.progressLoading.isVisible = false
|
||||
updateUi(mUnZipPath)
|
||||
} else {
|
||||
val file = File(mZipPath)
|
||||
if (!file.exists()) {
|
||||
file.createNewFile()
|
||||
}
|
||||
|
||||
DataUtil.goDownloadZip(data.zip, mZipPath) { downloadSuccess ->
|
||||
runOnUiThread {
|
||||
if (downloadSuccess) {
|
||||
val unzip = DataUtil.goUnFile(file, mUnZipPath)
|
||||
if (unzip == true) {
|
||||
updateUi(mUnZipPath)
|
||||
}
|
||||
}
|
||||
view.progressLoading.isVisible = false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
view.run {
|
||||
when (it) {
|
||||
back -> {
|
||||
finish()
|
||||
}
|
||||
textviewAddWhatsapp -> {
|
||||
val intent = Intent()
|
||||
intent.action = MyProvider.action
|
||||
intent.putExtra(MyProvider.key_id, data.id)
|
||||
intent.putExtra(MyProvider.key_authority, MyProvider.my_author)
|
||||
intent.putExtra(MyProvider.key_pack_name, data.name)
|
||||
try {
|
||||
startActivityForResult(intent, 200)
|
||||
} catch (ex: Exception) {
|
||||
Toast.makeText(
|
||||
this@ActivityAdd,
|
||||
getString(R.string.not_found),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private fun updateUi(newPath: String) {
|
||||
val file = File(newPath)
|
||||
if (!file.exists()) {
|
||||
return
|
||||
}
|
||||
val filesList = file.listFiles() ?: return
|
||||
for (listFile in filesList) {
|
||||
val name = listFile.name
|
||||
if (listFile.name.endsWith(".webp") && name != "tray.webp") {
|
||||
allFiles.add(listFile)
|
||||
} else {
|
||||
SaveData.saveFilePath(data.id, listFile.absolutePath)
|
||||
}
|
||||
}
|
||||
detailAdapter.setData(allFiles)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.emoticon.funnystickers.whatsapp.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.CountDownTimer
|
||||
import com.emoticon.funnystickers.whatsapp.databinding.LaunherLayoutBinding
|
||||
|
||||
class ActivityLauncher : ParentActivity<LaunherLayoutBinding>() {
|
||||
|
||||
private var timer: CountDownTimer? = null
|
||||
val totalTime = 2000L
|
||||
override fun getVB(): LaunherLayoutBinding {
|
||||
return LaunherLayoutBinding.inflate(layoutInflater)
|
||||
}
|
||||
|
||||
override fun onInit() {
|
||||
view.seekbarLoading.max = totalTime.toInt()
|
||||
timer = object : CountDownTimer(totalTime, 100) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
val minus = totalTime.minus(millisUntilFinished)
|
||||
view.seekbarLoading.progress = minus.toInt()
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
view.seekbarLoading.progress = totalTime.toInt()
|
||||
finish()
|
||||
startActivity(Intent(this@ActivityLauncher, ActivityMain::class.java))
|
||||
}
|
||||
|
||||
}
|
||||
timer?.start()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
timer?.cancel()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.emoticon.funnystickers.whatsapp.ui
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.emoticon.funnystickers.whatsapp.MyApplication
|
||||
import com.emoticon.funnystickers.whatsapp.adapter.VPAdapter
|
||||
import com.emoticon.funnystickers.whatsapp.databinding.MainLayoutBinding
|
||||
|
||||
class ActivityMain : ParentActivity<MainLayoutBinding>() {
|
||||
|
||||
|
||||
override fun getVB(): MainLayoutBinding {
|
||||
return MainLayoutBinding.inflate(layoutInflater)
|
||||
}
|
||||
|
||||
override fun onInit() {
|
||||
viewInit()
|
||||
}
|
||||
private fun viewInit() {
|
||||
MyApplication.data?.let {
|
||||
val shuffled = it.shuffled()
|
||||
val listFragments = mutableListOf<Fragment>()
|
||||
val titles = mutableListOf<String>()
|
||||
view.run {
|
||||
for (tabIndex in shuffled.indices) {
|
||||
tab.addTab(tab.newTab())
|
||||
titles.add(shuffled[tabIndex].className)
|
||||
val list = shuffled[tabIndex].childList.shuffled()
|
||||
listFragments.add(FragmentList.newInstance(list)
|
||||
)
|
||||
}
|
||||
previewViewPager.adapter = VPAdapter(titles, listFragments, supportFragmentManager)
|
||||
tab.setupWithViewPager(previewViewPager)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package com.emoticon.funnystickers.whatsapp.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.emoticon.funnystickers.whatsapp.adapter.PreviewAdapter
|
||||
import com.emoticon.funnystickers.whatsapp.data.json.BeanChild
|
||||
import com.emoticon.funnystickers.whatsapp.databinding.ListLayoutBinding
|
||||
import java.io.Serializable
|
||||
|
||||
class FragmentList : Fragment() {
|
||||
|
||||
private lateinit var binding:ListLayoutBinding
|
||||
private var beanChildList: List<BeanChild> = ArrayList()
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = ListLayoutBinding.inflate(LayoutInflater.from(requireContext()),null,false)
|
||||
init()
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun init(){
|
||||
(arguments?.getSerializable(key_data) as List<BeanChild>).also { beanChildList = it }
|
||||
|
||||
binding.myecycler.run {
|
||||
layoutManager = LinearLayoutManager(requireContext())
|
||||
adapter = PreviewAdapter(requireContext(),beanChildList){
|
||||
startActivity(Intent(requireContext(),ActivityAdd::class.java).apply {
|
||||
putExtra(ActivityAdd.key_detail,it)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
companion object {
|
||||
const val key_data= "bean_child_key"
|
||||
fun newInstance(list:List<BeanChild>) = FragmentList().apply {
|
||||
list as Serializable
|
||||
arguments = Bundle().apply {
|
||||
putSerializable(key_data, list)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.emoticon.funnystickers.whatsapp.ui
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import androidx.viewbinding.ViewBinding
|
||||
|
||||
abstract class ParentActivity<MyViewBinding : ViewBinding> : AppCompatActivity() {
|
||||
|
||||
protected val view by lazy { getVB() }
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(view.root)
|
||||
onInit()
|
||||
}
|
||||
|
||||
|
||||
protected abstract fun getVB():MyViewBinding
|
||||
|
||||
protected abstract fun onInit()
|
||||
}
|
||||
@ -0,0 +1,300 @@
|
||||
package com.emoticon.funnystickers.whatsapp.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageInfo
|
||||
import android.content.pm.PackageManager
|
||||
import android.database.MatrixCursor
|
||||
import android.os.Build
|
||||
import android.text.TextUtils
|
||||
import com.emoticon.funnystickers.whatsapp.MyApplication
|
||||
import com.emoticon.funnystickers.whatsapp.data.content.PackFile
|
||||
import com.emoticon.funnystickers.whatsapp.data.content.PackList
|
||||
import com.emoticon.funnystickers.whatsapp.data.json.BeanChild
|
||||
import com.emoticon.funnystickers.whatsapp.data.json.BeanParent
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.util.zip.ZipFile
|
||||
|
||||
object DataUtil {
|
||||
|
||||
fun getZipPath(id: String): String {
|
||||
return "${getUnZipPath(id)}.zip"
|
||||
}
|
||||
|
||||
fun getUnZipPath(id: String): String {
|
||||
return "${MyApplication.myApplication.filesDir}/${id}"
|
||||
|
||||
}
|
||||
|
||||
fun getPackageInfo(con: Context): PackageInfo {
|
||||
val manager = con.packageManager
|
||||
val packName = con.packageName
|
||||
return if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
||||
manager.getPackageInfo(packName, 0)
|
||||
} else {
|
||||
manager.getPackageInfo(packName, PackageManager.PackageInfoFlags.of(0))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun getData(jsonString: String, function: (List<BeanParent>?) -> Unit) {
|
||||
try {
|
||||
val jsonArray = JSONArray(jsonString)
|
||||
var list = mutableListOf<BeanParent>()
|
||||
|
||||
for (i in 0 until jsonArray.length()) {
|
||||
val jsonObject = jsonArray.getJSONObject(i)
|
||||
val jsonArray1y = jsonObject.getJSONArray("childList")
|
||||
val className = jsonObject.getString("categoryName")
|
||||
|
||||
var beanChildrenList = arrayListOf<BeanChild>()
|
||||
for (j in 0 until jsonArray1y.length()) {
|
||||
jsonArray1y.getJSONObject(j).run {
|
||||
val imagesList = mutableListOf<String>()
|
||||
val iden = getString("identifierName")
|
||||
val name = getString("title")
|
||||
val zipUrl = getString("zipUrl")
|
||||
val previewList = getJSONArray("previewList")
|
||||
|
||||
for (k in 0 until previewList.length()) {
|
||||
val pre = previewList.getString(k)
|
||||
imagesList.add(pre)
|
||||
}
|
||||
beanChildrenList.add(
|
||||
BeanChild(
|
||||
id = iden,
|
||||
zip = zipUrl,
|
||||
preview = imagesList,
|
||||
name = name
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
list.add(BeanParent(className = className, childList = beanChildrenList))
|
||||
}
|
||||
function.invoke(list)
|
||||
} catch (ex: Exception) {
|
||||
function.invoke(null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun jsonToPack(jsonString: String, callList: (List<PackList>?) -> Unit) {
|
||||
try {
|
||||
|
||||
var content2MutableList: MutableList<PackList> = mutableListOf()
|
||||
val objectStr = JSONObject(jsonString)
|
||||
// val ios_link = objectStr.getString("ios_app_store_link")
|
||||
val packs = objectStr.getJSONArray("sticker_packs")
|
||||
// val store_link = objectStr.getString("android_play_store_link")
|
||||
|
||||
for (i in 0 until packs.length()) {
|
||||
packs.getJSONObject(i).run {
|
||||
|
||||
val packName = getString("name")
|
||||
val packFull = getString("publisher_full")
|
||||
// val json_email = getString("publisher_email")
|
||||
val packTray = getString("tray_image_file")
|
||||
// val json_publisher = getString("publisher")
|
||||
// val json_premium = getBoolean("is_premium")
|
||||
// val json_animated = getBoolean("animated_sticker_pack")
|
||||
val packId = getString("identifier")
|
||||
// val json_privacy = getString("privacy_policy_website")
|
||||
// val json_license = getString("license_agreement_website")
|
||||
// val json_share = getString("share_url")
|
||||
// val json_pub_web = getString("publisher_website")
|
||||
|
||||
val stickers = getJSONArray("stickers")
|
||||
|
||||
var fileMutableList: MutableList<PackFile> = mutableListOf()
|
||||
for (j in 0 until stickers.length()) {
|
||||
stickers.getJSONObject(j).run {
|
||||
val image = getString("image_file")
|
||||
val emojis = getJSONArray("emojis")
|
||||
var emoList = mutableListOf<String>()
|
||||
for (k in 0 until emojis.length()) {
|
||||
val string = emojis.getString(k)
|
||||
emoList.add(string)
|
||||
}
|
||||
fileMutableList.add(
|
||||
PackFile(
|
||||
image = image,
|
||||
emojis = emoList
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
content2MutableList.add(
|
||||
PackList(
|
||||
identifier = packId,
|
||||
name = packName,
|
||||
tray = packTray,
|
||||
fileList = fileMutableList,
|
||||
author = packFull
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
callList.invoke(
|
||||
content2MutableList
|
||||
)
|
||||
} catch (ex: Exception) {
|
||||
|
||||
callList.invoke(null)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun getJsonString(coverString: (String?) -> Unit, inputStream: InputStream) {
|
||||
try {
|
||||
val byteArray = ByteArray(inputStream.available())
|
||||
inputStream.read(byteArray)
|
||||
inputStream.close()
|
||||
val string = String(byteArray)
|
||||
coverString.invoke(string)
|
||||
} catch (ex: Exception) {
|
||||
coverString.invoke(null)
|
||||
}
|
||||
}
|
||||
|
||||
fun getPackDir(id: String): String? {
|
||||
val filePath = SaveData.getJsonFile(id)
|
||||
if (!filePath.isNullOrEmpty()) {
|
||||
return filePath.substring(0, filePath.lastIndexOf("contents.json"))
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
fun getPack(path: String, call: (info: List<PackList>?) -> Unit) {
|
||||
getJsonString({
|
||||
if (it != null) {
|
||||
jsonToPack(it) { pack ->
|
||||
call.invoke(pack)
|
||||
}
|
||||
}
|
||||
}, FileInputStream(path))
|
||||
}
|
||||
|
||||
|
||||
fun getCursor3(packLists: List<PackList>, array: Array<String>): MatrixCursor {
|
||||
val matrixCursor = MatrixCursor(array)
|
||||
for (sticker in packLists[0].fileList) {
|
||||
val values =
|
||||
arrayOf<String>(sticker.image, TextUtils.join(",", sticker.emojis))
|
||||
matrixCursor.addRow(values)
|
||||
}
|
||||
return matrixCursor
|
||||
}
|
||||
|
||||
fun goDownloadZip(url: String, filePath: String, callback: (b: Boolean) -> Unit) {
|
||||
val build = Request.Builder().url(url).build()
|
||||
OkHttpClient().newCall(build).enqueue(object : okhttp3.Callback {
|
||||
override fun onFailure(call: okhttp3.Call, e: IOException) {
|
||||
callback.invoke(false)
|
||||
}
|
||||
|
||||
override fun onResponse(call: okhttp3.Call, response: okhttp3.Response) {
|
||||
response.body?.byteStream()?.let {
|
||||
copyFile(it, filePath, callback)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun getCursor2(packList: List<PackList>, array: Array<String>): MatrixCursor? {
|
||||
val matrixCursor = MatrixCursor(array)
|
||||
val rowBuilder = matrixCursor.newRow()
|
||||
val pack = packList[0]
|
||||
try {
|
||||
// rowBuilder.add(contentJson.storeUrl)
|
||||
// rowBuilder.add(contentJson.iosUrl)
|
||||
rowBuilder.add(pack.tray)
|
||||
rowBuilder.add(pack.identifier)
|
||||
rowBuilder.add(pack.name)
|
||||
rowBuilder.add(pack.author)
|
||||
// rowBuilder.add(pack.email)
|
||||
// rowBuilder.add(pack.webPublisher)
|
||||
// rowBuilder.add(pack.webLicense)
|
||||
// rowBuilder.add(pack.webPrivacy)
|
||||
// if (pack.isAnim) {
|
||||
// rowBuilder.add(1)
|
||||
// } else {
|
||||
// rowBuilder.add(0)
|
||||
// }
|
||||
return matrixCursor
|
||||
} catch (e: Exception) {
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun goUnFile(zip: File, unzipPath: String): Boolean? {
|
||||
return try {
|
||||
val newFile = File(unzipPath)
|
||||
if (!newFile.exists()) {
|
||||
newFile.mkdir()
|
||||
}
|
||||
val zipFile = ZipFile(zip.absolutePath)
|
||||
val entries = zipFile.entries()
|
||||
while (entries.hasMoreElements()) {
|
||||
val entry = entries.nextElement()
|
||||
val file = File(unzipPath, entry.name)
|
||||
if (entry.isDirectory) {
|
||||
file.mkdirs()
|
||||
} else {
|
||||
val outputStream = FileOutputStream(file)
|
||||
val inputStream = zipFile.getInputStream(entry)
|
||||
val bytes = ByteArray(1024)
|
||||
var length = 0
|
||||
while (inputStream.read(bytes).also { length = it } > 0) {
|
||||
outputStream.write(bytes, 0, length)
|
||||
}
|
||||
outputStream.close()
|
||||
inputStream.close()
|
||||
}
|
||||
}
|
||||
true
|
||||
} catch (exception: Exception) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun copyFile(input: InputStream, path: String, callback: (b: Boolean) -> Unit) {
|
||||
val out = ByteArrayOutputStream()
|
||||
var fileOut: FileOutputStream? = null
|
||||
try {
|
||||
val byteArray = ByteArray(4096)
|
||||
var readBuffer = 0
|
||||
while (input.read(byteArray).also {
|
||||
readBuffer = it
|
||||
} != -1) {
|
||||
out.write(byteArray, 0, readBuffer)
|
||||
}
|
||||
fileOut = FileOutputStream(File(path))
|
||||
fileOut.write(out.toByteArray())
|
||||
callback.invoke(true)
|
||||
} catch (ex: Exception) {
|
||||
callback.invoke(false)
|
||||
} finally {
|
||||
out.close()
|
||||
fileOut?.close()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.emoticon.funnystickers.whatsapp.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import com.emoticon.funnystickers.whatsapp.MyApplication
|
||||
|
||||
object SaveData {
|
||||
|
||||
private val sharedPreferences: SharedPreferences =
|
||||
MyApplication.myApplication.getSharedPreferences(
|
||||
"preferences",
|
||||
Context.MODE_PRIVATE
|
||||
)
|
||||
private val myEditor = sharedPreferences.edit()
|
||||
|
||||
|
||||
fun saveData(jsonString: String) {
|
||||
myEditor.putString("data_key", jsonString)
|
||||
myEditor.apply()
|
||||
}
|
||||
|
||||
fun getJsonFile(id: String?): String? {
|
||||
return sharedPreferences.getString(id, "")
|
||||
}
|
||||
fun getData(): String? {
|
||||
return sharedPreferences.getString("data_key", "")
|
||||
}
|
||||
|
||||
fun saveFilePath(id: String?, jsonFilePath: String?) {
|
||||
myEditor.putString(id, jsonFilePath)
|
||||
myEditor.apply()
|
||||
}
|
||||
}
|
||||
30
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
8
app/src/main/res/drawable/bg_add_stickers.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="6dp"/>
|
||||
<solid android:color="@color/color_add_button" android:width="1dp"/>
|
||||
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/contact_us.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="M1024,732.8v-441.6a130.8,130.8 0,0 0,-130.7 -130.8L130.8,160.4A130.8,130.8 0,0 0,0 291.2v441.6c0,72.2 58.5,130.7 130.7,130.7h762.6A130.7,130.7 0,0 0,1024 732.8zM860.4,221.4c8.5,0 16.6,1.4 24.4,3.5L512,530.4 138,223.9c6.8,-1.5 13.8,-2.6 21.1,-2.6h701.3zM159.1,797.6a96,96 0,0 1,-96 -96L63.1,317.4c0,-21.3 7.2,-40.8 18.9,-56.7l407.7,334.1c1.5,1.2 3.4,1.7 5.1,2.6a30.7,30.7 0,0 0,6.1 3.3h0.1c10.4,4 22.4,2.9 31.6,-4.6l406.7,-333.2c10.8,15.6 17.2,34.3 17.2,54.7v384.3a96,96 0,0 1,-96 96L159.1,797.8z"
|
||||
android:fillColor="#A8FF89"/>
|
||||
</vector>
|
||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
||||
<?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="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_back.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="M608,736c-6.4,0 -19.2,0 -25.6,-6.4l-192,-192C384,524.8 384,499.2 390.4,486.4l192,-192c12.8,-12.8 32,-12.8 44.8,0s12.8,32 0,44.8L460.8,512l166.4,166.4c12.8,12.8 12.8,32 0,44.8C627.2,736 614.4,736 608,736z"
|
||||
android:fillColor="#272636"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_version.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:fillColor="#A8FF89"
|
||||
android:pathData="M512,66C266,66 66,266 66,512S266,958 512,958 958,758 958,512 758,66 512,66zM544,736c0,17.7 -14.3,32 -32,32s-32,-14.3 -32,-32L480,448c0,-17.7 14.3,-32 32,-32 17.7,0 32,14.3 32,32v288zM512,352c-26.5,0 -48,-21.5 -48,-48C464,277.5 485.5,256 512,256s48,21.5 48,48c0,26.5 -21.5,48 -48,48z"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/seek_bar_style.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="9dp"/>
|
||||
<solid android:color="@color/white"/>
|
||||
<stroke android:color="@color/color_theme" android:width="2dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="9dp" />
|
||||
<solid android:color="@color/color_theme" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
71
app/src/main/res/layout/add_layout.xml
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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"
|
||||
tools:context=".ui.ActivityAdd">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:id="@+id/textviewName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:padding="10dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/textviewName"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/textviewName"
|
||||
android:src="@drawable/icon_back" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/all_sticker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/textviewName" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/progress_loading"
|
||||
android:indeterminateTint="@color/color_theme" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview_add_whatsapp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:gravity="center"
|
||||
android:layout_marginEnd="55dp"
|
||||
android:layout_marginStart="55dp"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:background="@drawable/bg_add_stickers"
|
||||
android:padding="8dp"
|
||||
android:text="@string/text_add"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
41
app/src/main/res/layout/launher_layout.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?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"
|
||||
tools:context=".ui.ActivityLauncher">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="200dp"
|
||||
android:src="@mipmap/funnysticker" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="11dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:progressDrawable="@drawable/seek_bar_style"
|
||||
android:thumb="@null" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/logo"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
14
app/src/main/res/layout/list_layout.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/myecycler"
|
||||
android:scrollbars="none"
|
||||
android:paddingBottom="10dp"
|
||||
tools:context=".ui.FragmentList">
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
44
app/src/main/res/layout/main_layout.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<?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"
|
||||
tools:context=".ui.ActivityMain">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/preview_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_below="@id/tab"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
app:tabIndicatorColor="@color/color_theme"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabIndicatorHeight="2dp"
|
||||
android:layout_below="@id/app_name"
|
||||
app:tabMode="scrollable"
|
||||
app:tabSelectedTextColor="@color/color_theme"
|
||||
app:tabTextColor="@color/black">
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
147
app/src/main/res/layout/preview_layout.xml
Normal file
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:cardCornerRadius="6dp">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingStart="2dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/all_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fm1"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im1"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:padding="5dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb1"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:indeterminateTint="@color/color_theme"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fm2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toEndOf="@id/fm1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:padding="5dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb2"
|
||||
android:layout_width="35dp"
|
||||
android:indeterminateTint="@color/color_theme"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fm3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toEndOf="@id/fm2">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:padding="5dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb3"
|
||||
android:layout_width="35dp"
|
||||
android:indeterminateTint="@color/color_theme"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fm4"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toEndOf="@id/fm3">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im4"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:padding="5dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb4"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:indeterminateTint="@color/color_theme"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fm5"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toEndOf="@id/fm4">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im5"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:padding="5dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb5"
|
||||
android:layout_width="35dp"
|
||||
android:indeterminateTint="@color/color_theme"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
105
app/src/main/res/layout/setting_layout.xml
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/text_about"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/back"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/back" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/contact_us"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="47dp"
|
||||
android:layout_marginStart="26dp"
|
||||
android:layout_marginTop="62dp"
|
||||
android:layout_marginEnd="26dp"
|
||||
android:paddingStart="26dp"
|
||||
android:paddingEnd="16dp"
|
||||
app:cardCornerRadius="7dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/back">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="17dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewStar"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:src="@drawable/contact_us" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/find_me"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="47dp"
|
||||
android:layout_marginStart="26dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="26dp"
|
||||
app:cardCornerRadius="7dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="26dp"
|
||||
android:paddingEnd="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/contact_us">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="17dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewLock"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:src="@drawable/icon_version" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
21
app/src/main/res/layout/sticker_layout.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="3dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/item_loading"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="54dp"
|
||||
android:indeterminateTint="@color/color_theme"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/funnysticker.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_back.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
7
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.FunnyStickers" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
||||
8
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="color_add_button">#80A8FF89</color>
|
||||
<color name="color_theme">#A8FF89</color>
|
||||
<color name="color_theme_second">#8bf9ec</color>
|
||||
</resources>
|
||||
10
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<resources>
|
||||
<string name="app_name">Funny Stickers</string>
|
||||
<string name="text_add">ADD TO WHATSAPP</string>
|
||||
<string name="str_format_provider">vnd.android.cursor.dir/vnd.%1$s.%2$s</string>
|
||||
<string name="not_found">Sorry, whatsApp was not found!</string>
|
||||
<string name="text_about">About</string>
|
||||
<string name="version_code">V%s</string>
|
||||
<string name="google_url">https://play.google.com/store/apps/details?id=%s</string>
|
||||
<string name="find_me">contact us</string>
|
||||
</resources>
|
||||
7
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.FunnyStickers" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
</style>
|
||||
|
||||
<style name="Theme.FunnyStickers" parent="Base.Theme.FunnyStickers" />
|
||||
</resources>
|
||||
13
app/src/main/res/xml/backup_rules.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older that API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
||||
19
app/src/main/res/xml/data_extraction_rules.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
@ -0,0 +1,17 @@
|
||||
package com.emoticon.funnystickers.whatsapp
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit whatsapp, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
BIN
app/testfunnystickers.jks
Normal file
5
build.gradle.kts
Normal file
@ -0,0 +1,5 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id("com.android.application") version "8.1.3" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
|
||||
}
|
||||
23
gradle.properties
Normal file
@ -0,0 +1,23 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Tue Apr 09 10:36:29 CST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
185
gradlew
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://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" 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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
89
gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
18
settings.gradle.kts
Normal file
@ -0,0 +1,18 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "FunnyStickers"
|
||||
include(":app")
|
||||
|
||||