接Top on1.0.2(3)
19
.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
*.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/
|
||||
.safedk/
|
||||
app/release/funnyprank_v1.0.2(3)_07_23_18_23-release.apk
|
||||
app/release/funnyprank_v1.0.2(3)_07_23_18_24-release.aab
|
||||
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
88
app/build.gradle.kts
Normal file
@ -0,0 +1,88 @@
|
||||
import java.util.Date
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("kotlin-kapt")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
id("applovin-quality-service")
|
||||
}
|
||||
|
||||
applovin {
|
||||
apiKey =
|
||||
"wTpFhhS7Z9n1ayO2cp39GdFQdU8xzJMM0VeBvp4t5xhwBxCNU7eZz0_1_ixpZvxGTH0eFqFg5NmAheFBwr6pGD"
|
||||
}
|
||||
|
||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
android {
|
||||
namespace = "com.fun.funnyprank"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.fun.funnyprank"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 3
|
||||
versionName = "1.0.2"
|
||||
setProperty(
|
||||
"archivesBaseName",
|
||||
"funnyprank_v" + versionName + "(${versionCode})_$timestamp"
|
||||
)
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isShrinkResources = true
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.appcompat:appcompat:1.7.0")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
||||
|
||||
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||
val room_version = "2.6.1"
|
||||
implementation("androidx.room:room-runtime:$room_version")
|
||||
annotationProcessor("androidx.room:room-compiler:$room_version")
|
||||
kapt("androidx.room:room-compiler:$room_version")
|
||||
implementation("androidx.room:room-ktx:$room_version")
|
||||
implementation("androidx.room:room-rxjava2:$room_version")
|
||||
implementation("androidx.room:room-rxjava3:$room_version")
|
||||
implementation("androidx.room:room-guava:$room_version")
|
||||
testImplementation("androidx.room:room-testing:$room_version")
|
||||
implementation("androidx.room:room-paging:$room_version")
|
||||
|
||||
|
||||
|
||||
implementation(platform("com.google.firebase:firebase-bom:33.1.1"))
|
||||
implementation("com.google.firebase:firebase-crashlytics")
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
|
||||
implementation("com.applovin:applovin-sdk:+")
|
||||
implementation("com.applovin.mediation:vungle-adapter:+")
|
||||
implementation("com.applovin.mediation:mintegral-adapter:+")
|
||||
implementation("com.applovin.mediation:bytedance-adapter:+")
|
||||
implementation("com.applovin.mediation:unityads-adapter:+")
|
||||
|
||||
}
|
||||
BIN
app/funprank.jks
Normal file
BIN
app/funpranktest.jks
Normal file
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "793962193813",
|
||||
"project_id": "funny-prank-fart-air-horn",
|
||||
"storage_bucket": "funny-prank-fart-air-horn.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:793962193813:android:f0f42ab0c4bccedeedcc9c",
|
||||
"android_client_info": {
|
||||
"package_name": "com.fun.funnyprank"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDDvLoh4ktx5yWaGz-6xojRo9mSDC5XhvQ"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
32
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# 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
|
||||
-keepclassmembers class com.fun.funnyprank.FunnyPrankSkin{
|
||||
public static final java.lang.String DB_Name;
|
||||
public static final int DB_Version;
|
||||
}
|
||||
-keepclassmembers class *{
|
||||
@androidx.room.Query <methods>;
|
||||
}
|
||||
|
||||
-keep class com.fun.funnyprank.data.MydataBase { *; }
|
||||
-keep class com.fun.funnyprank.data.LikeDAO { *; }
|
||||
-keep class com.fun.funnyprank.data.LikeData { *; }
|
||||
20
app/release/output-metadata.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.fun.funnyprank",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 3,
|
||||
"versionName": "1.0.2",
|
||||
"outputFile": "funnyprank_v1.0.2(3)_07_23_18_23-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.fun.funnyprank;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.fun.funnyprank", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
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=".FunnyPrankSkin"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/icon_logo"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/icon_logo"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".activity.PrewActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.ListActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.SplashActivity"
|
||||
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=".activity.MainActivity"
|
||||
android:exported="true">
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
BIN
app/src/main/assets/KavoonRegular-Dp7E.ttf
Normal file
3390
app/src/main/assets/prank.json
Normal file
102
app/src/main/java/com/fun/funnyprank/FunnyPrankSkin.java
Normal file
@ -0,0 +1,102 @@
|
||||
package com.fun.funnyprank;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.applovin.sdk.AppLovinMediationProvider;
|
||||
import com.applovin.sdk.AppLovinSdk;
|
||||
import com.applovin.sdk.AppLovinSdkConfiguration;
|
||||
import com.applovin.sdk.AppLovinSdkInitializationConfiguration;
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.Mydata;
|
||||
import com.fun.funnyprank.data.MydataBase;
|
||||
import com.fun.funnyprank.tools.Mytools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FunnyPrankSkin extends Application {
|
||||
public static final String DB_Name = "like_database";
|
||||
public static final String Table_Name = "like_table";
|
||||
public static final int DB_Version = 1;
|
||||
public static FunnyPrankSkin app;
|
||||
private static Context context;
|
||||
public static List<Mydata> myDataArrayList;
|
||||
private static boolean isinsert;
|
||||
private static final String PREFS_NAME = "MyPrefs";
|
||||
private static final String KEY_IS_INSERTED = "isinserted";
|
||||
public static final String AD_BROADCAST = "on_success_action";
|
||||
private static final String MAX_SDK = "6GTFERcq2m3KHo37uityeCg0kfcqx3iT31OJG_a5weBmXsslFg5NuR8mlBXEqZ3ExDdXIl16PTMg0442tdRaJs";
|
||||
public static Boolean initSDK = false;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
app = this;
|
||||
initSDk();
|
||||
|
||||
|
||||
context = getApplicationContext();
|
||||
List<Mydata> myData = Mytools.parseJsonToList("prank.json");
|
||||
myDataArrayList = myData;
|
||||
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||
isinsert = prefs.getBoolean(KEY_IS_INSERTED, false);
|
||||
if (!isinsert) {
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MydataBase.getInstance().likeDao().insertAll(getOtherdata());
|
||||
isinsert = true;
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putBoolean(KEY_IS_INSERTED, isinsert);
|
||||
editor.apply();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void initSDk() {
|
||||
|
||||
AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder(MAX_SDK, this)
|
||||
.setMediationProvider(AppLovinMediationProvider.MAX)
|
||||
.build();
|
||||
AppLovinSdk.getInstance(this).initialize(initConfig, new AppLovinSdk.SdkInitializationListener() {
|
||||
@Override
|
||||
public void onSdkInitialized(final AppLovinSdkConfiguration sdkConfig) {
|
||||
initSDK = true;
|
||||
Log.e("zzj", "------------initSDk--------success");
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(AD_BROADCAST));
|
||||
}
|
||||
});
|
||||
AppLovinSdk.getInstance(this).getSettings().setVerboseLogging(true);
|
||||
}
|
||||
|
||||
public static Context getAppContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public static List<Mydata> getMyDataArrayList() {
|
||||
|
||||
return myDataArrayList;
|
||||
}
|
||||
|
||||
public static List<LikeData> getOtherdata() {
|
||||
List<Mydata> mydata = FunnyPrankSkin.getMyDataArrayList();
|
||||
List<LikeData> newlist = new ArrayList<>();
|
||||
for (Mydata myDataItem : mydata) {
|
||||
List<LikeData> dataList = myDataItem.getList();
|
||||
for (LikeData otherdata : dataList) {
|
||||
newlist.add(otherdata);
|
||||
}
|
||||
}
|
||||
|
||||
return newlist;
|
||||
}
|
||||
|
||||
}
|
||||
106
app/src/main/java/com/fun/funnyprank/activity/ListActivity.java
Normal file
@ -0,0 +1,106 @@
|
||||
package com.fun.funnyprank.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.fun.funnyprank.FunnyPrankSkin;
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.adapter.ListAdapter;
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.MydataBase;
|
||||
import com.fun.funnyprank.data.StaticValue;
|
||||
import com.fun.funnyprank.databinding.ActivityListBinding;
|
||||
import com.fun.funnyprank.tools.Adcallback;
|
||||
import com.fun.funnyprank.tools.Mytools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ListActivity extends AppCompatActivity {
|
||||
ActivityListBinding binding;
|
||||
private List<LikeData> dataList = new ArrayList<>();
|
||||
private String name;
|
||||
private int color;
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityListBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_list), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
adsList = Mytools.getAllAd();
|
||||
|
||||
Intent intent = getIntent();
|
||||
name = intent.getStringExtra(StaticValue.KEY_CategoryName);
|
||||
color = intent.getIntExtra(StaticValue.KEY_Color, 0);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
dataList = MydataBase.getInstance().likeDao().getlist(name);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
binding.prewListRv.setAdapter(new ListAdapter(ListActivity.this, dataList, color));
|
||||
binding.prewListRv.setLayoutManager(new GridLayoutManager(ListActivity.this, 2));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
binding.prewListTitle.setText(name);
|
||||
binding.back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showAd();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void showAd() {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
|
||||
if (cachedAd == null) {
|
||||
finish();
|
||||
} else {
|
||||
Mytools.setCallBcak(cachedAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
cachedAd.showAd(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
showAd();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.fun.funnyprank.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.adapter.PageAdapter;
|
||||
import com.fun.funnyprank.databinding.ActivityMainBinding;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
ActivityMainBinding binding;
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityMainBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_main), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
initView();
|
||||
setmainTabIcons(binding.mainTabLayout);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
PageAdapter pageAdapter =new PageAdapter(getSupportFragmentManager());
|
||||
binding.mainViewpager.setAdapter(pageAdapter);
|
||||
binding.mainTabLayout.setupWithViewPager(binding.mainViewpager);
|
||||
binding.mainViewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
setTabIcons(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
private void setTabIcons(final int position) {
|
||||
for (int i = 0; i < binding.mainTabLayout.getTabCount(); i++) {
|
||||
final TabLayout.Tab tab = binding.mainTabLayout.getTabAt(i);
|
||||
if (tab != null) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
tab.setIcon(position == 0 ? R.drawable.main_check : R.drawable.main_uncheck);
|
||||
break;
|
||||
case 1:
|
||||
tab.setIcon(position == 0 ? R.drawable.like_uncheck : R.drawable.like_check);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void setmainTabIcons(TabLayout tabLayout) {
|
||||
for (int i = 0; i < tabLayout.getTabCount(); i++) {
|
||||
TabLayout.Tab tab = tabLayout.getTabAt(i);
|
||||
if (tab != null) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
tab.setIcon(R.drawable.main_check);
|
||||
break;
|
||||
case 1:
|
||||
tab.setIcon(R.drawable.like_uncheck);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
330
app/src/main/java/com/fun/funnyprank/activity/PrewActivity.java
Normal file
@ -0,0 +1,330 @@
|
||||
package com.fun.funnyprank.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.SeekBar;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.MydataBase;
|
||||
import com.fun.funnyprank.data.StaticValue;
|
||||
import com.fun.funnyprank.databinding.ActivityPrewBinding;
|
||||
import com.fun.funnyprank.tools.Adcallback;
|
||||
import com.fun.funnyprank.tools.Mytools;
|
||||
import com.fun.funnyprank.tools.SeekBarBroadCast;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PrewActivity extends AppCompatActivity {
|
||||
ActivityPrewBinding binding;
|
||||
private String name;
|
||||
private AudioManager audioManager;
|
||||
private MediaPlayer mediaPlayer;
|
||||
private LikeData data;
|
||||
private final Boolean[] islike = {false};
|
||||
private Boolean isplayer = false;
|
||||
private Boolean isloop = false;
|
||||
private SeekBar seekBar;
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityPrewBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_pre), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
adsList = Mytools.getAllAd();
|
||||
|
||||
|
||||
initData();
|
||||
initEvent();
|
||||
hidemenu();
|
||||
audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
|
||||
seekBar.setMax(audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC));
|
||||
seekBar.setProgress(audioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
|
||||
if (audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) == 0) {
|
||||
binding.volumeleft.setBackgroundResource(R.drawable.icon_sound_none);
|
||||
} else {
|
||||
binding.volumeleft.setBackgroundResource(R.drawable.icon_sound_low);
|
||||
}
|
||||
SeekBarBroadCast seekBarBroadCast = new SeekBarBroadCast(audioManager, seekBar);
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction("android.media.VOLUME_CHANGED_ACTION");
|
||||
registerReceiver(seekBarBroadCast, filter);
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
binding.preBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
binding.preLike.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkLike();
|
||||
}
|
||||
});
|
||||
binding.prePlay.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
try {
|
||||
playprank();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
binding.loop.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
isloop = isChecked;
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.setLooping(isloop);
|
||||
}
|
||||
}
|
||||
});
|
||||
binding.volumeleft.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int a = binding.seekbar.getProgress();
|
||||
|
||||
binding.seekbar.setProgress(a - 10);
|
||||
}
|
||||
});
|
||||
binding.volumeright.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int a = binding.seekbar.getProgress();
|
||||
|
||||
binding.seekbar.setProgress(a + 10);
|
||||
}
|
||||
});
|
||||
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, progress, 0);
|
||||
if (audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) == 0) {
|
||||
binding.volumeleft.setBackgroundResource(R.drawable.icon_sound_none);
|
||||
} else {
|
||||
binding.volumeleft.setBackgroundResource(R.drawable.icon_sound_low);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
private void showAd() throws IOException {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
|
||||
if (cachedAd == null) {
|
||||
starprank();
|
||||
} else {
|
||||
Mytools.setCallBcak(cachedAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
try {
|
||||
starprank();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
try {
|
||||
starprank();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
cachedAd.showAd(this);
|
||||
}
|
||||
}
|
||||
private void playprank() throws IOException {
|
||||
if (!isplayer) {
|
||||
showAd();
|
||||
} else {
|
||||
stopprank();
|
||||
}
|
||||
}
|
||||
|
||||
private void stopprank() {
|
||||
isplayer = false;
|
||||
binding.prePlay.setBackgroundResource(R.drawable.icon_play);
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void starprank() throws IOException {
|
||||
isplayer = true;
|
||||
binding.prePlay.setBackgroundResource(R.drawable.icon_pause);
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setAudioAttributes(
|
||||
new AudioAttributes.Builder()
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
|
||||
.setUsage(AudioAttributes.USAGE_MEDIA)
|
||||
.build());
|
||||
mediaPlayer.setDataSource(getApplicationContext(), Uri.parse(data.getMp3Url()));
|
||||
mediaPlayer.setOnPreparedListener(mp -> {
|
||||
if (isloop) {
|
||||
mediaPlayer.setLooping(true);
|
||||
|
||||
}
|
||||
mediaPlayer.start();
|
||||
});
|
||||
mediaPlayer.setOnCompletionListener(mp -> {
|
||||
if (isloop) {
|
||||
binding.prePlay.setBackgroundResource(R.drawable.icon_pause);
|
||||
} else {
|
||||
binding.prePlay.setBackgroundResource(R.drawable.icon_play);
|
||||
isplayer = true;
|
||||
}
|
||||
});
|
||||
mediaPlayer.prepareAsync();
|
||||
}
|
||||
|
||||
private void checkLike() {
|
||||
if (!islike[0]) {
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_liek_check);
|
||||
islike[0] = true;
|
||||
data.setLike(true);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MydataBase.getInstance().likeDao().update(data);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_liek_uncheck);
|
||||
islike[0] = false;
|
||||
data.setLike(false);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MydataBase.getInstance().likeDao().update(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
seekBar = findViewById(R.id.seekbar);
|
||||
Intent intent = getIntent();
|
||||
name = intent.getStringExtra(StaticValue.KEY_TITLE);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<LikeData> existingData = MydataBase.getInstance().likeDao().getliketitle(name);
|
||||
if (!existingData.isEmpty()) {
|
||||
data = existingData.get(0);
|
||||
islike[0] = data.getLike();
|
||||
if (islike[0]) {
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_liek_check);
|
||||
} else {
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_liek_uncheck);
|
||||
}
|
||||
binding.preTitle.setText(data.getTitle());
|
||||
Glide.with(PrewActivity.this)
|
||||
.asBitmap()
|
||||
.load(data.getPreUrl())
|
||||
.placeholder(R.mipmap.icon_logo)
|
||||
.into(new CustomTarget<Bitmap>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
|
||||
binding.preImage.setImageBitmap(resource);
|
||||
showmenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void hidemenu() {
|
||||
binding.loop.setVisibility(View.GONE);
|
||||
binding.preLoopText.setVisibility(View.GONE);
|
||||
binding.preLike.setVisibility(View.GONE);
|
||||
binding.volumeleft.setVisibility(View.GONE);
|
||||
binding.volumeright.setVisibility(View.GONE);
|
||||
binding.seekbar.setVisibility(View.GONE);
|
||||
binding.prePlay.setVisibility(View.GONE);
|
||||
binding.prePg.setVisibility(View.VISIBLE);
|
||||
binding.preCons.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void showmenu() {
|
||||
binding.loop.setVisibility(View.VISIBLE);
|
||||
binding.preLoopText.setVisibility(View.VISIBLE);
|
||||
binding.preLike.setVisibility(View.VISIBLE);
|
||||
binding.volumeleft.setVisibility(View.VISIBLE);
|
||||
binding.volumeright.setVisibility(View.VISIBLE);
|
||||
binding.seekbar.setVisibility(View.VISIBLE);
|
||||
binding.prePlay.setVisibility(View.VISIBLE);
|
||||
binding.prePg.setVisibility(View.GONE);
|
||||
binding.preCons.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.release();
|
||||
isplayer = false;
|
||||
binding.prePlay.setBackgroundResource(R.drawable.icon_play);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,119 @@
|
||||
package com.fun.funnyprank.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.util.Log;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.applovin.sdk.AppLovinSdk;
|
||||
import com.fun.funnyprank.FunnyPrankSkin;
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.tools.Adcallback;
|
||||
import com.fun.funnyprank.tools.Mytools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
private CountDownTimer countDownTimer;
|
||||
|
||||
private static List<MaxInterstitialAd> adsList;
|
||||
public static boolean isAlreadyShow = false;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splash);
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_splash), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
countDownTimer = new CountDownTimer(11000, 100) {
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
if (!isAlreadyShow) {
|
||||
showAdOrStartView(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (!isAlreadyShow) {
|
||||
showAdOrStartView(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
registerBroadcastReceiver();
|
||||
}
|
||||
|
||||
private void showAdOrStartView(boolean go) {
|
||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||
if (cachedAd == null) {
|
||||
isAlreadyShow = false;
|
||||
if (go) {
|
||||
starMainactivity();
|
||||
}
|
||||
} else {
|
||||
isAlreadyShow = true;
|
||||
Mytools.setCallBcak(cachedAd, new Adcallback() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
isAlreadyShow = false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden() {
|
||||
isAlreadyShow = true;
|
||||
starMainactivity();
|
||||
}
|
||||
});
|
||||
cachedAd.showAd();
|
||||
}
|
||||
}
|
||||
|
||||
private void registerBroadcastReceiver() {
|
||||
if (!FunnyPrankSkin.initSDK) {
|
||||
BroadcastReceiver receiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
// AppLovinSdk.getInstance( SplashActivity.this ).showMediationDebugger();
|
||||
Log.e("zzj", "------------loadAndStartAd--------success");
|
||||
loadAndStartAd();
|
||||
}
|
||||
};
|
||||
|
||||
LocalBroadcastManager.getInstance(this).registerReceiver(receiver, new IntentFilter(FunnyPrankSkin.AD_BROADCAST));
|
||||
} else {
|
||||
Log.e("zzj", "------------loadAndStartAd--------fail");
|
||||
loadAndStartAd();
|
||||
}
|
||||
}
|
||||
|
||||
private void loadAndStartAd() {
|
||||
adsList = Mytools.getAllAd();
|
||||
countDownTimer.start();
|
||||
}
|
||||
|
||||
private void starMainactivity() {
|
||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
148
app/src/main/java/com/fun/funnyprank/adapter/LikeAdapter.java
Normal file
@ -0,0 +1,148 @@
|
||||
package com.fun.funnyprank.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.activity.PrewActivity;
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.StaticValue;
|
||||
import com.fun.funnyprank.databinding.LikeListBinding;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LikeAdapter extends RecyclerView.Adapter<LikeAdapter.LikeVH> {
|
||||
private final LayoutInflater minflater;
|
||||
private List<LikeData> mlist;
|
||||
private int currentIndex = 0;
|
||||
private int listIndex = 0;
|
||||
|
||||
public LikeAdapter(Activity activity, List<LikeData> list) {
|
||||
minflater = LayoutInflater.from(activity);
|
||||
mlist = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public LikeAdapter.LikeVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
LikeListBinding binding = LikeListBinding.inflate(minflater, parent, false);
|
||||
return new LikeVH(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull LikeAdapter.LikeVH holder, int position) {
|
||||
LikeData likeData = mlist.get(position);
|
||||
Glide.with(minflater.getContext())
|
||||
.load(likeData.getPreUrl())
|
||||
.placeholder(R.mipmap.icon_logo)
|
||||
.into(holder.getImage());
|
||||
holder.getText().setText(likeData.getTitle());
|
||||
|
||||
if (position == getItemCount() - 1) {
|
||||
holder.getView().setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.getView().setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
Drawable[] randomcolor = {
|
||||
ContextCompat.getDrawable(minflater.getContext(), R.drawable.like_background_1),
|
||||
ContextCompat.getDrawable(minflater.getContext(), R.drawable.like_background_2),
|
||||
ContextCompat.getDrawable(minflater.getContext(), R.drawable.like_background_3),
|
||||
ContextCompat.getDrawable(minflater.getContext(), R.drawable.like_background_4),
|
||||
};
|
||||
Drawable[] likelistcons = {
|
||||
ContextCompat.getDrawable(minflater.getContext(), R.mipmap.like_pg_1),
|
||||
ContextCompat.getDrawable(minflater.getContext(), R.mipmap.like_pg_2),
|
||||
};
|
||||
Drawable drawable = Randomcolor(randomcolor);
|
||||
Drawable likelist = listbg(likelistcons);
|
||||
|
||||
holder.getLikecons().setBackground(drawable);
|
||||
holder.getLikelistcons().setBackground(likelist);
|
||||
|
||||
holder.getLikecons().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(minflater.getContext(), PrewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, likeData.getTitle());
|
||||
minflater.getContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Drawable listbg(Drawable[] colors) {
|
||||
|
||||
if (listIndex >= colors.length) {
|
||||
listIndex = 0;
|
||||
}
|
||||
Drawable nextColor = colors[listIndex];
|
||||
listIndex++;
|
||||
return nextColor;
|
||||
|
||||
}
|
||||
|
||||
private Drawable Randomcolor(Drawable[] colors) {
|
||||
|
||||
if (currentIndex >= colors.length) {
|
||||
currentIndex = 0;
|
||||
}
|
||||
Drawable nextColor = colors[currentIndex];
|
||||
currentIndex++;
|
||||
return nextColor;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mlist.size();
|
||||
}
|
||||
|
||||
public class LikeVH extends RecyclerView.ViewHolder {
|
||||
private ConstraintLayout likecons, likelistcons;
|
||||
private TextView text;
|
||||
private ImageView image;
|
||||
private View view;
|
||||
|
||||
public LikeVH(@NonNull LikeListBinding binding) {
|
||||
super(binding.getRoot());
|
||||
likecons = binding.likeConsList;
|
||||
likelistcons = binding.likeConsListBg;
|
||||
text = binding.likeText;
|
||||
image = binding.likeImage;
|
||||
view = binding.likeView;
|
||||
}
|
||||
|
||||
public TextView getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public View getView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
public ImageView getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public ConstraintLayout getLikecons() {
|
||||
return likecons;
|
||||
}
|
||||
|
||||
public ConstraintLayout getLikelistcons() {
|
||||
return likelistcons;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
106
app/src/main/java/com/fun/funnyprank/adapter/ListAdapter.java
Normal file
@ -0,0 +1,106 @@
|
||||
package com.fun.funnyprank.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.activity.PrewActivity;
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.StaticValue;
|
||||
import com.fun.funnyprank.databinding.PreRvItemBinding;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ListAdapter extends RecyclerView.Adapter<ListAdapter.PreVH> {
|
||||
private List<LikeData> otherdataList;
|
||||
private final LayoutInflater mInflater;
|
||||
private int mcolor;
|
||||
public ListAdapter(Activity activity, List<LikeData> list,int color) {
|
||||
mInflater = LayoutInflater.from(activity);
|
||||
otherdataList = list;
|
||||
mcolor = color;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ListAdapter.PreVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
PreRvItemBinding binding = PreRvItemBinding.inflate(mInflater, parent, false);
|
||||
return new PreVH(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ListAdapter.PreVH holder, int position) {
|
||||
LikeData otherdata = otherdataList.get(position);
|
||||
Glide.with(mInflater.getContext())
|
||||
.load(otherdata.getPreUrl())
|
||||
.placeholder(R.mipmap.icon_logo)
|
||||
.into(holder.getImageViewThumb());
|
||||
holder.getTextView().setText(otherdata.getTitle());
|
||||
Drawable backgroundDrawable = ContextCompat.getDrawable(mInflater.getContext(), R.drawable.mainlist_bg);
|
||||
if (backgroundDrawable != null) {
|
||||
backgroundDrawable.setColorFilter(mcolor, PorterDuff.Mode.SRC_ATOP);
|
||||
holder.getListcons().setBackground(backgroundDrawable);
|
||||
}
|
||||
holder.getConstraintLayout().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(mInflater.getContext(), PrewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, otherdata.getTitle());
|
||||
mInflater.getContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return otherdataList.size();
|
||||
}
|
||||
|
||||
public class PreVH extends RecyclerView.ViewHolder {
|
||||
PreRvItemBinding binding;
|
||||
private ImageView imageViewThumb;
|
||||
private ConstraintLayout constraintLayout,listcons;
|
||||
private TextView textView;
|
||||
|
||||
public TextView getTextView() {
|
||||
return textView;
|
||||
}
|
||||
|
||||
public ConstraintLayout getListcons() {
|
||||
return listcons;
|
||||
}
|
||||
|
||||
public PreVH(@NonNull PreRvItemBinding binding) {
|
||||
super(binding.getRoot());
|
||||
imageViewThumb = binding.listItemImage;
|
||||
constraintLayout = binding.listCons;
|
||||
textView = binding.listItemText;
|
||||
listcons = binding.listItemCons;
|
||||
|
||||
}
|
||||
|
||||
public ConstraintLayout getConstraintLayout() {
|
||||
return constraintLayout;
|
||||
}
|
||||
|
||||
public ImageView getImageViewThumb() {
|
||||
return imageViewThumb;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.fun.funnyprank.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
|
||||
import com.fun.funnyprank.fragment.LikeFragment;
|
||||
import com.fun.funnyprank.fragment.MainFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageAdapter extends FragmentPagerAdapter {
|
||||
private List<Fragment> fragmentList = new ArrayList<>();
|
||||
|
||||
public PageAdapter(@NonNull FragmentManager fm) {
|
||||
super(fm);
|
||||
fragmentList.add(new MainFragment());
|
||||
fragmentList.add(new LikeFragment());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return fragmentList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fragmentList.size();
|
||||
}
|
||||
}
|
||||
140
app/src/main/java/com/fun/funnyprank/adapter/ThumAdapter.java
Normal file
@ -0,0 +1,140 @@
|
||||
package com.fun.funnyprank.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.activity.ListActivity;
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.Mydata;
|
||||
import com.fun.funnyprank.data.StaticValue;
|
||||
import com.fun.funnyprank.databinding.MainRvItemBinding;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ThumAdapter extends RecyclerView.Adapter<ThumAdapter.ThumVH> {
|
||||
private List<Mydata> myDataList;
|
||||
|
||||
private final LayoutInflater mInflater;
|
||||
|
||||
private int currentIndex = 0;
|
||||
|
||||
public ThumAdapter(Activity activity, List<Mydata> list) {
|
||||
myDataList = list;
|
||||
mInflater = LayoutInflater.from(activity);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ThumVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
MainRvItemBinding binding = MainRvItemBinding.inflate(mInflater, parent, false);
|
||||
return new ThumVH(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ThumVH holder, int position) {
|
||||
Mydata myData = myDataList.get(position);
|
||||
if (position == getItemCount() - 1) {
|
||||
holder.getView().setVisibility(View.VISIBLE);
|
||||
} else if (position == getItemCount()-2){
|
||||
holder.getView().setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
holder.getView().setVisibility(View.GONE);
|
||||
}
|
||||
Glide.with(mInflater.getContext())
|
||||
.load(myData.getCategoryUrl())
|
||||
.placeholder(R.mipmap.icon_logo)
|
||||
.into(holder.getImageViewThumb());
|
||||
holder.getTextView().setText(myData.getCategoryName());
|
||||
|
||||
int[] randomcolor = {
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_1),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_2),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_3),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_4),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_5),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_6),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_7),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_8),
|
||||
ContextCompat.getColor(mInflater.getContext(), R.color.color_9),
|
||||
};
|
||||
int randomColor = Randomcolor(randomcolor);
|
||||
Drawable backgroundDrawable1 = ContextCompat.getDrawable(mInflater.getContext(), R.drawable.mainlist_bg);
|
||||
if (backgroundDrawable1 != null) {
|
||||
backgroundDrawable1.setColorFilter(randomColor, PorterDuff.Mode.SRC_ATOP);
|
||||
holder.getMainlistcons().setBackground(backgroundDrawable1);
|
||||
}
|
||||
holder.getConstraintLayout().setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mInflater.getContext(), ListActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_CategoryName, myData.getCategoryName());
|
||||
intent.putExtra(StaticValue.KEY_Color, randomColor);
|
||||
mInflater.getContext().startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
private int Randomcolor(int[] colors) {
|
||||
|
||||
if (currentIndex >= colors.length) {
|
||||
currentIndex = 0;
|
||||
}
|
||||
int nextColor = colors[currentIndex];
|
||||
currentIndex++;
|
||||
return nextColor;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return myDataList.size();
|
||||
}
|
||||
|
||||
public class ThumVH extends RecyclerView.ViewHolder {
|
||||
|
||||
private ImageView imageViewThumb;
|
||||
private ConstraintLayout constraintLayout, mainlistcons;
|
||||
public ConstraintLayout getMainlistcons() {
|
||||
return mainlistcons;
|
||||
}
|
||||
private TextView textView;
|
||||
private View view;
|
||||
public ThumVH(@NonNull MainRvItemBinding binding) {
|
||||
super(binding.getRoot());
|
||||
imageViewThumb = binding.mainRvImage;
|
||||
constraintLayout = binding.cons;
|
||||
mainlistcons = binding.mainListCons;
|
||||
textView = binding.mainRvText;
|
||||
view = binding.view;
|
||||
}
|
||||
|
||||
public ConstraintLayout getConstraintLayout() {
|
||||
return constraintLayout;
|
||||
}
|
||||
|
||||
public ImageView getImageViewThumb() {
|
||||
return imageViewThumb;
|
||||
}
|
||||
public View getView() {
|
||||
return view;
|
||||
}
|
||||
public TextView getTextView() {
|
||||
return textView;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
app/src/main/java/com/fun/funnyprank/data/LikeDAO.java
Normal file
@ -0,0 +1,28 @@
|
||||
package com.fun.funnyprank.data;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Dao
|
||||
public interface LikeDAO {
|
||||
@Query("SELECT * FROM like_table")
|
||||
List<LikeData> getAll();
|
||||
|
||||
@Query("select * from like_table where islike =:islike ")
|
||||
List<LikeData> getLikedata(boolean islike);
|
||||
|
||||
@Query("select * from like_table where title =:title ")
|
||||
List<LikeData> getliketitle(String title);
|
||||
@Query("select * from like_table where categoryname =:name ")
|
||||
List<LikeData> getlist(String name);
|
||||
|
||||
@Insert
|
||||
void insertAll(List<LikeData> likeDataList);
|
||||
|
||||
@Update
|
||||
void update(LikeData likeData);
|
||||
}
|
||||
71
app/src/main/java/com/fun/funnyprank/data/LikeData.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.fun.funnyprank.data;
|
||||
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import com.fun.funnyprank.FunnyPrankSkin;
|
||||
|
||||
|
||||
@Entity(tableName = FunnyPrankSkin.Table_Name)
|
||||
public class LikeData {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
public int id;
|
||||
public String categoryname;
|
||||
|
||||
public String title;
|
||||
|
||||
public String mp3Url;
|
||||
|
||||
public String preUrl;
|
||||
|
||||
public Boolean islike ;
|
||||
public String categoryUrl;
|
||||
|
||||
public String getCategoryUrl() {
|
||||
return categoryUrl;
|
||||
}
|
||||
|
||||
public void setCategoryUrl(String categoryUrl) {
|
||||
this.categoryUrl = categoryUrl;
|
||||
}
|
||||
|
||||
public String getCategoryname() {
|
||||
return categoryname;
|
||||
}
|
||||
|
||||
public void setCategoryname(String categoryname) {
|
||||
this.categoryname = categoryname;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getMp3Url() {
|
||||
return mp3Url;
|
||||
}
|
||||
|
||||
public void setMp3Url(String mp3Url) {
|
||||
this.mp3Url = mp3Url;
|
||||
}
|
||||
|
||||
public String getPreUrl() {
|
||||
return preUrl;
|
||||
}
|
||||
|
||||
public void setPreUrl(String preUrl) {
|
||||
this.preUrl = preUrl;
|
||||
}
|
||||
|
||||
public Boolean getLike() {
|
||||
return islike;
|
||||
}
|
||||
|
||||
public void setLike(Boolean like) {
|
||||
this.islike = like;
|
||||
}
|
||||
}
|
||||
37
app/src/main/java/com/fun/funnyprank/data/Mydata.java
Normal file
@ -0,0 +1,37 @@
|
||||
package com.fun.funnyprank.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Mydata {
|
||||
|
||||
private String categoryName;
|
||||
private String categoryUrl;
|
||||
private List<LikeData> list = new ArrayList<>();
|
||||
|
||||
public List<LikeData> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<LikeData> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryUrl() {
|
||||
return categoryUrl;
|
||||
}
|
||||
|
||||
public void setCategoryUrl(String categoryUrl) {
|
||||
this.categoryUrl = categoryUrl;
|
||||
}
|
||||
|
||||
}
|
||||
27
app/src/main/java/com/fun/funnyprank/data/MydataBase.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.fun.funnyprank.data;
|
||||
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
import com.fun.funnyprank.FunnyPrankSkin;
|
||||
|
||||
@Database(entities = {LikeData.class}, version = FunnyPrankSkin.DB_Version,exportSchema = false)
|
||||
public abstract class MydataBase extends RoomDatabase {
|
||||
public abstract LikeDAO likeDao();
|
||||
|
||||
private static MydataBase INSTANCE;
|
||||
|
||||
public static MydataBase getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (MydataBase.class) {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = Room.databaseBuilder(FunnyPrankSkin.getAppContext(), MydataBase.class, FunnyPrankSkin.DB_Name).build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
11
app/src/main/java/com/fun/funnyprank/data/StaticValue.java
Normal file
@ -0,0 +1,11 @@
|
||||
package com.fun.funnyprank.data;
|
||||
|
||||
public class StaticValue {
|
||||
|
||||
public static String KEY_CategoryName = "key_CategoryName";
|
||||
public static String KEY_TITLE = "key_title";
|
||||
public static String KEY_Color = "key_color";
|
||||
public static String KEY_MP3URL = "key_mp3url";
|
||||
public static String KEY_PREURL = "KEY_preurl";
|
||||
public static String KEY_LIKE = "KEY_like";
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.fun.funnyprank.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.fun.funnyprank.R;
|
||||
import com.fun.funnyprank.adapter.LikeAdapter;
|
||||
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.MydataBase;
|
||||
import com.fun.funnyprank.databinding.FragmentLikeBinding;
|
||||
import com.fun.funnyprank.tools.Mytools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class LikeFragment extends Fragment {
|
||||
|
||||
FragmentLikeBinding binding;
|
||||
private List<LikeData> list = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
binding = FragmentLikeBinding.inflate(inflater, container, false);
|
||||
initData();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
list = MydataBase.getInstance().likeDao().getLikedata(true);
|
||||
requireActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (list.isEmpty()) {
|
||||
binding.likeHintText.setVisibility(View.VISIBLE);
|
||||
binding.likeHintImage.setVisibility(View.VISIBLE);
|
||||
binding.likeRv.setVisibility(View.GONE);
|
||||
} else {
|
||||
binding.likeRv.setVisibility(View.VISIBLE);
|
||||
binding.likeHintText.setVisibility(View.GONE);
|
||||
binding.likeHintImage.setVisibility(View.GONE);
|
||||
binding.likeRv.setAdapter(new LikeAdapter(requireActivity(), list));
|
||||
binding.likeRv.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
initData();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.fun.funnyprank.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.fun.funnyprank.FunnyPrankSkin;
|
||||
import com.fun.funnyprank.adapter.ThumAdapter;
|
||||
import com.fun.funnyprank.databinding.FragmentMainBinding;
|
||||
import com.fun.funnyprank.tools.SpaceItem;
|
||||
|
||||
public class MainFragment extends Fragment {
|
||||
|
||||
FragmentMainBinding bind;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
bind = FragmentMainBinding.inflate(inflater, container, false);
|
||||
SpaceItem spaceItem = new SpaceItem(12, 20, 12);
|
||||
bind.marinRv.setAdapter(new ThumAdapter(requireActivity(), FunnyPrankSkin.getMyDataArrayList()));
|
||||
bind.marinRv.setLayoutManager(new GridLayoutManager(requireContext(),2));
|
||||
bind.marinRv.addItemDecoration(spaceItem);
|
||||
return bind.getRoot();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.fun.funnyprank.tools;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
|
||||
public interface Adcallback {
|
||||
void onShowFail(MaxAd ad);
|
||||
void onAdHidden( );
|
||||
}
|
||||
77
app/src/main/java/com/fun/funnyprank/tools/MytextView.java
Normal file
@ -0,0 +1,77 @@
|
||||
package com.fun.funnyprank.tools;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.text.TextPaint;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@SuppressLint("AppCompatCustomView")
|
||||
public class MytextView extends TextView {
|
||||
private Paint borderPaint;
|
||||
public MytextView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public MytextView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public MytextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
public MytextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "KavoonRegular-Dp7E.ttf"));
|
||||
// borderPaint = new Paint();
|
||||
// borderPaint.setStyle(Paint.Style.STROKE);
|
||||
// borderPaint.setStrokeWidth(dpToPx(2)); // 设置边框宽度为2dp
|
||||
// borderPaint.setColor(getResources().getColor(android.R.color.black));
|
||||
}
|
||||
// @Override
|
||||
// protected void onDraw(Canvas canvas) {
|
||||
// super.onDraw(canvas);
|
||||
//
|
||||
//
|
||||
// TextPaint textPaint = getPaint();
|
||||
// String text = getText().toString();
|
||||
// Rect textBounds = new Rect();
|
||||
// textPaint.getTextBounds(text, 0, text.length(), textBounds);
|
||||
//
|
||||
// // 计算文本的实际宽度和高度
|
||||
// float textWidth = textPaint.measureText(text);
|
||||
// float textHeight = textBounds.height();
|
||||
//
|
||||
// // 计算边框的矩形
|
||||
// float startX = (getWidth() - textWidth) / 2 - dpToPx(2); // 减去2dp的外边距
|
||||
// float startY = (getHeight() - textHeight) / 2 - dpToPx(2); // 减去2dp的外边距
|
||||
// float endX = startX + textWidth + 2 * dpToPx(2); // 加上4dp的边框宽度
|
||||
// float endY = startY + textHeight + 2 * dpToPx(2); // 加上4dp的边框宽度
|
||||
//
|
||||
// // 绘制文本
|
||||
// super.onDraw(canvas);
|
||||
//
|
||||
// // 绘制边框
|
||||
// canvas.drawRect(startX, startY, endX, endY, borderPaint);
|
||||
// }
|
||||
//
|
||||
// // Helper 方法:将 dp 转换为像素
|
||||
// private int dpToPx(int dp) {
|
||||
// float density = getContext().getResources().getDisplayMetrics().density;
|
||||
// return Math.round(dp * density);
|
||||
// }
|
||||
}
|
||||
167
app/src/main/java/com/fun/funnyprank/tools/Mytools.java
Normal file
@ -0,0 +1,167 @@
|
||||
package com.fun.funnyprank.tools;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxAdListener;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.fun.funnyprank.FunnyPrankSkin;
|
||||
import com.fun.funnyprank.data.LikeData;
|
||||
import com.fun.funnyprank.data.Mydata;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class Mytools {
|
||||
private static ExecutorService executorService;
|
||||
|
||||
private static ArrayList<MaxInterstitialAd> adArrayList;
|
||||
private static final String one_AD = "9a30e00e3adce356";
|
||||
private static final String two_Ad = "8f3d0596a7b8f113";
|
||||
private static final String three_ad = "64e321a4bc6cc03d";
|
||||
|
||||
public static void setCallBcak(MaxInterstitialAd ad, Adcallback adcallback) {
|
||||
ad.setListener(new MaxAdListener() {
|
||||
@Override
|
||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
adcallback.onAdHidden();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
Log.e("zzj","-----------onAdLoadFailed------"+maxError);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
adcallback.onShowFail(maxAd);
|
||||
Log.e("zzj","-----------onAdDisplayFailed------"+maxError);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static MaxInterstitialAd onCache(List<MaxInterstitialAd> list) {
|
||||
Collections.shuffle(list);
|
||||
for (MaxInterstitialAd ad : list) {
|
||||
if (ad.isReady()) {
|
||||
return ad;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<MaxInterstitialAd> getAllAd() {
|
||||
if (adArrayList == null) {
|
||||
adArrayList = new ArrayList<>();
|
||||
adArrayList.add(createAd(one_AD, FunnyPrankSkin.app));
|
||||
adArrayList.add(createAd(two_Ad, FunnyPrankSkin.app));
|
||||
adArrayList.add(createAd(three_ad, FunnyPrankSkin.app));
|
||||
}
|
||||
for (MaxInterstitialAd ad : adArrayList) {
|
||||
if (!ad.isReady()) {
|
||||
ad.loadAd();
|
||||
}
|
||||
}
|
||||
return adArrayList;
|
||||
}
|
||||
|
||||
private static MaxInterstitialAd createAd(String adUnitId, Context context) {
|
||||
MaxInterstitialAd ad = new MaxInterstitialAd(adUnitId, context);
|
||||
return ad;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void runIO(Runnable task) {
|
||||
getExecutorService().execute(task);
|
||||
}
|
||||
|
||||
private static ExecutorService getExecutorService() {
|
||||
if (executorService == null) {
|
||||
executorService = Executors.newSingleThreadExecutor();
|
||||
}
|
||||
return executorService;
|
||||
}
|
||||
|
||||
private static JSONArray loadJSONFromAsset(String filename) {
|
||||
String json;
|
||||
try {
|
||||
AssetManager assetManager = FunnyPrankSkin.getAppContext().getAssets();
|
||||
InputStream inputStream = assetManager.open(filename);
|
||||
int size = inputStream.available();
|
||||
byte[] buffer = new byte[size];
|
||||
inputStream.read(buffer);
|
||||
inputStream.close();
|
||||
json = new String(buffer, StandardCharsets.UTF_8);
|
||||
return new JSONArray(json);
|
||||
} catch (IOException | JSONException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static List<Mydata> parseJsonToList(String filename) {
|
||||
List<Mydata> dataList = new ArrayList<>();
|
||||
try {
|
||||
JSONArray jsonObject = loadJSONFromAsset(filename);
|
||||
for (int a = 0; a < jsonObject.length(); a++) {
|
||||
JSONObject list = jsonObject.getJSONObject(a);
|
||||
Mydata myData = new Mydata();
|
||||
List<LikeData> likeDataList = new ArrayList<>();
|
||||
myData.setCategoryName(list.getString("categoryName"));
|
||||
myData.setCategoryUrl(list.getString("categoryUrl"));
|
||||
JSONArray classArray = list.getJSONArray("list");
|
||||
for (int i = 0; i < classArray.length(); i++) {
|
||||
JSONObject item = classArray.getJSONObject(i);
|
||||
LikeData likeData = new LikeData();
|
||||
likeData.setLike(false);
|
||||
likeData.setCategoryname(myData.getCategoryName());
|
||||
likeData.setTitle(item.getString("title"));
|
||||
likeData.setMp3Url(item.getString("mp3Url"));
|
||||
likeData.setPreUrl(item.getString("preUrl"));
|
||||
likeDataList.add(likeData);
|
||||
}
|
||||
myData.setList(likeDataList);
|
||||
dataList.add(myData);
|
||||
}
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.fun.funnyprank.tools;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.media.AudioManager;
|
||||
import android.widget.SeekBar;
|
||||
|
||||
public class SeekBarBroadCast extends BroadcastReceiver {
|
||||
private AudioManager myaudioManager;
|
||||
private SeekBar myseekBar;
|
||||
public SeekBarBroadCast(AudioManager audioManager, SeekBar seekBar){
|
||||
myaudioManager = audioManager;
|
||||
myseekBar = seekBar;
|
||||
}
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent.getAction().equals("android.media.VOLUME_CHANGED_ACTION")){
|
||||
int currentVolume = myaudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
|
||||
myseekBar.setProgress(currentVolume);
|
||||
}
|
||||
}
|
||||
}
|
||||
56
app/src/main/java/com/fun/funnyprank/tools/SpaceItem.java
Normal file
@ -0,0 +1,56 @@
|
||||
package com.fun.funnyprank.tools;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class SpaceItem extends RecyclerView.ItemDecoration {
|
||||
private int ex_space = 0;
|
||||
private int v_space = 0;
|
||||
private int h_space = 0;
|
||||
|
||||
@Override
|
||||
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||
|
||||
int position = parent.getChildAdapterPosition(view);
|
||||
int spanSize = 1;
|
||||
int spanIndex = 0;
|
||||
int spanCount = 1;
|
||||
|
||||
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
|
||||
|
||||
if (layoutManager instanceof GridLayoutManager) {
|
||||
GridLayoutManager layoutManager1 = (GridLayoutManager) layoutManager;
|
||||
GridLayoutManager.LayoutParams layoutParams = (GridLayoutManager.LayoutParams) view.getLayoutParams();
|
||||
spanCount = layoutManager1.getSpanCount();
|
||||
spanSize = layoutManager1.getSpanSizeLookup().getSpanSize(position);
|
||||
spanIndex = layoutParams.getSpanIndex();
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (spanSize == spanCount) {
|
||||
outRect.left = v_space + ex_space;
|
||||
outRect.right = v_space + ex_space;
|
||||
outRect.bottom = h_space;
|
||||
} else {
|
||||
int itemAllSpacing = (v_space * (spanCount + 1) + ex_space * 2) / spanCount;
|
||||
int left = v_space * (spanIndex + 1) - itemAllSpacing * spanIndex + ex_space;
|
||||
int right = itemAllSpacing - left;
|
||||
outRect.left = left;
|
||||
outRect.right = right;
|
||||
outRect.bottom = h_space;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public SpaceItem(int v_space, int h_space, int ex_space) {
|
||||
this.ex_space = ex_space;
|
||||
this.h_space = h_space;
|
||||
this.v_space = v_space;
|
||||
|
||||
}
|
||||
}
|
||||
9
app/src/main/res/drawable/bg_like.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="375dp"
|
||||
android:height="812dp"
|
||||
android:viewportWidth="375"
|
||||
android:viewportHeight="812">
|
||||
<!-- <path-->
|
||||
<!-- android:pathData="M0,0h375v812h-375z"-->
|
||||
<!-- android:fillColor="url(#pattern0_184_4855)"/>-->
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/bg_main.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="375dp"
|
||||
android:height="812dp"
|
||||
android:viewportWidth="375"
|
||||
android:viewportHeight="812">
|
||||
<!-- <path-->
|
||||
<!-- android:pathData="M0,0h375v812h-375z"-->
|
||||
<!-- android:fillColor="url(#pattern0_184_4853)"/>-->
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/butoon_tablayout.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/black"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="100dp"
|
||||
android:bottomRightRadius="100dp"
|
||||
android:topLeftRadius="100dp"
|
||||
android:topRightRadius="100dp" />
|
||||
|
||||
</shape>
|
||||
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>
|
||||
30
app/src/main/res/drawable/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>
|
||||
26
app/src/main/res/drawable/icon_back.xml
Normal file
9
app/src/main/res/drawable/icon_back_bg.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/black"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="40dp"
|
||||
android:bottomRightRadius="40dp"
|
||||
android:topLeftRadius="40dp"
|
||||
android:topRightRadius="40dp" />
|
||||
</shape>
|
||||
29
app/src/main/res/drawable/icon_liek_check.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="42dp"
|
||||
android:height="37dp"
|
||||
android:viewportWidth="42"
|
||||
android:viewportHeight="37">
|
||||
<path
|
||||
android:pathData="M39,1H3C1.895,1 1,1.895 1,3V34C1,35.105 1.895,36 3,36H39C40.105,36 41,35.105 41,34V3C41,1.895 40.105,1 39,1Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="76"
|
||||
android:startY="36"
|
||||
android:endX="76"
|
||||
android:endY="1"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FF303030"/>
|
||||
<item android:offset="1" android:color="#FF444444"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M39,0H3C1.343,0 0,1.343 0,3V34C0,35.657 1.343,37 3,37H39C40.657,37 42,35.657 42,34V3C42,1.343 40.657,0 39,0ZM39,1H3C1.895,1 1,1.895 1,3V34C1,35.105 1.895,36 3,36H39C40.105,36 41,35.105 41,34V3C41,1.895 40.105,1 39,1Z"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillAlpha="0.5"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M16.924,10C14.057,10 12,12.3 12,15.304C12,16.665 12.481,17.967 13.354,18.972L20.949,27.976C20.962,27.991 20.98,28 21,28C21.02,28 21.038,27.991 21.052,27.976L28.643,18.975L28.646,18.97C29.519,17.966 30,16.664 30,15.304C30,12.3 27.943,10 25.076,10C23.637,10 21.981,11.494 21,12.596C20.019,11.494 18.363,10 16.924,10Z"
|
||||
android:fillColor="#FF232B"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_liek_hint.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="240dp"
|
||||
android:height="240dp"
|
||||
android:viewportWidth="240"
|
||||
android:viewportHeight="240">
|
||||
<!-- <path-->
|
||||
<!-- android:pathData="M0,0h240v240h-240z"-->
|
||||
<!-- android:fillColor="url(#pattern0_184_2499)"/>-->
|
||||
</vector>
|
||||
28
app/src/main/res/drawable/icon_liek_uncheck.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="42dp"
|
||||
android:height="37dp"
|
||||
android:viewportWidth="42"
|
||||
android:viewportHeight="37">
|
||||
<path
|
||||
android:pathData="M39,1H3C1.895,1 1,1.895 1,3V34C1,35.105 1.895,36 3,36H39C40.105,36 41,35.105 41,34V3C41,1.895 40.105,1 39,1Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="76"
|
||||
android:startY="36"
|
||||
android:endX="76"
|
||||
android:endY="1"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FF303030"/>
|
||||
<item android:offset="1" android:color="#FF444444"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M39,0H3C1.343,0 0,1.343 0,3V34C0,35.657 1.343,37 3,37H39C40.657,37 42,35.657 42,34V3C42,1.343 40.657,0 39,0ZM39,1H3C1.895,1 1,1.895 1,3V34C1,35.105 1.895,36 3,36H39C40.105,36 41,35.105 41,34V3C41,1.895 40.105,1 39,1Z"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M16.924,10C14.057,10 12,12.3 12,15.304C12,16.665 12.481,17.967 13.354,18.972L20.949,27.976C20.962,27.991 20.98,28 21,28C21.02,28 21.038,27.991 21.052,27.976L28.643,18.975L28.646,18.97C29.519,17.966 30,16.664 30,15.304C30,12.3 27.943,10 25.076,10C23.637,10 21.981,11.494 21,12.596C20.019,11.494 18.363,10 16.924,10Z"
|
||||
android:fillColor="#E6E6E6"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_main_title.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="57dp"
|
||||
android:height="58dp"
|
||||
android:viewportWidth="57"
|
||||
android:viewportHeight="58">
|
||||
<!-- <path-->
|
||||
<!-- android:pathData="M0,0h57v58h-57z"-->
|
||||
<!-- android:fillColor="url(#pattern0_184_3308)"/>-->
|
||||
</vector>
|
||||
35
app/src/main/res/drawable/icon_pause.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="95dp"
|
||||
android:height="95dp"
|
||||
android:viewportWidth="95"
|
||||
android:viewportHeight="95">
|
||||
<path
|
||||
android:pathData="M47.5,95C73.733,95 95,73.733 95,47.5C95,21.267 73.733,0 47.5,0C21.267,0 0,21.267 0,47.5C0,73.733 21.267,95 47.5,95Z"
|
||||
android:fillColor="#181818"/>
|
||||
<path
|
||||
android:pathData="M47.5,88.803C70.312,88.803 88.804,70.31 88.804,47.499C88.804,24.687 70.312,6.194 47.5,6.194C24.688,6.194 6.196,24.687 6.196,47.499C6.196,70.31 24.688,88.803 47.5,88.803Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="47.5"
|
||||
android:startY="88.803"
|
||||
android:endX="47.5"
|
||||
android:endY="6.194"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FF303030"/>
|
||||
<item android:offset="1" android:color="#FF444444"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M47.5,90.868C71.452,90.868 90.869,71.451 90.869,47.499C90.869,23.546 71.452,4.129 47.5,4.129C23.548,4.129 4.13,23.546 4.13,47.499C4.13,71.451 23.548,90.868 47.5,90.868ZM47.5,88.803C70.312,88.803 88.804,70.311 88.804,47.499C88.804,24.686 70.312,6.194 47.5,6.194C24.688,6.194 6.196,24.686 6.196,47.499C6.196,70.311 24.688,88.803 47.5,88.803Z"
|
||||
android:fillColor="#020202"
|
||||
android:fillAlpha="0.5"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M33,31V64.046H45.364V31H33Z"
|
||||
android:fillColor="#CEE8FF"/>
|
||||
<path
|
||||
android:pathData="M49.364,31V64.046H61.729V31H49.364Z"
|
||||
android:fillColor="#CEE8FF"/>
|
||||
</vector>
|
||||
32
app/src/main/res/drawable/icon_play.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="95dp"
|
||||
android:height="95dp"
|
||||
android:viewportWidth="95"
|
||||
android:viewportHeight="95">
|
||||
<path
|
||||
android:pathData="M47.5,95C73.733,95 95,73.733 95,47.5C95,21.267 73.733,0 47.5,0C21.267,0 0,21.267 0,47.5C0,73.733 21.267,95 47.5,95Z"
|
||||
android:fillColor="#181818"/>
|
||||
<path
|
||||
android:pathData="M47.5,88.803C70.312,88.803 88.804,70.31 88.804,47.499C88.804,24.687 70.312,6.194 47.5,6.194C24.688,6.194 6.196,24.687 6.196,47.499C6.196,70.31 24.688,88.803 47.5,88.803Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="47.5"
|
||||
android:startY="88.803"
|
||||
android:endX="47.5"
|
||||
android:endY="6.194"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FF303030"/>
|
||||
<item android:offset="1" android:color="#FF444444"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M47.5,90.868C71.452,90.868 90.869,71.451 90.869,47.499C90.869,23.546 71.452,4.129 47.5,4.129C23.548,4.129 4.13,23.546 4.13,47.499C4.13,71.451 23.548,90.868 47.5,90.868ZM47.5,88.803C70.312,88.803 88.804,70.311 88.804,47.499C88.804,24.686 70.312,6.194 47.5,6.194C24.688,6.194 6.196,24.686 6.196,47.499C6.196,70.311 24.688,88.803 47.5,88.803Z"
|
||||
android:fillColor="#020202"
|
||||
android:fillAlpha="0.5"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M37.174,31.004V64.049L61.903,47.526L37.174,31.004Z"
|
||||
android:fillColor="#D1EAFF"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_pre_bg.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="375dp"
|
||||
android:height="375dp"
|
||||
android:viewportWidth="375"
|
||||
android:viewportHeight="375">
|
||||
<!-- <path-->
|
||||
<!-- android:pathData="M0,0h375v375h-375z"-->
|
||||
<!-- android:fillColor="url(#pattern0_184_4863)"/>-->
|
||||
</vector>
|
||||
39
app/src/main/res/drawable/icon_pre_video.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="293dp"
|
||||
android:height="344dp"
|
||||
android:viewportWidth="293"
|
||||
android:viewportHeight="344">
|
||||
<path
|
||||
android:pathData="M146.5,193.5m-137.5,0a137.5,137.5 0,1 1,275 0a137.5,137.5 0,1 1,-275 0"
|
||||
android:fillColor="#F7F9FF"/>
|
||||
<path
|
||||
android:pathData="M17,63h260v261h-260z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M146.5,193.5m-91.5,0a91.5,91.5 0,1 1,183 0a91.5,91.5 0,1 1,-183 0"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M255.29,8L255.69,41.38C255.78,48.85 253.17,56.1 248.34,61.79L225.37,88.89"
|
||||
android:strokeWidth="5.34066"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#EAEAEA"/>
|
||||
<path
|
||||
android:pathData="M255.9,8.9m-8.9,0a8.9,8.9 0,1 1,17.8 0a8.9,8.9 0,1 1,-17.8 0"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M255.9,8.9m-3.56,0a3.56,3.56 0,1 1,7.12 0a3.56,3.56 0,1 1,-7.12 0"
|
||||
android:fillColor="#D9D9D9"/>
|
||||
<path
|
||||
android:pathData="M231.19,89.37C231.82,88.61 231.71,87.49 230.96,86.86L226.17,82.88C225.41,82.25 224.29,82.35 223.66,83.11L215.69,92.69C215.06,93.44 213.94,93.55 213.18,92.92C212.43,92.29 211.3,92.39 210.68,93.15L202.14,103.41C201.51,104.17 201.61,105.29 202.37,105.92L212.63,114.46C213.39,115.09 214.51,114.98 215.14,114.23L223.68,103.96C224.31,103.21 224.2,102.08 223.45,101.46C222.69,100.83 222.59,99.71 223.22,98.95L231.19,89.37Z"
|
||||
android:fillColor="#D9D9D9"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M213.87,96.96L213.87,96.96A0.45,0.45 84.75,0 1,213.93 97.59L207.1,105.8A0.45,0.45 84.75,0 1,206.47 105.86L206.47,105.86A0.45,0.45 84.75,0 1,206.41 105.23L213.24,97.02A0.45,0.45 84.75,0 1,213.87 96.96z"
|
||||
android:fillColor="#716B6B"/>
|
||||
<path
|
||||
android:pathData="M220.03,102.09L220.03,102.09A0.45,0.45 84.75,0 1,220.09 102.71L213.26,110.92A0.45,0.45 84.75,0 1,212.63 110.98L212.63,110.98A0.45,0.45 84.75,0 1,212.57 110.36L219.4,102.14A0.45,0.45 84.75,0 1,220.03 102.09z"
|
||||
android:fillColor="#716B6B"/>
|
||||
<path
|
||||
android:pathData="M220.13,92.91C220.45,92.53 221.01,92.48 221.39,92.8L222.07,93.37C222.45,93.68 222.5,94.24 222.19,94.62L219.34,98.04L217.29,96.33L220.13,92.91Z"
|
||||
android:fillColor="#716B6B"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_sound_height.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:pathData="M4,12H9.333L16,5.333V26.666L9.333,20H4V12ZM18.667,14.666H22.667V10.666H25.333V14.666H29.333V17.333H25.333V21.333H22.667V17.333H18.667V14.666Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M4,12H9.333L16,5.333V26.666L9.333,20H4V12ZM18.667,14.666H22.667V10.666H25.333V14.666H29.333V17.333H25.333V21.333H22.667V17.333H18.667V14.666Z"
|
||||
android:fillColor="#353535"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_sound_low.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:pathData="M4,12H9.333L16,5.333V26.666L9.333,20H4V12ZM18.667,14.666H29.333V17.333H18.667V14.666Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M4,12H9.333L16,5.333V26.666L9.333,20H4V12ZM18.667,14.666H29.333V17.333H18.667V14.666Z"
|
||||
android:fillColor="#353535"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_sound_none.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:pathData="M4,12H9.333L16,5.333V26.666L9.333,20H4V12ZM22.12,16L18.667,12.546L20.547,10.666L24,14.12L27.453,10.666L29.333,12.546L25.88,16L29.333,19.453L27.453,21.333L24,17.88L20.547,21.333L18.667,19.453L22.12,16Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M4,12H9.333L16,5.333V26.666L9.333,20H4V12ZM22.12,16L18.667,12.546L20.547,10.666L24,14.12L27.453,10.666L29.333,12.546L25.88,16L29.333,19.453L27.453,21.333L24,17.88L20.547,21.333L18.667,19.453L22.12,16Z"
|
||||
android:fillColor="#353535"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/liek_list_background.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="4dp" android:color="@color/black"/>
|
||||
<solid android:color="@color/white"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="32dp"
|
||||
android:bottomRightRadius="32dp"
|
||||
android:topLeftRadius="32dp"
|
||||
android:topRightRadius="32dp" />
|
||||
</shape>
|
||||
17
app/src/main/res/drawable/like_background_1.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="30dp"
|
||||
android:bottomRightRadius="30dp"
|
||||
android:topLeftRadius="30dp"
|
||||
android:topRightRadius="30dp" />
|
||||
<gradient
|
||||
android:centerX="0.5"
|
||||
android:centerY="0.5"
|
||||
android:startColor="@color/like_color_1_star"
|
||||
android:endColor="@color/like_color_1_end"
|
||||
android:angle="90"
|
||||
android:type="linear"
|
||||
/>
|
||||
</shape>
|
||||
17
app/src/main/res/drawable/like_background_2.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="30dp"
|
||||
android:bottomRightRadius="30dp"
|
||||
android:topLeftRadius="30dp"
|
||||
android:topRightRadius="30dp" />
|
||||
<gradient
|
||||
android:centerX="0.5"
|
||||
android:centerY="0.5"
|
||||
android:startColor="@color/like_color_2_star"
|
||||
android:endColor="@color/like_color_2_end"
|
||||
android:angle="90"
|
||||
android:type="linear"
|
||||
/>
|
||||
</shape>
|
||||
17
app/src/main/res/drawable/like_background_3.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="30dp"
|
||||
android:bottomRightRadius="30dp"
|
||||
android:topLeftRadius="30dp"
|
||||
android:topRightRadius="30dp" />
|
||||
<gradient
|
||||
android:centerX="0.5"
|
||||
android:centerY="0.5"
|
||||
android:startColor="@color/like_color_3_star"
|
||||
android:endColor="@color/like_color_3_end"
|
||||
android:angle="90"
|
||||
android:type="linear"
|
||||
/>
|
||||
</shape>
|
||||
17
app/src/main/res/drawable/like_background_4.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="30dp"
|
||||
android:bottomRightRadius="30dp"
|
||||
android:topLeftRadius="30dp"
|
||||
android:topRightRadius="30dp" />
|
||||
<gradient
|
||||
android:centerX="0.5"
|
||||
android:centerY="0.5"
|
||||
android:startColor="@color/like_color_4_star"
|
||||
android:endColor="@color/like_color_4_end"
|
||||
android:angle="90"
|
||||
android:type="linear"
|
||||
/>
|
||||
</shape>
|
||||
42
app/src/main/res/drawable/like_check.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:pathData="M34.513,21.261C35.337,20.346 35.95,19.261 36.307,18.082C36.664,16.904 36.757,15.661 36.579,14.443C36.401,13.224 35.956,12.06 35.276,11.033C34.597,10.006 33.699,9.142 32.647,8.501C32.27,8.274 31.875,8.077 31.467,7.911C31.139,7.779 30.803,7.666 30.461,7.575C28.991,7.184 27.443,7.201 25.982,7.623C24.521,8.046 23.202,8.858 22.168,9.973C20.656,8.397 18.587,7.475 16.405,7.404C14.222,7.332 12.098,8.117 10.486,9.591C8.874,11.065 7.903,13.111 7.779,15.291C7.655,17.472 8.389,19.614 9.824,21.261C9.824,21.261 10.554,21.989 10.91,22.266L22.168,32.541L33.426,22.27C33.783,21.993 34.513,21.261 34.513,21.261Z"
|
||||
android:fillColor="#FCF004"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M34.513,21.261L34.867,21.614L34.875,21.605L34.884,21.596C35.758,20.626 36.407,19.476 36.785,18.227C37.164,16.979 37.262,15.662 37.073,14.37C36.885,13.079 36.413,11.845 35.693,10.757C34.973,9.669 34.022,8.753 32.907,8.074L32.905,8.073C32.505,7.832 32.087,7.624 31.655,7.448L31.654,7.447C31.307,7.307 30.952,7.189 30.591,7.092L30.59,7.091C29.032,6.677 27.391,6.695 25.843,7.143C24.46,7.543 23.197,8.273 22.162,9.266C20.6,7.817 18.563,6.974 16.421,6.904C14.108,6.828 11.857,7.66 10.149,9.222C8.44,10.784 7.411,12.952 7.28,15.263C7.149,17.574 7.926,19.844 9.447,21.589L9.458,21.603L9.471,21.615L9.824,21.261L9.471,21.615L9.471,21.615L9.471,21.615L9.471,21.616L9.473,21.617L9.479,21.624L9.504,21.648C9.525,21.669 9.555,21.699 9.593,21.736C9.668,21.81 9.772,21.911 9.888,22.021C10.107,22.23 10.387,22.49 10.586,22.648L21.831,32.91L22.168,33.218L22.505,32.91L33.75,22.652C33.95,22.494 34.23,22.232 34.449,22.022C34.565,21.912 34.669,21.81 34.744,21.736C34.782,21.698 34.812,21.668 34.833,21.647L34.858,21.623L34.864,21.616L34.866,21.615L34.866,21.614L34.867,21.614L34.867,21.614L34.513,21.261Z"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M34.513,21.261C35.337,20.346 35.95,19.261 36.307,18.082C36.664,16.904 36.757,15.661 36.579,14.443C36.401,13.224 35.956,12.06 35.276,11.033C34.597,10.006 33.699,9.142 32.647,8.501C32.27,8.274 31.875,8.077 31.467,7.911C31.139,7.779 30.803,7.666 30.461,7.575C28.991,7.184 27.443,7.201 25.982,7.623C24.521,8.046 23.202,8.858 22.168,9.973C20.656,8.397 18.587,7.475 16.405,7.404C14.222,7.332 12.098,8.117 10.486,9.591C8.874,11.065 7.903,13.111 7.779,15.291C7.655,17.472 8.389,19.614 9.824,21.261C9.824,21.261 10.554,21.989 10.91,22.266L22.168,32.541L33.426,22.27C33.783,21.993 34.513,21.261 34.513,21.261Z"
|
||||
android:fillColor="#FCF004"/>
|
||||
<path
|
||||
android:pathData="M21.84,10.288L22.174,10.635L22.501,10.282C23.48,9.228 24.726,8.46 26.108,8.06C27.49,7.66 28.954,7.644 30.344,8.014C30.667,8.1 30.985,8.207 31.296,8.332C31.682,8.489 32.055,8.676 32.412,8.89C33.406,9.496 34.255,10.313 34.897,11.284C35.54,12.255 35.96,13.356 36.129,14.508C36.297,15.661 36.21,16.836 35.872,17.951C35.535,19.062 34.958,20.085 34.183,20.948L34.16,20.971C34.14,20.991 34.11,21.02 34.074,21.056C34.001,21.128 33.9,21.226 33.788,21.333C33.56,21.553 33.304,21.789 33.147,21.912L33.133,21.923L33.12,21.934L22.168,31.926L11.216,21.931L11.203,21.919L11.189,21.908C11.032,21.785 10.776,21.549 10.547,21.331C10.435,21.224 10.335,21.126 10.262,21.054C10.225,21.019 10.196,20.99 10.175,20.97L10.156,20.95C8.806,19.395 8.116,17.374 8.233,15.317C8.35,13.255 9.268,11.32 10.793,9.927C12.317,8.533 14.326,7.791 16.39,7.858C18.454,7.925 20.41,8.797 21.84,10.288Z"
|
||||
android:strokeWidth="0.90909"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M9.93,17.362C9.93,15.61 10.547,13.918 11.665,12.603C12.783,11.288 14.326,10.439 16.005,10.215C15.728,10.176 15.448,10.156 15.168,10.155C13.971,10.155 12.8,10.515 11.797,11.19C10.793,11.866 10,12.827 9.514,13.959C9.028,15.091 8.87,16.344 9.058,17.567C9.246,18.791 9.773,19.931 10.575,20.851C10.575,20.851 10.866,21.152 11.122,21.393C10.344,20.203 9.928,18.799 9.93,17.362Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M23.384,24.315C24.258,23.347 24.8,22.125 24.931,20.828C25.062,19.53 24.775,18.225 24.112,17.102C23.966,16.86 23.805,16.627 23.628,16.407C23.504,16.248 23.373,16.095 23.234,15.949C22.874,15.578 22.468,15.255 22.026,14.987C21.75,14.818 21.46,14.672 21.16,14.55C20.921,14.451 20.675,14.369 20.425,14.304C19.35,14.019 18.219,14.032 17.151,14.341C16.084,14.65 15.12,15.244 14.365,16.059C13.823,15.466 13.169,14.985 12.441,14.644C11.713,14.304 10.925,14.11 10.123,14.074C8.501,14 6.917,14.575 5.719,15.669C4.521,16.764 3.807,18.29 3.734,19.911C3.661,21.533 4.235,23.117 5.33,24.315C5.33,24.315 5.863,24.848 6.117,25.051L14.347,32.563L22.589,25.051C22.851,24.848 23.384,24.315 23.384,24.315Z"
|
||||
android:fillColor="#FCF004"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M23.232,16.713L23.232,16.713L23.238,16.72C23.4,16.922 23.549,17.135 23.682,17.358C24.291,18.388 24.554,19.587 24.434,20.778C24.314,21.965 23.819,23.083 23.021,23.97L23.008,23.983L22.946,24.045C22.893,24.097 22.82,24.168 22.739,24.245C22.571,24.406 22.39,24.572 22.283,24.655L22.267,24.668L22.252,24.681L14.347,31.886L6.454,24.681L6.441,24.67L6.429,24.66C6.322,24.575 6.141,24.407 5.974,24.246C5.894,24.169 5.821,24.097 5.768,24.045L5.705,23.983L5.691,23.969C4.691,22.87 4.166,21.419 4.233,19.934C4.3,18.445 4.956,17.044 6.056,16.038C7.157,15.033 8.611,14.506 10.1,14.573C10.837,14.606 11.561,14.784 12.229,15.097C12.898,15.41 13.498,15.851 13.995,16.396L14.362,16.797L14.731,16.399C15.425,15.651 16.31,15.105 17.29,14.821C18.271,14.537 19.31,14.526 20.296,14.787L20.3,14.788C20.528,14.847 20.752,14.922 20.969,15.012L20.972,15.013C21.247,15.125 21.512,15.259 21.766,15.413L21.766,15.414C22.171,15.66 22.543,15.956 22.874,16.295C23,16.429 23.12,16.568 23.232,16.713Z"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M34.298,9.821C33.806,9.314 33.251,8.871 32.647,8.504L34.298,9.821Z"
|
||||
android:fillColor="#E60012"/>
|
||||
<path
|
||||
android:pathData="M23.234,15.951C22.874,15.581 22.468,15.257 22.026,14.989L23.234,15.951Z"
|
||||
android:fillColor="#E60012"/>
|
||||
<path
|
||||
android:pathData="M6.931,21.179C6.931,19.865 7.424,18.597 8.319,17.61C9.213,16.624 10.448,15.987 11.791,15.819C11.569,15.79 11.345,15.775 11.121,15.774C10.163,15.774 9.227,16.044 8.424,16.551C7.621,17.057 6.987,17.778 6.598,18.627C6.209,19.476 6.083,20.416 6.233,21.333C6.384,22.251 6.805,23.106 7.447,23.796C7.447,23.796 7.679,24.022 7.884,24.203C7.261,23.31 6.929,22.257 6.931,21.179Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
42
app/src/main/res/drawable/like_uncheck.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:pathData="M34.513,21.261C35.337,20.346 35.95,19.261 36.307,18.082C36.664,16.904 36.757,15.661 36.579,14.443C36.401,13.224 35.956,12.06 35.276,11.033C34.597,10.006 33.699,9.142 32.647,8.501C32.27,8.274 31.875,8.077 31.467,7.911C31.139,7.779 30.803,7.666 30.461,7.575C28.992,7.184 27.443,7.201 25.982,7.623C24.521,8.046 23.203,8.858 22.168,9.973C20.656,8.397 18.588,7.475 16.405,7.404C14.222,7.332 12.098,8.117 10.486,9.591C8.874,11.065 7.903,13.111 7.779,15.291C7.655,17.472 8.389,19.614 9.824,21.261C9.824,21.261 10.554,21.989 10.91,22.266L22.168,32.541L33.426,22.27C33.783,21.993 34.513,21.261 34.513,21.261Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M34.513,21.261L34.867,21.614L34.875,21.605L34.884,21.596C35.758,20.626 36.407,19.476 36.785,18.227C37.164,16.979 37.262,15.662 37.073,14.37C36.885,13.079 36.414,11.845 35.693,10.757C34.973,9.669 34.022,8.753 32.907,8.074L32.905,8.073C32.505,7.832 32.087,7.624 31.655,7.448L31.654,7.447C31.307,7.307 30.952,7.189 30.591,7.092L30.59,7.091C29.032,6.677 27.391,6.695 25.843,7.143C24.46,7.543 23.197,8.273 22.162,9.266C20.6,7.817 18.563,6.974 16.421,6.904C14.108,6.828 11.857,7.66 10.149,9.222C8.441,10.784 7.411,12.952 7.28,15.263C7.149,17.574 7.926,19.844 9.447,21.589L9.458,21.603L9.471,21.615L9.824,21.261L9.471,21.615L9.471,21.615L9.471,21.615L9.471,21.616L9.473,21.617L9.479,21.624L9.504,21.648C9.525,21.669 9.556,21.699 9.593,21.736C9.668,21.81 9.772,21.911 9.888,22.021C10.107,22.23 10.387,22.49 10.586,22.648L21.831,32.91L22.168,33.218L22.505,32.91L33.75,22.652C33.95,22.494 34.23,22.232 34.449,22.022C34.565,21.912 34.669,21.81 34.744,21.736C34.782,21.698 34.812,21.668 34.833,21.647L34.858,21.623L34.864,21.616L34.866,21.615L34.866,21.614L34.867,21.614L34.867,21.614L34.513,21.261Z"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M34.513,21.261C35.337,20.346 35.95,19.261 36.307,18.082C36.664,16.904 36.757,15.661 36.579,14.443C36.401,13.224 35.956,12.06 35.276,11.033C34.597,10.006 33.699,9.142 32.647,8.501C32.27,8.274 31.875,8.077 31.467,7.911C31.139,7.779 30.803,7.666 30.461,7.575C28.992,7.184 27.443,7.201 25.982,7.623C24.521,8.046 23.203,8.858 22.168,9.973C20.656,8.397 18.588,7.475 16.405,7.404C14.222,7.332 12.098,8.117 10.486,9.591C8.874,11.065 7.903,13.111 7.779,15.291C7.655,17.472 8.389,19.614 9.824,21.261C9.824,21.261 10.554,21.989 10.91,22.266L22.168,32.541L33.426,22.27C33.783,21.993 34.513,21.261 34.513,21.261Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M21.84,10.288L22.174,10.635L22.501,10.282C23.48,9.228 24.727,8.46 26.108,8.06C27.49,7.66 28.954,7.644 30.344,8.014C30.667,8.1 30.986,8.207 31.296,8.332C31.682,8.489 32.055,8.676 32.412,8.89C33.406,9.496 34.255,10.313 34.897,11.284C35.54,12.255 35.96,13.356 36.129,14.508C36.297,15.661 36.21,16.836 35.872,17.951C35.535,19.062 34.959,20.085 34.183,20.948L34.16,20.971C34.14,20.991 34.11,21.02 34.074,21.056C34.001,21.128 33.9,21.226 33.789,21.333C33.56,21.553 33.304,21.789 33.147,21.912L33.133,21.923L33.12,21.934L22.168,31.926L11.216,21.931L11.203,21.919L11.189,21.908C11.032,21.785 10.776,21.549 10.547,21.331C10.435,21.224 10.335,21.126 10.262,21.054C10.225,21.019 10.196,20.99 10.175,20.97L10.156,20.95C8.806,19.395 8.116,17.374 8.233,15.317C8.35,13.255 9.269,11.32 10.793,9.927C12.317,8.533 14.326,7.791 16.39,7.858C18.454,7.925 20.41,8.797 21.84,10.288Z"
|
||||
android:strokeWidth="0.90909"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M9.93,17.362C9.93,15.61 10.547,13.918 11.665,12.603C12.783,11.288 14.326,10.439 16.005,10.215C15.728,10.176 15.448,10.156 15.168,10.155C13.971,10.155 12.8,10.515 11.797,11.19C10.793,11.866 10,12.827 9.514,13.959C9.028,15.091 8.87,16.344 9.058,17.567C9.246,18.791 9.773,19.931 10.575,20.851C10.575,20.851 10.866,21.152 11.122,21.393C10.344,20.203 9.928,18.799 9.93,17.362Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M23.384,24.315C24.258,23.347 24.8,22.125 24.931,20.828C25.062,19.53 24.775,18.225 24.112,17.102C23.966,16.86 23.805,16.627 23.628,16.407C23.504,16.248 23.373,16.095 23.234,15.949C22.874,15.578 22.468,15.255 22.026,14.987C21.75,14.818 21.46,14.672 21.16,14.55C20.921,14.451 20.675,14.369 20.425,14.304C19.35,14.019 18.219,14.032 17.151,14.341C16.084,14.65 15.12,15.244 14.365,16.059C13.823,15.466 13.169,14.985 12.441,14.644C11.713,14.304 10.925,14.11 10.123,14.074C8.501,14 6.917,14.575 5.719,15.669C4.521,16.764 3.807,18.29 3.734,19.911C3.661,21.533 4.235,23.117 5.33,24.315C5.33,24.315 5.863,24.848 6.117,25.051L14.347,32.563L22.589,25.051C22.851,24.848 23.384,24.315 23.384,24.315Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M23.232,16.713L23.232,16.713L23.238,16.72C23.4,16.922 23.549,17.135 23.682,17.358C24.291,18.388 24.554,19.587 24.434,20.778C24.314,21.965 23.819,23.083 23.021,23.97L23.008,23.983L22.946,24.045C22.893,24.097 22.82,24.168 22.739,24.245C22.571,24.406 22.39,24.572 22.283,24.655L22.267,24.668L22.252,24.681L14.347,31.886L6.454,24.681L6.441,24.67L6.429,24.66C6.322,24.575 6.141,24.407 5.974,24.246C5.894,24.169 5.821,24.097 5.768,24.045L5.705,23.983L5.691,23.969C4.691,22.87 4.166,21.419 4.233,19.934C4.3,18.445 4.956,17.044 6.056,16.038C7.157,15.033 8.611,14.506 10.1,14.573C10.837,14.606 11.561,14.784 12.229,15.097C12.897,15.41 13.498,15.851 13.995,16.396L14.362,16.797L14.731,16.399C15.425,15.651 16.31,15.105 17.29,14.821C18.271,14.537 19.31,14.526 20.296,14.787L20.3,14.788C20.528,14.847 20.752,14.922 20.969,15.012L20.972,15.013C21.247,15.125 21.512,15.259 21.766,15.413L21.766,15.414C22.171,15.66 22.543,15.956 22.874,16.295C23,16.429 23.12,16.568 23.232,16.713Z"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M34.298,9.821C33.806,9.314 33.251,8.871 32.647,8.504L34.298,9.821Z"
|
||||
android:fillColor="#E60012"/>
|
||||
<path
|
||||
android:pathData="M23.234,15.951C22.874,15.581 22.468,15.257 22.026,14.989L23.234,15.951Z"
|
||||
android:fillColor="#E60012"/>
|
||||
<path
|
||||
android:pathData="M6.931,21.179C6.931,19.865 7.424,18.597 8.319,17.61C9.213,16.624 10.448,15.987 11.791,15.819C11.569,15.79 11.345,15.775 11.121,15.774C10.163,15.774 9.227,16.044 8.424,16.551C7.621,17.057 6.987,17.778 6.598,18.627C6.209,19.476 6.083,20.416 6.233,21.333C6.384,22.251 6.805,23.106 7.447,23.796C7.447,23.796 7.679,24.022 7.884,24.203C7.261,23.31 6.929,22.257 6.931,21.179Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/list_background.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="4dp" android:color="@color/black"/>
|
||||
<solid android:color="@android:color/transparent"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="32dp"
|
||||
android:bottomRightRadius="32dp"
|
||||
android:topLeftRadius="32dp"
|
||||
android:topRightRadius="32dp" />
|
||||
</shape>
|
||||
28
app/src/main/res/drawable/main_check.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:pathData="M30.833,5.71V15.666C30.833,16.132 30.367,16.599 29.9,16.443C29.9,16.443 23.833,12.399 16.833,12.399V16.132H17.144C17.922,16.132 18.7,16.443 19.011,17.066L21.033,19.866C21.344,20.177 21.5,20.643 21.5,20.955V33.399C21.5,34.488 20.411,35.577 19.167,35.577H11.389C10.144,35.577 9.056,34.643 9.056,33.399V20.955C9.056,20.488 9.211,20.177 9.522,19.866L11.544,17.066C12.011,16.443 12.633,16.132 13.411,16.132H13.722V13.799C13.1,14.577 12.167,15.043 11.233,15.043C9.211,15.043 7.5,13.021 7.5,10.688C7.5,8.354 9.211,6.332 11.233,6.332C12.167,6.488 13.1,6.954 13.722,7.577V5.399H16.833V9.132C23.833,9.132 29.9,5.088 29.9,5.088C30.367,4.932 30.833,5.243 30.833,5.71Z"
|
||||
android:fillColor="#FCF004"/>
|
||||
<path
|
||||
android:pathData="M29.382,17.22L29.383,17.22L29.383,17.22L29.383,17.22L29.486,17.289L29.605,17.329C30.23,17.537 30.803,17.305 31.162,16.985C31.512,16.674 31.767,16.196 31.767,15.666V5.71C31.767,4.53 30.601,3.87 29.605,4.202L29.486,4.242L29.383,4.311L29.383,4.311L29.383,4.311L29.382,4.311L29.381,4.312L29.371,4.318L29.326,4.348C29.285,4.374 29.221,4.415 29.136,4.467C28.967,4.571 28.714,4.722 28.387,4.905C27.733,5.271 26.787,5.76 25.628,6.25C23.52,7.142 20.746,8.017 17.767,8.174V5.399V4.466H16.833H13.722H12.789V5.399V5.839C12.339,5.637 11.862,5.491 11.387,5.412L11.311,5.399H11.233C8.563,5.399 6.567,7.983 6.567,10.688C6.567,13.393 8.563,15.977 11.233,15.977C11.25,15.977 11.267,15.977 11.284,15.976C11.109,16.131 10.947,16.307 10.798,16.506L10.793,16.512L10.788,16.519L8.806,19.263C8.617,19.461 8.444,19.692 8.319,19.973C8.18,20.285 8.122,20.612 8.122,20.955V33.399C8.122,35.241 9.715,36.51 11.389,36.51H19.167C20.061,36.51 20.868,36.122 21.444,35.571C22.016,35.026 22.433,34.25 22.433,33.399V20.955C22.433,20.434 22.21,19.76 21.752,19.267L19.806,16.573C19.371,15.775 18.549,15.383 17.767,15.251V13.357C20.746,13.514 23.52,14.389 25.628,15.281C26.787,15.771 27.733,16.26 28.387,16.626C28.714,16.809 28.967,16.96 29.136,17.064C29.221,17.116 29.285,17.157 29.326,17.183L29.371,17.213L29.381,17.219L29.382,17.22Z"
|
||||
android:strokeWidth="1.86667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M30.833,5.71V15.666C30.833,16.132 30.367,16.599 29.9,16.443C29.9,16.443 23.833,12.399 16.833,12.399V16.132H17.144C17.922,16.132 18.7,16.443 19.011,17.066L21.033,19.866C21.344,20.177 21.5,20.643 21.5,20.955V33.399C21.5,34.488 20.411,35.577 19.167,35.577H11.389C10.144,35.577 9.056,34.643 9.056,33.399V20.955C9.056,20.488 9.211,20.177 9.522,19.866L11.544,17.066C12.011,16.443 12.633,16.132 13.411,16.132H13.722V13.799C13.1,14.577 12.167,15.043 11.233,15.043C9.211,15.043 7.5,13.021 7.5,10.688C7.5,8.354 9.211,6.332 11.233,6.332C12.167,6.488 13.1,6.954 13.722,7.577V5.399H16.833V9.132C23.833,9.132 29.9,5.088 29.9,5.088C30.367,4.932 30.833,5.243 30.833,5.71Z"
|
||||
android:fillColor="#FCF004"/>
|
||||
<path
|
||||
android:pathData="M29.646,16.825L29.646,16.825L29.646,4.706L29.646,4.707L29.643,4.708L29.631,4.716C29.621,4.723 29.604,4.733 29.583,4.748C29.539,4.776 29.472,4.818 29.385,4.871C29.211,4.979 28.952,5.134 28.619,5.32C27.953,5.692 26.991,6.19 25.813,6.688C23.559,7.641 20.535,8.585 17.292,8.668V5.399V4.941H16.833H13.722H13.264V5.399V6.632C12.677,6.26 11.992,5.994 11.309,5.88L11.271,5.874H11.233C8.893,5.874 7.042,8.172 7.042,10.688C7.042,13.204 8.893,15.502 11.233,15.502C11.953,15.502 12.663,15.264 13.264,14.847V15.677C12.408,15.716 11.701,16.093 11.178,16.791L11.178,16.791L11.173,16.797L9.171,19.569C9,19.744 8.855,19.937 8.753,20.166C8.646,20.408 8.597,20.668 8.597,20.955V33.399C8.597,34.937 9.933,36.035 11.389,36.035H19.167C19.923,36.035 20.616,35.706 21.117,35.228C21.615,34.752 21.958,34.094 21.958,33.399V20.955C21.958,20.54 21.769,19.971 21.385,19.57L19.403,16.825C18.996,16.054 18.105,15.714 17.292,15.677V12.863C20.535,12.946 23.559,13.89 25.813,14.843C26.991,15.341 27.953,15.839 28.619,16.212C28.952,16.398 29.211,16.552 29.385,16.66C29.472,16.714 29.539,16.756 29.583,16.784C29.591,16.789 29.599,16.794 29.605,16.798C29.616,16.805 29.625,16.811 29.631,16.815L29.643,16.823L29.646,16.824L29.646,16.825ZM29.697,4.672L29.646,4.706L29.697,16.859L29.755,16.878C30.181,17.02 30.581,16.866 30.846,16.63C31.107,16.399 31.292,16.045 31.292,15.666V5.71C31.292,4.893 30.482,4.411 29.755,4.653L29.697,4.672Z"
|
||||
android:strokeWidth="0.916667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M11.575,7.616C11.73,7.87 11.383,8.363 10.801,8.716C10.219,9.068 9.622,9.148 9.468,8.893C9.314,8.639 9.592,7.977 10.174,7.624C10.756,7.271 11.421,7.361 11.575,7.616Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M11.389,20.021L11.389,20.021A0.778,0.778 0,0 1,12.167 20.799L12.167,28.577A0.778,0.778 0,0 1,11.389 29.354L11.389,29.354A0.778,0.778 0,0 1,10.611 28.577L10.611,20.799A0.778,0.778 0,0 1,11.389 20.021z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
22
app/src/main/res/drawable/main_uncheck.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:pathData="M30.833,5.71V15.666C30.833,16.132 30.367,16.599 29.9,16.443C29.9,16.443 23.833,12.399 16.833,12.399V16.132H17.144C17.922,16.132 18.7,16.443 19.011,17.066L21.033,19.866C21.344,20.177 21.5,20.643 21.5,20.955V33.399C21.5,34.488 20.411,35.577 19.167,35.577H11.389C10.144,35.577 9.056,34.643 9.056,33.399V20.955C9.056,20.488 9.211,20.177 9.522,19.866L11.544,17.066C12.011,16.443 12.633,16.132 13.411,16.132H13.722V13.799C13.1,14.577 12.167,15.043 11.233,15.043C9.211,15.043 7.5,13.021 7.5,10.688C7.5,8.354 9.211,6.332 11.233,6.332C12.167,6.488 13.1,6.954 13.722,7.577V5.399H16.833V9.132C23.833,9.132 29.9,5.088 29.9,5.088C30.367,4.932 30.833,5.243 30.833,5.71Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M29.382,17.22L29.383,17.22L29.383,17.22L29.383,17.22L29.486,17.289L29.605,17.329C30.23,17.537 30.803,17.305 31.162,16.985C31.512,16.674 31.767,16.196 31.767,15.666V5.71C31.767,4.53 30.601,3.87 29.605,4.202L29.486,4.242L29.383,4.311L29.383,4.311L29.383,4.311L29.382,4.311L29.381,4.312L29.371,4.318L29.326,4.348C29.285,4.374 29.221,4.415 29.136,4.467C28.967,4.571 28.714,4.722 28.387,4.905C27.733,5.271 26.787,5.76 25.628,6.25C23.52,7.142 20.746,8.017 17.767,8.174V5.399V4.466H16.833H13.722H12.789V5.399V5.839C12.339,5.637 11.862,5.491 11.387,5.412L11.311,5.399H11.233C8.563,5.399 6.567,7.983 6.567,10.688C6.567,13.393 8.563,15.977 11.233,15.977C11.25,15.977 11.267,15.977 11.284,15.976C11.109,16.131 10.947,16.307 10.798,16.506L10.793,16.512L10.788,16.519L8.806,19.263C8.617,19.461 8.444,19.692 8.319,19.973C8.18,20.285 8.122,20.612 8.122,20.955V33.399C8.122,35.241 9.715,36.51 11.389,36.51H19.167C20.061,36.51 20.868,36.122 21.444,35.571C22.016,35.026 22.433,34.25 22.433,33.399V20.955C22.433,20.434 22.21,19.76 21.752,19.267L19.806,16.573C19.371,15.775 18.549,15.383 17.767,15.251V13.357C20.746,13.514 23.52,14.389 25.628,15.281C26.787,15.771 27.733,16.26 28.387,16.626C28.714,16.809 28.967,16.96 29.136,17.064C29.221,17.116 29.285,17.157 29.326,17.183L29.371,17.213L29.381,17.219L29.382,17.22Z"
|
||||
android:strokeWidth="1.86667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M30.833,5.71V15.666C30.833,16.132 30.367,16.599 29.9,16.443C29.9,16.443 23.833,12.399 16.833,12.399V16.132H17.144C17.922,16.132 18.7,16.443 19.011,17.066L21.033,19.866C21.344,20.177 21.5,20.643 21.5,20.955V33.399C21.5,34.488 20.411,35.577 19.167,35.577H11.389C10.144,35.577 9.056,34.643 9.056,33.399V20.955C9.056,20.488 9.211,20.177 9.522,19.866L11.544,17.066C12.011,16.443 12.633,16.132 13.411,16.132H13.722V13.799C13.1,14.577 12.167,15.043 11.233,15.043C9.211,15.043 7.5,13.021 7.5,10.688C7.5,8.354 9.211,6.332 11.233,6.332C12.167,6.488 13.1,6.954 13.722,7.577V5.399H16.833V9.132C23.833,9.132 29.9,5.088 29.9,5.088C30.367,4.932 30.833,5.243 30.833,5.71Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M29.646,16.825L29.646,16.825L29.646,4.706L29.646,4.707L29.643,4.708L29.631,4.716C29.621,4.723 29.604,4.733 29.583,4.748C29.539,4.776 29.472,4.818 29.385,4.871C29.211,4.979 28.952,5.134 28.619,5.32C27.953,5.692 26.991,6.19 25.813,6.688C23.559,7.641 20.535,8.585 17.292,8.668V5.399V4.941H16.833H13.722H13.264V5.399V6.632C12.677,6.26 11.992,5.994 11.309,5.88L11.271,5.874H11.233C8.893,5.874 7.042,8.172 7.042,10.688C7.042,13.204 8.893,15.502 11.233,15.502C11.953,15.502 12.663,15.264 13.264,14.847V15.677C12.408,15.716 11.701,16.093 11.178,16.791L11.178,16.791L11.173,16.797L9.171,19.569C9,19.744 8.855,19.937 8.753,20.166C8.646,20.408 8.597,20.668 8.597,20.955V33.399C8.597,34.937 9.933,36.035 11.389,36.035H19.167C19.923,36.035 20.616,35.706 21.117,35.228C21.615,34.752 21.958,34.094 21.958,33.399V20.955C21.958,20.54 21.769,19.971 21.385,19.57L19.403,16.825C18.996,16.054 18.105,15.714 17.292,15.677V12.863C20.535,12.946 23.559,13.89 25.813,14.843C26.991,15.341 27.953,15.839 28.619,16.212C28.952,16.398 29.211,16.552 29.385,16.66C29.472,16.714 29.539,16.756 29.583,16.784C29.591,16.789 29.599,16.794 29.605,16.798C29.616,16.805 29.625,16.811 29.631,16.815L29.643,16.823L29.646,16.824L29.646,16.825ZM29.697,4.672L29.646,4.706L29.697,16.859L29.755,16.878C30.181,17.02 30.581,16.866 30.846,16.63C31.107,16.399 31.292,16.045 31.292,15.666V5.71C31.292,4.893 30.482,4.411 29.755,4.653L29.697,4.672Z"
|
||||
android:strokeWidth="0.916667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/mainlist_background.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="4dp" android:color="@color/black"/>
|
||||
<solid android:color="@color/white"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="32dp"
|
||||
android:bottomRightRadius="32dp"
|
||||
android:topLeftRadius="32dp"
|
||||
android:topRightRadius="32dp" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/mainlist_bg.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners
|
||||
android:bottomLeftRadius="32dp"
|
||||
android:bottomRightRadius="32dp"
|
||||
android:topLeftRadius="32dp"
|
||||
android:topRightRadius="32dp" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/seek_bar_thumb.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="oval">
|
||||
<solid android:color="@color/black" />
|
||||
<size
|
||||
android:width="12dp"
|
||||
android:height="12dp" />
|
||||
</shape>
|
||||
17
app/src/main/res/drawable/seekbar_style.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?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 android:shape="rectangle">
|
||||
<solid android:color="@color/gray" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<solid android:color="@color/seekbar_check" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
</layer-list>
|
||||
12
app/src/main/res/drawable/switch_select.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/check" />
|
||||
<size android:height="10dp" />
|
||||
<stroke android:color="#00000000" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
7
app/src/main/res/drawable/switch_selector.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/switch_unselect" android:state_checked="false" />
|
||||
<item android:drawable="@drawable/switch_select" android:state_checked="true" />
|
||||
|
||||
</selector>
|
||||
11
app/src/main/res/drawable/switch_unselect.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/gray" />
|
||||
<size android:height="10dp" />
|
||||
<stroke android:color="#00000000" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
16
app/src/main/res/drawable/thumb_sw.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="2dp">
|
||||
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/black" />
|
||||
<size
|
||||
android:width="18dp"
|
||||
android:height="18dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
57
app/src/main/res/layout/activity_list.xml
Normal file
@ -0,0 +1,57 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.ListActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_main">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:background="@drawable/icon_back_bg"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/prew_list_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/prew_list_title">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/icon_back" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/prew_list_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/main_title_color"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/prew_list_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/prew_list_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
32
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.MainActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/main_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:id="@+id/main_tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/butoon_tablayout"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:tabIndicatorHeight="0dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
176
app/src/main/res/layout/activity_prew.xml
Normal file
@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView 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:id="@+id/activity_pre"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.PrewActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="@mipmap/bg_main"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pre_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:background="@drawable/icon_back_bg"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/pre_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/pre_title">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/icon_back" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/pre_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/main_title_color"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/pre_loop_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/loop"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_title" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/loop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:thumb="@drawable/thumb_sw"
|
||||
app:layout_constraintEnd_toEndOf="@id/pre_loop_text"
|
||||
app:layout_constraintStart_toStartOf="@id/pre_loop_text"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_loop_text"
|
||||
app:track="@drawable/switch_selector" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pre_pg"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:indeterminateTint="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/pre_cons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/pre_video_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/loop">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/pre_video"/>
|
||||
|
||||
<ImageView
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:id="@+id/pre_image"
|
||||
android:layout_width="100dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_height="100dp" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pre_like"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_cons"
|
||||
android:background="@drawable/icon_liek_uncheck"
|
||||
app:layout_constraintBottom_toTopOf="@id/seekbar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar"
|
||||
android:layout_width="210dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="56dp"
|
||||
android:progressDrawable="@drawable/seekbar_style"
|
||||
android:thumb="@drawable/seek_bar_thumb"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_like"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/volumeleft"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="@drawable/icon_sound_low"
|
||||
app:layout_constraintBottom_toBottomOf="@id/seekbar"
|
||||
app:layout_constraintEnd_toStartOf="@id/seekbar"
|
||||
app:layout_constraintTop_toTopOf="@id/seekbar" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/volumeright"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:background="@drawable/icon_sound_height"
|
||||
app:layout_constraintBottom_toBottomOf="@id/seekbar"
|
||||
app:layout_constraintStart_toEndOf="@id/seekbar"
|
||||
app:layout_constraintTop_toTopOf="@id/seekbar" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pre_play"
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="95dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/icon_play"
|
||||
app:layout_constraintTop_toBottomOf="@id/seekbar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_play"
|
||||
android:layout_height="200dp"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
49
app/src/main/res/layout/activity_splash.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/activity_splash"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.SplashActivity">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/icon_logo" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/logo" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:indeterminateTint="@color/white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
62
app/src/main/res/layout/fragment_like.xml
Normal file
@ -0,0 +1,62 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".fragment.LikeFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_like">
|
||||
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/like_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/like_title"
|
||||
android:textColor="@color/main_title_color"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/like_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/like_title" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/like_hint_image"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="240dp"
|
||||
android:layout_marginBottom="11dp"
|
||||
android:background="@mipmap/like_hint"
|
||||
app:layout_constraintBottom_toTopOf="@id/like_hint_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/like_hint_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/like_hint"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
45
app/src/main/res/layout/fragment_main.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".fragment.MainFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_main">
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/main_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/main_title"
|
||||
android:textColor="@color/main_title_color"
|
||||
android:textSize="32sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:background="@mipmap/main_title_logo"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/main_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/marin_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_title" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
66
app/src/main/res/layout/like_list.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<?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:id="@+id/like_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginTop="23dp"
|
||||
android:layout_marginEnd="28dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/liek_list_background"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/like_cons_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/like_cons_list_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/like_image"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_margin="6dp"
|
||||
android:src="@drawable/ic_launcher_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/like_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/like_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/cons" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
49
app/src/main/res/layout/main_rv_item.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?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:id="@+id/main_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:background="@drawable/mainlist_background"
|
||||
android:id="@+id/cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="134dp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/main_list_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="6dp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/main_rv_text"
|
||||
android:layout_width="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_rv_image" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/main_rv_image"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="100dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/cons" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
45
app/src/main/res/layout/pre_rv_item.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?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:id="@+id/main_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="134dp">
|
||||
|
||||
|
||||
<com.fun.funnyprank.tools.MytextView
|
||||
android:id="@+id/list_item_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/list_cons" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:padding="3dp"
|
||||
android:id="@+id/list_cons"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/list_background"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/list_item_cons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/list_item_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
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/bg_like.png
Normal file
|
After Width: | Height: | Size: 466 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/bg_main.png
Normal file
|
After Width: | Height: | Size: 550 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_logo.png
Normal file
|
After Width: | Height: | Size: 408 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/like_hint.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/like_pg_1.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/like_pg_2.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/main_title_logo.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/pre_video.png
Normal file
|
After Width: | Height: | Size: 308 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/pre_video_bg.png
Normal file
|
After Width: | Height: | Size: 104 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.FunnyPrank" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
||||
27
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="main_bg">#FFC000</color>
|
||||
<color name="color_1">#FE5FBC</color>
|
||||
<color name="color_2">#D290FF</color>
|
||||
<color name="color_3">#F9E45A</color>
|
||||
<color name="color_4">#BBE5FF</color>
|
||||
<color name="color_5">#FFA24B</color>
|
||||
<color name="color_6">#64EEE9</color>
|
||||
<color name="color_7">#9CD801</color>
|
||||
<color name="color_8">#FFBDBF</color>
|
||||
<color name="color_9">#C6FFA3</color>
|
||||
<color name="like_color_1_star">#E8C7FF</color>
|
||||
<color name="like_color_1_end">#D290FF</color>
|
||||
<color name="like_color_2_star">#CDFFFD</color>
|
||||
<color name="like_color_2_end">#63EDE8</color>
|
||||
<color name="like_color_3_star">#FFDFB9</color>
|
||||
<color name="like_color_3_end">#FFA24B</color>
|
||||
<color name="like_color_4_star">#FFBDE4</color>
|
||||
<color name="like_color_4_end">#FD5FBC</color>
|
||||
<color name="main_title_color">#F8EA51</color>
|
||||
<color name="gray">#E4F5FF</color>
|
||||
<color name="check">#494747</color>
|
||||
<color name="seekbar_check">#FFE900</color>
|
||||
</resources>
|
||||
7
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
<string name="app_name">Funny Prank</string>
|
||||
<string name="main_title">SOUND</string>
|
||||
<string name="loop">Loop</string>
|
||||
<string name="like_title">My favorite</string>
|
||||
<string name="like_hint">At present, there is nothing \n you like Go to the homepage \n and take a look</string>
|
||||
</resources>
|
||||