1.0.0(1)
This commit is contained in:
commit
1519f1712a
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
.idea/
|
||||
app/release/airhornprank_v1.0.0(1)_08_08_17_12-release.apk
|
||||
1
app/.gitignore
vendored
Normal file
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
63
app/build.gradle.kts
Normal file
63
app/build.gradle.kts
Normal file
@ -0,0 +1,63 @@
|
||||
import java.util.Date
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("kotlin-kapt")
|
||||
}
|
||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
android {
|
||||
namespace = "com.fun.airhornprank"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.fun.airhornprank"
|
||||
minSdk = 23
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0.0"
|
||||
setProperty(
|
||||
"archivesBaseName",
|
||||
"airhornprank_v" + versionName + "(${versionCode})_$timestamp"
|
||||
)
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
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("com.airbnb.android:lottie:6.0.0")
|
||||
implementation ("javax.annotation:javax.annotation-api:1.3.2")
|
||||
|
||||
}
|
||||
36
app/proguard-rules.pro
vendored
Normal file
36
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
# 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.airhornprank.PrankSkin{
|
||||
public static final java.lang.String DB_Name;
|
||||
public static final int DB_Version;
|
||||
}
|
||||
-keepclassmembers class *{
|
||||
@androidx.room.Query <methods>;
|
||||
}
|
||||
|
||||
-keep class com.fun.airhornprank.data.MyDataBase { *; }
|
||||
-keep class com.fun.airhornprank.data.LikeDAO { *; }
|
||||
-keep class com.fun.airhornprank.data.Mydata { *; }
|
||||
-keep class javax.annotation.** { *; }
|
||||
# Please add these rules to your existing keep rules in order to suppress warnings.
|
||||
# This is generated automatically by the Android Gradle plugin.
|
||||
-dontwarn javax.annotation.Nullable
|
||||
20
app/release/output-metadata.json
Normal file
20
app/release/output-metadata.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.fun.airhornprank",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 1,
|
||||
"versionName": "1.0.0",
|
||||
"outputFile": "airhornprank_v1.0.0(1)_08_08_17_12-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.fun.airhornprank;
|
||||
|
||||
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.airhornprank", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
58
app/src/main/AndroidManifest.xml
Normal file
58
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,58 @@
|
||||
<?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" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||
|
||||
<application
|
||||
android:name=".PrankSkin"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/logo"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/logo"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".activity.WebActivity"
|
||||
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.SettingActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.SaveActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.RecordActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.ListActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.PreViewActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.MainActivity"
|
||||
android:exported="true"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
1
app/src/main/assets/6PLI2cponf.json
Normal file
1
app/src/main/assets/6PLI2cponf.json
Normal file
File diff suppressed because one or more lines are too long
BIN
app/src/main/assets/DarumadropOne-Regular.ttf
Normal file
BIN
app/src/main/assets/DarumadropOne-Regular.ttf
Normal file
Binary file not shown.
3390
app/src/main/assets/prank.json
Normal file
3390
app/src/main/assets/prank.json
Normal file
File diff suppressed because it is too large
Load Diff
121
app/src/main/assets/privacy.html
Normal file
121
app/src/main/assets/privacy.html
Normal file
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Privacy Policy</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
h1, h2 {
|
||||
color: #333;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
ul {
|
||||
margin: 10px 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Privacy Policy</h1>
|
||||
<p><strong>Date:</strong> June 26, 2024</p>
|
||||
|
||||
<p>We provide this Privacy Policy to help you understand how we collect, use, and disclose
|
||||
information, including what you may provide to us or that we obtain from our products and
|
||||
services. We treat your privacy very seriously. Your privacy is important to us.</p>
|
||||
|
||||
<h2>Information Collection and Use</h2>
|
||||
<p>For a better experience, while using our Service, we may require you to provide us with certain
|
||||
personally identifiable information, such as users' name, address, location, pictures, etc. The
|
||||
information that we request will be retained on your device and is not collected or retained by
|
||||
us in any way and used as described in this privacy policy.</p>
|
||||
<p>The app does use third-party services that may collect information used to identify you.</p>
|
||||
<p>Please refer to the privacy policy of the third-party service provider used by the
|
||||
application:</p>
|
||||
<ul>
|
||||
<li>Google Play Services</li>
|
||||
<li>Google Analytics for Firebase</li>
|
||||
<li>Firebase Crashlytics</li>
|
||||
<li>Unity</li>
|
||||
<li>AppLovin</li>
|
||||
<li>Pangle</li>
|
||||
<li>Mintegral</li>
|
||||
<li>Bigo</li>
|
||||
<li>Ironsource</li>
|
||||
<li>Vungle</li>
|
||||
</ul>
|
||||
|
||||
<h2>Log Data</h2>
|
||||
<p>We want to inform you that whenever you use our Service, in case of an error in the app, we
|
||||
collect data and information (through third-party products) on your phone called Log Data. This
|
||||
Log Data may include information such as your device Internet Protocol (“IP”) address, device
|
||||
name, operating system version, the configuration of the app when utilizing our Service, the
|
||||
time and date of your use of the Service, and other statistics.</p>
|
||||
|
||||
<h2>Cookies</h2>
|
||||
<p>Cookies are files with a small amount of data that are commonly used as anonymous unique
|
||||
identifiers. These are sent to your browser from the websites that you visit and are stored on
|
||||
your device's internal memory.</p>
|
||||
<p>This Service does not use these “cookies” explicitly. However, the app may use third-party code
|
||||
and libraries that use “cookies” to collect information and improve their services. You have the
|
||||
option to either accept or refuse these cookies and know when a cookie is being sent to your
|
||||
device. If you choose to refuse our cookies, you may not be able to use some portions of this
|
||||
Service.</p>
|
||||
|
||||
<h2>Service Providers</h2>
|
||||
<p>We may employ third-party companies and individuals due to the following reasons:</p>
|
||||
<ul>
|
||||
<li>To facilitate our Service</li>
|
||||
<li>To provide the Service on our behalf</li>
|
||||
<li>To perform Service-related services</li>
|
||||
<li>To assist us in analyzing how our Service is used</li>
|
||||
</ul>
|
||||
<p>We want to inform users of this Service that these third parties have access to their Personal
|
||||
Information. The reason is to perform the tasks assigned to them on our behalf. However, they
|
||||
are obligated not to disclose or use the information for any other purpose.</p>
|
||||
|
||||
<h2>Security</h2>
|
||||
<p>We value your trust in providing us your Personal Information, thus we are striving to use
|
||||
commercially acceptable means of protecting it. But remember that no method of transmission over
|
||||
the internet, or method of electronic storage is 100% secure and reliable, and we cannot
|
||||
guarantee its absolute security.</p>
|
||||
|
||||
<h2>Links to Other Sites</h2>
|
||||
<p>This Service may contain links to other sites. If you click on a third-party link, you will be
|
||||
directed to that site. Note that these external sites are not operated by us. Therefore, we
|
||||
strongly advise you to review the Privacy Policy of these websites. We have no control over and
|
||||
assume no responsibility for the content, privacy policies, or practices of any third-party
|
||||
sites or services.</p>
|
||||
|
||||
<h2>Children’s Privacy</h2>
|
||||
<p>These Services do not address anyone under the age of 13. We do not knowingly collect personally
|
||||
identifiable information from children under 13 years of age. In the case we discover that a
|
||||
child under 13 has provided us with personal information, we will immediately delete this from
|
||||
our servers. If you are a parent or guardian and you are aware that your child has provided us
|
||||
with personal information, please contact us so that we will be able to take the necessary
|
||||
actions.</p>
|
||||
|
||||
<h2>Changes to This Privacy Policy</h2>
|
||||
<p>We may update our Privacy Policy from time to time. Thus, you are advised to review this page
|
||||
periodically for any changes. We will notify you of any changes by posting the new Privacy
|
||||
Policy on this page.</p>
|
||||
|
||||
<h2>Privacy Questions</h2>
|
||||
<p>We may update the Privacy Policy from time to time. When we change the policy in a material way,
|
||||
a notice will be posted on our website along with the updated Privacy Policy.</p>
|
||||
<p>If you have any questions or concerns about our Privacy Policy or data processing, please contact
|
||||
us: <a href="mailto:saleemjeeta2@gmail.com">saleemjeeta2@gmail.com</a>.</p>
|
||||
</body>
|
||||
</html>
|
||||
81
app/src/main/java/com/fun/airhornprank/PrankSkin.java
Normal file
81
app/src/main/java/com/fun/airhornprank/PrankSkin.java
Normal file
@ -0,0 +1,81 @@
|
||||
package com.fun.airhornprank;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class PrankSkin extends Application {
|
||||
public static PrankSkin app;
|
||||
public static final String DB_Name = "prank_database";
|
||||
public static final String Table_Name = "prank_table";
|
||||
public static final int DB_Version = 1;
|
||||
private List<Mydata> allData = new ArrayList<>();
|
||||
private SharedPreferences sp;
|
||||
private static boolean isinsert;
|
||||
private static boolean iscreate;
|
||||
private SharedPreferences.Editor editor;
|
||||
private static final String PREFS_NAME = "MyPrefs";
|
||||
private static final String KEY_IS_INSERTED = "isinserted";
|
||||
private static final String KEY_IS_CREATE = "iscreate";
|
||||
private static List<Mydata> mydataList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
app = this;
|
||||
|
||||
initData();
|
||||
initCreate();
|
||||
}
|
||||
|
||||
private void initCreate() {
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Mydata> allData = MyDataBase.getInstance().likeDAO().getAll();
|
||||
mydataList.clear();
|
||||
int[] indices = {0, 456, 111, 222, 333, 444, 555, 345, 234};
|
||||
|
||||
for (int index : indices) {
|
||||
if (index < allData.size()) {
|
||||
Mydata data = allData.get(index);
|
||||
data.setRank(true);
|
||||
MyDataBase.getInstance().likeDAO().update(data);
|
||||
mydataList.add(data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
allData = Mytools.getList("prank.json");
|
||||
sp = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||
isinsert = sp.getBoolean(KEY_IS_INSERTED, false);
|
||||
iscreate = sp.getBoolean(KEY_IS_CREATE, false);
|
||||
if (!isinsert) {
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().insertAll(allData);
|
||||
editor = sp.edit();
|
||||
editor.putBoolean(KEY_IS_INSERTED, true);
|
||||
editor.commit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.fun.airhornprank.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.view.View;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.adapter.ListAdapter;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.ActivityListBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ListActivity extends AppCompatActivity {
|
||||
ActivityListBinding binding;
|
||||
private List<Mydata> allData = new ArrayList<>();
|
||||
private ListAdapter thumAdapter;
|
||||
private int color;
|
||||
|
||||
@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;
|
||||
});
|
||||
|
||||
initData();
|
||||
|
||||
binding.listBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
Intent intent = getIntent();
|
||||
color = intent.getIntExtra(StaticValue.KEY_Color, 0);
|
||||
String name = intent.getStringExtra(StaticValue.KEY_CategoryName);
|
||||
binding.preListTitle.setText(name);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
allData = MyDataBase.getInstance().likeDAO().getlist(name);
|
||||
if (!allData.isEmpty()) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
initView(allData);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initView(List<Mydata> allData) {
|
||||
thumAdapter = new ListAdapter(this, allData, color);
|
||||
binding.preListRv.setAdapter(thumAdapter);
|
||||
binding.preListRv.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.fun.airhornprank.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.os.Bundle;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.adapter.PageAdapter;
|
||||
import com.fun.airhornprank.databinding.ActivityMainBinding;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
ActivityMainBinding binding;
|
||||
|
||||
@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();
|
||||
|
||||
setTab(0);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
|
||||
binding.mainPager.setAdapter(new PageAdapter(getSupportFragmentManager()));
|
||||
binding.mainTab.setupWithViewPager(binding.mainPager);
|
||||
binding.mainPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
setTab(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void setTab(int position) {
|
||||
for (int i = 0; i < binding.mainTab.getTabCount(); i++) {
|
||||
final TabLayout.Tab tab = binding.mainTab.getTabAt(i);
|
||||
if (tab != null) {
|
||||
switch (i) {
|
||||
case 0 ->
|
||||
tab.setCustomView(position == 0 ? R.layout.main_check_cons : R.layout.main_uncheck_cons);
|
||||
case 1 ->
|
||||
tab.setCustomView(position == 1 ? R.layout.custom_check_cons : R.layout.custom_uncheck_cons);
|
||||
case 2 ->
|
||||
tab.setCustomView(position == 2 ? R.layout.rank_check_cons : R.layout.rank_uncheck_cons);
|
||||
case 3 ->
|
||||
tab.setCustomView(position == 3 ? R.layout.like_check_cons : R.layout.like_uncheck_cons);
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,289 @@
|
||||
package com.fun.airhornprank.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
import android.content.res.AssetManager;
|
||||
import android.database.Cursor;
|
||||
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.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.ActivityPreViewBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
import com.fun.airhornprank.tool.SeekBarBroadCast;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.List;
|
||||
|
||||
public class PreViewActivity extends AppCompatActivity {
|
||||
ActivityPreViewBinding binding;
|
||||
private Mydata data = new Mydata();
|
||||
private String title;
|
||||
private boolean islike = false;
|
||||
private boolean isloop = false;
|
||||
private boolean isplayer = false;
|
||||
private MediaPlayer mediaPlayer;
|
||||
private AudioManager audioManager;
|
||||
private SeekBarBroadCast seekBarBroadCast;
|
||||
private IntentFilter filter = new IntentFilter();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityPreViewBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_preview), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
hidemenu();
|
||||
initData();
|
||||
initEvent();
|
||||
|
||||
audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
|
||||
binding.seekbar.setMax(audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC));
|
||||
binding.seekbar.setProgress(audioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
|
||||
if (audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) == 0) {
|
||||
binding.volumeleft.setBackgroundResource(R.drawable.icon_null);
|
||||
} else {
|
||||
binding.volumeleft.setBackgroundResource(R.drawable.icon_left);
|
||||
}
|
||||
seekBarBroadCast = new SeekBarBroadCast(audioManager, binding.seekbar);
|
||||
|
||||
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.preImageLoop.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkloop();
|
||||
}
|
||||
});
|
||||
|
||||
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.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_null);
|
||||
} else {
|
||||
binding.volumeleft.setBackgroundResource(R.drawable.icon_left);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void playprank() throws IOException {
|
||||
if (!isplayer) {
|
||||
starprank();
|
||||
} else {
|
||||
stopprank();
|
||||
}
|
||||
}
|
||||
|
||||
private void stopprank() {
|
||||
isplayer = false;
|
||||
binding.prePlay.setBackgroundResource(R.drawable.pre_play);
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void starprank() throws IOException {
|
||||
|
||||
isplayer = true;
|
||||
binding.prePlay.setBackgroundResource(R.drawable.pre_pause);
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setAudioAttributes(
|
||||
new AudioAttributes.Builder()
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
|
||||
.setUsage(AudioAttributes.USAGE_MEDIA)
|
||||
.build());
|
||||
mediaPlayer.setDataSource(data.getMp3Url());
|
||||
mediaPlayer.setOnPreparedListener(mp -> {
|
||||
if (isloop) {
|
||||
mediaPlayer.setLooping(true);
|
||||
}
|
||||
mediaPlayer.start();
|
||||
});
|
||||
mediaPlayer.setOnCompletionListener(mp -> {
|
||||
if (isloop) {
|
||||
binding.prePlay.setBackgroundResource(R.drawable.pre_pause);
|
||||
} else {
|
||||
binding.prePlay.setBackgroundResource(R.drawable.pre_play);
|
||||
isplayer = false;
|
||||
}
|
||||
});
|
||||
mediaPlayer.prepareAsync();
|
||||
}
|
||||
|
||||
private void checkLike() {
|
||||
if (!islike) {
|
||||
islike = true;
|
||||
data.setLike(true);
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_like);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(data);
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
islike = false;
|
||||
data.setLike(false);
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_unlike);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void checkloop() {
|
||||
if (!isloop) {
|
||||
isloop = true;
|
||||
binding.preImageLoop.setBackgroundResource(R.drawable.icon_loop);
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.setLooping(true);
|
||||
|
||||
}
|
||||
} else {
|
||||
isloop = false;
|
||||
binding.preImageLoop.setBackgroundResource(R.drawable.icon_unloop);
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.setLooping(false);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
Intent intent = getIntent();
|
||||
title = intent.getStringExtra(StaticValue.KEY_TITLE);
|
||||
binding.preText.setText(title);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Mydata> allData = MyDataBase.getInstance().likeDAO().getliketitle(title);
|
||||
if (!allData.isEmpty()) {
|
||||
data = allData.get(0);
|
||||
islike = data.getLike();
|
||||
if (islike) {
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_like);
|
||||
} else {
|
||||
binding.preLike.setBackgroundResource(R.drawable.icon_unlike);
|
||||
}
|
||||
if (data.getPreUrl().equals("custom_url")) {
|
||||
binding.preImage.setImageResource(R.mipmap.save_image);
|
||||
} else {
|
||||
Glide.with(PreViewActivity.this)
|
||||
.asBitmap()
|
||||
.load(data.getPreUrl())
|
||||
.placeholder(R.mipmap.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() {
|
||||
|
||||
}
|
||||
|
||||
private void showmenu() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
stopprank();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package com.fun.airhornprank.activity;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import android.Manifest;
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.databinding.ActivityRecordBinding;
|
||||
import com.fun.airhornprank.tool.AudioRecorder;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
public class RecordActivity extends AppCompatActivity {
|
||||
ActivityRecordBinding binding;
|
||||
private long startTime;
|
||||
private long elapsedTime;
|
||||
private Handler handler = new Handler();
|
||||
private Runnable runnable;
|
||||
private boolean isCreate = false;
|
||||
|
||||
private AudioRecorder audioRecorder;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityRecordBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
audioRecorder = new AudioRecorder(this);
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_record), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
binding.recordTime.setText(R.string.time_text);
|
||||
initEvent();
|
||||
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
binding.recordBack.setOnClickListener(v -> finish());
|
||||
binding.view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
createSound();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void createSound() {
|
||||
binding.view.addAnimatorListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
super.onAnimationCancel(animation);
|
||||
|
||||
if (audioRecorder != null) {
|
||||
audioRecorder.stopRecording();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
super.onAnimationStart(animation);
|
||||
if (audioRecorder != null) {
|
||||
audioRecorder.startRecording();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if (!isCreate) {
|
||||
binding.view.playAnimation();
|
||||
binding.view.loop(true);
|
||||
isCreate = true;
|
||||
runnable = new Runnable() {
|
||||
@SuppressLint("DefaultLocale")
|
||||
@Override
|
||||
public void run() {
|
||||
long currentTime = SystemClock.elapsedRealtime();
|
||||
elapsedTime = currentTime - startTime;
|
||||
int milliseconds = (int) (elapsedTime % 1000) / 10;
|
||||
int seconds = (int) (elapsedTime / 1000) % 60;
|
||||
int minutes = (int) (elapsedTime / (1000 * 60)) % 60;
|
||||
binding.recordTime.setText(String.format("%d : %02d : %02d", minutes, seconds, milliseconds));
|
||||
handler.postDelayed(this, 10);
|
||||
}
|
||||
};
|
||||
startTime = SystemClock.elapsedRealtime();
|
||||
handler.post(runnable);
|
||||
} else {
|
||||
isCreate = false;
|
||||
binding.view.cancelAnimation();
|
||||
handler.removeCallbacks(runnable);
|
||||
Intent intent = new Intent(RecordActivity.this, SaveActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_Time, elapsedTime);
|
||||
intent.putExtra(StaticValue.KEY_Path, audioRecorder.getTempFileName());
|
||||
intent.putExtra(StaticValue.KEY_import, 1);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
handler.removeCallbacks(runnable);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,212 @@
|
||||
package com.fun.airhornprank.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 android.annotation.SuppressLint;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.ActivitySaveBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SaveActivity extends AppCompatActivity {
|
||||
private ActivitySaveBinding binding;
|
||||
private String path;
|
||||
private boolean isPlayerActive = false;
|
||||
private MediaPlayer mediaPlayer;
|
||||
private Handler handler = new Handler();
|
||||
private Runnable timeUpdater;
|
||||
private long startTime;
|
||||
private long elapsedTime;
|
||||
private long audioDuration;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivitySaveBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_save), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
initData();
|
||||
initEvent();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void togglePrank() throws IOException {
|
||||
if (!isPlayerActive) {
|
||||
startPrank();
|
||||
} else {
|
||||
stopPrank();
|
||||
}
|
||||
}
|
||||
|
||||
private void stopPrank() {
|
||||
isPlayerActive = false;
|
||||
handler.removeCallbacks(timeUpdater);
|
||||
binding.savePlay.setBackgroundResource(R.drawable.pre_play);
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void startPrank() throws IOException {
|
||||
isPlayerActive = true;
|
||||
binding.savePlay.setBackgroundResource(R.drawable.pre_pause);
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setAudioAttributes(
|
||||
new AudioAttributes.Builder()
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
|
||||
.setUsage(AudioAttributes.USAGE_MEDIA)
|
||||
.build());
|
||||
mediaPlayer.setDataSource(path);
|
||||
mediaPlayer.setOnPreparedListener(mp -> {
|
||||
mediaPlayer.start();
|
||||
startTimer();
|
||||
});
|
||||
mediaPlayer.setOnCompletionListener(mp -> {
|
||||
handler.removeCallbacks(timeUpdater);
|
||||
binding.savePlay.setBackgroundResource(R.drawable.pre_play);
|
||||
isPlayerActive = false;
|
||||
});
|
||||
mediaPlayer.prepareAsync();
|
||||
}
|
||||
|
||||
private void startTimer() {
|
||||
timeUpdater = new Runnable() {
|
||||
@SuppressLint("DefaultLocale")
|
||||
@Override
|
||||
public void run() {
|
||||
long currentTime = SystemClock.elapsedRealtime();
|
||||
elapsedTime = currentTime - startTime;
|
||||
int milliseconds = (int) (elapsedTime % 1000) / 10;
|
||||
int seconds = (int) (elapsedTime / 1000) % 60;
|
||||
int minutes = (int) (elapsedTime / (1000 * 60)) % 60;
|
||||
binding.saveTime.setText(String.format("%d : %02d : %02d", minutes, seconds, milliseconds));
|
||||
handler.postDelayed(this, 10);
|
||||
}
|
||||
};
|
||||
startTime = SystemClock.elapsedRealtime();
|
||||
handler.post(timeUpdater);
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
binding.saveBack.setOnClickListener(v -> finish());
|
||||
binding.savePlay.setOnClickListener(v -> {
|
||||
try {
|
||||
togglePrank();
|
||||
} catch (IOException e) {
|
||||
Log.e("SaveActivity", "Error toggling prank", e);
|
||||
}
|
||||
});
|
||||
binding.save.setOnClickListener(v -> {
|
||||
String name = binding.saveEdit.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(name)) {
|
||||
saveData(name);
|
||||
Toast.makeText(SaveActivity.this, getString(R.string.save_tips), Toast.LENGTH_SHORT).show();
|
||||
stopPrank();
|
||||
finish();
|
||||
} else {
|
||||
Toast.makeText(SaveActivity.this, getString(R.string.save_tip), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void saveData(String name) {
|
||||
File cacheDir = getCacheDir();
|
||||
File sourceFile = new File(path);
|
||||
File destinationFile = new File(cacheDir, name + ".mp3");
|
||||
|
||||
if (sourceFile.renameTo(destinationFile)) {
|
||||
Mydata mydata = new Mydata();
|
||||
mydata.setCategoryname("custom");
|
||||
mydata.setLike(false);
|
||||
mydata.setTitle(name);
|
||||
mydata.setMp3Url(destinationFile.getAbsolutePath());
|
||||
mydata.setPreUrl("custom_url");
|
||||
mydata.setCategoryUrl("custom_url");
|
||||
mydata.setTime(audioDuration);
|
||||
|
||||
Mytools.runIO(() -> MyDataBase.getInstance().likeDAO().insertCustom(mydata));
|
||||
} else {
|
||||
Log.e("SaveActivity", "Failed to rename file");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private String readFileFromUri(Context context, Uri uri) {
|
||||
ContentResolver contentResolver = context.getContentResolver();
|
||||
try (InputStream inputStream = contentResolver.openInputStream(uri);
|
||||
FileOutputStream outputStream = new FileOutputStream(new File(getCacheDir(), "temp_audio_file.mp3"))) {
|
||||
|
||||
if (inputStream == null) {
|
||||
Log.e("SaveActivity", "Input stream is null");
|
||||
return null;
|
||||
}
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
outputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
return new File(getCacheDir(), "temp_audio_file.mp3").getAbsolutePath();
|
||||
} catch (IOException e) {
|
||||
Log.e("SaveActivity", "Error reading file from URI", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
Intent intent = getIntent();
|
||||
audioDuration = intent.getLongExtra(StaticValue.KEY_Time, 0);
|
||||
int importFlag = intent.getIntExtra(StaticValue.KEY_import, 0);
|
||||
|
||||
if (importFlag == 1) {
|
||||
path = intent.getStringExtra(StaticValue.KEY_Path);
|
||||
} else {
|
||||
String uriPath = intent.getStringExtra(StaticValue.KEY_Path);
|
||||
Uri uri = Uri.parse(uriPath);
|
||||
path = readFileFromUri(this, uri);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
stopPrank();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.fun.airhornprank.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 android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.databinding.ActivitySettingBinding;
|
||||
|
||||
public class SettingActivity extends AppCompatActivity {
|
||||
ActivitySettingBinding binding;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivitySettingBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_setting), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
initEvent();
|
||||
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
binding.settingBack.setOnClickListener(v -> finish());
|
||||
binding.versionText.setText("1.0.0");
|
||||
|
||||
binding.settingPrivacy.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
Intent intent = new Intent(SettingActivity.this, WebActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
binding.settingRate.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String url = "https://play.google.com/store/apps/details?id=com.fun.airhornprank";
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
binding.settingShare.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent share = new Intent(Intent.ACTION_SEND);
|
||||
share.setType("text/plain");
|
||||
share.putExtra(Intent.EXTRA_SUBJECT, R.string.app_name);
|
||||
String text = getString(R.string.share_title);
|
||||
text = text + "\n https://play.google.com/store/apps/details?id=" + "com.fun.airhornprank";
|
||||
share.putExtra(Intent.EXTRA_TEXT, text);
|
||||
startActivity(Intent.createChooser(share, "choose one"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.fun.airhornprank.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 android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.databinding.ActivitySplashBinding;
|
||||
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
ActivitySplashBinding binding;
|
||||
private CountDownTimer countDownTimer;
|
||||
private float i = 0;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivitySplashBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
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(2100, 100) {
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
i++;
|
||||
binding.splashPg.setProgress(i);
|
||||
// if (!isAlreadyShow) {
|
||||
// showAd(false);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
// if (!isAlreadyShow) {
|
||||
// showAd(true);
|
||||
// }
|
||||
starMainactivity();
|
||||
}
|
||||
};
|
||||
|
||||
countDownTimer.start();
|
||||
}
|
||||
|
||||
private void starMainactivity() {
|
||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.fun.airhornprank.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 android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
|
||||
public class WebActivity extends AppCompatActivity {
|
||||
@SuppressLint({"MissingInflatedId", "SetJavaScriptEnabled"})
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_web);
|
||||
EdgeToEdge.enable(this);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_web), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
WebView webView = findViewById(R.id.web);
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.setWebViewClient(new WebViewClient());
|
||||
webView.loadUrl("file:///android_asset/privacy.html");
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,200 @@
|
||||
package com.fun.airhornprank.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
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 android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.PreViewActivity;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.CustomListBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.CustomVH> {
|
||||
private Activity mactivity;
|
||||
private List<Mydata> mlist;
|
||||
private boolean islike = false;
|
||||
private boolean show;
|
||||
|
||||
public CustomAdapter(Activity activity) {
|
||||
mactivity = activity;
|
||||
|
||||
}
|
||||
|
||||
public void SetData(List<Mydata> list) {
|
||||
mlist = list;
|
||||
}
|
||||
|
||||
public void showDelete(boolean isShow) {
|
||||
show = isShow;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public CustomVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
CustomListBinding binding = CustomListBinding.inflate(mactivity.getLayoutInflater(), parent, false);
|
||||
return new CustomVH(binding);
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull CustomVH holder, int position) {
|
||||
Mydata customdata = mlist.get(position);
|
||||
boolean like = customdata.getLike();
|
||||
if (like) {
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_like);
|
||||
} else {
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_custom_unlike);
|
||||
}
|
||||
int milliseconds = (int) (customdata.getTime() % 1000) / 10;
|
||||
int seconds = (int) (customdata.getTime() / 1000) % 60;
|
||||
int minutes = (int) (customdata.getTime() / (1000 * 60)) % 60;
|
||||
holder.getTime().setText(String.format("%d : %02d : %02d", minutes, seconds, milliseconds));
|
||||
|
||||
if (show) {
|
||||
holder.getDelete().setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.getDelete().setVisibility(View.GONE);
|
||||
}
|
||||
holder.getDelete().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new AlertDialog.Builder(mactivity)
|
||||
.setTitle("Tips")
|
||||
.setMessage("Are you sure you want to delete" + " " + customdata.getTitle())
|
||||
.setPositiveButton("Sure", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().deleteCutsom(customdata.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
holder.getLike().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!islike) {
|
||||
islike = true;
|
||||
customdata.setLike(true);
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_like);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(customdata);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
islike = false;
|
||||
customdata.setLike(false);
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_custom_unlike);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(customdata);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
holder.getImage().setImageResource(R.mipmap.save_image);
|
||||
if (customdata.getTitle().length() > 3) {
|
||||
String name = customdata.getTitle().substring(0, 3);
|
||||
holder.getName().setText(name + "...");
|
||||
} else {
|
||||
holder.getName().setText(customdata.getTitle());
|
||||
}
|
||||
holder.getCustomcons().setBackgroundResource(R.drawable.custom_item_bg);
|
||||
holder.getImage().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(mactivity, PreViewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, customdata.getTitle());
|
||||
mactivity.startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mlist.size();
|
||||
}
|
||||
|
||||
public static class CustomVH extends RecyclerView.ViewHolder {
|
||||
private ConstraintLayout customcons;
|
||||
private TextView name, time;
|
||||
private ImageView image;
|
||||
private ImageView like;
|
||||
private ConstraintLayout delete;
|
||||
|
||||
public CustomVH(@NonNull CustomListBinding binding) {
|
||||
super(binding.getRoot());
|
||||
name = binding.customName;
|
||||
customcons = binding.customCons;
|
||||
time = binding.customTime;
|
||||
like = binding.customLike;
|
||||
image = binding.customImage;
|
||||
delete = binding.customItemDelete;
|
||||
|
||||
}
|
||||
|
||||
public ConstraintLayout getDelete() {
|
||||
return delete;
|
||||
}
|
||||
|
||||
public ConstraintLayout getCustomcons() {
|
||||
return customcons;
|
||||
}
|
||||
|
||||
public TextView getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public TextView getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public ImageView getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public ImageView getLike() {
|
||||
return like;
|
||||
}
|
||||
}
|
||||
}
|
||||
112
app/src/main/java/com/fun/airhornprank/adapter/LikeAdapter.java
Normal file
112
app/src/main/java/com/fun/airhornprank/adapter/LikeAdapter.java
Normal file
@ -0,0 +1,112 @@
|
||||
package com.fun.airhornprank.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.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.PreViewActivity;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.LikeListBinding;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LikeAdapter extends RecyclerView.Adapter<LikeAdapter.LikeVH> {
|
||||
private final LayoutInflater minflater;
|
||||
private List<Mydata> mlist;
|
||||
private int currentIndex = 0;
|
||||
private int listIndex = 0;
|
||||
|
||||
public LikeAdapter(Activity activity, List<Mydata> list) {
|
||||
minflater = LayoutInflater.from(activity);
|
||||
mlist = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public LikeVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
LikeListBinding binding = LikeListBinding.inflate(minflater, parent, false);
|
||||
return new LikeVH(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull LikeVH holder, int position) {
|
||||
Mydata likeData = mlist.get(position);
|
||||
if (likeData.getPreUrl().equals("custom_url")) {
|
||||
holder.getImage().setImageResource(R.mipmap.save_image);
|
||||
} else {
|
||||
Glide.with(minflater.getContext())
|
||||
.load(likeData.getPreUrl())
|
||||
.placeholder(R.mipmap.logo)
|
||||
.into(holder.getImage());
|
||||
}
|
||||
holder.getText().setText(likeData.getTitle());
|
||||
|
||||
if (position == getItemCount() - 1) {
|
||||
holder.getView().setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.getView().setVisibility(View.GONE);
|
||||
}
|
||||
holder.getLikecons().setBackgroundResource(R.drawable.like_item_bg);
|
||||
holder.getLikecons().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(minflater.getContext(), PreViewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, likeData.getTitle());
|
||||
minflater.getContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mlist.size();
|
||||
}
|
||||
|
||||
public class LikeVH extends RecyclerView.ViewHolder {
|
||||
private ConstraintLayout likecons;
|
||||
private TextView text;
|
||||
private ImageView image;
|
||||
|
||||
private View view;
|
||||
|
||||
public LikeVH(@NonNull LikeListBinding binding) {
|
||||
super(binding.getRoot());
|
||||
|
||||
text = binding.likeText;
|
||||
likecons = binding.likeCons;
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
115
app/src/main/java/com/fun/airhornprank/adapter/ListAdapter.java
Normal file
115
app/src/main/java/com/fun/airhornprank/adapter/ListAdapter.java
Normal file
@ -0,0 +1,115 @@
|
||||
package com.fun.airhornprank.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
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.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.PreViewActivity;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.ListRvItemBinding;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ListAdapter extends RecyclerView.Adapter<ListAdapter.PreVH> {
|
||||
private List<Mydata> otherdataList;
|
||||
private final LayoutInflater mInflater;
|
||||
private int mcolor;
|
||||
|
||||
public ListAdapter(Activity activity, List<Mydata> list, int color) {
|
||||
mInflater = LayoutInflater.from(activity);
|
||||
otherdataList = list;
|
||||
mcolor = color;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public PreVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ListRvItemBinding binding = ListRvItemBinding.inflate(mInflater, parent, false);
|
||||
return new PreVH(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull PreVH holder, int position) {
|
||||
Mydata otherdata = otherdataList.get(position);
|
||||
|
||||
if (otherdata.getPreUrl().equals("custom_url")) {
|
||||
holder.getImageViewThumb().setImageResource(R.mipmap.save_image);
|
||||
} else {
|
||||
Glide.with(mInflater.getContext())
|
||||
.load(otherdata.getPreUrl())
|
||||
.placeholder(R.mipmap.logo)
|
||||
.into(holder.getImageViewThumb());
|
||||
}
|
||||
if (otherdata.getTitle().length() > 6) {
|
||||
String name = otherdata.getTitle().substring(0, 6);
|
||||
holder.getTextView().setText(name + "...");
|
||||
} else {
|
||||
holder.getTextView().setText(otherdata.getTitle());
|
||||
}
|
||||
Drawable backgroundDrawable = ContextCompat.getDrawable(mInflater.getContext(), R.drawable.list_rv_item_bg);
|
||||
if (backgroundDrawable != null) {
|
||||
backgroundDrawable.setColorFilter(mcolor, PorterDuff.Mode.SRC_ATOP);
|
||||
holder.getConstraintLayout().setBackground(backgroundDrawable);
|
||||
}
|
||||
holder.getConstraintLayout().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(mInflater.getContext(), PreViewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, otherdata.getTitle());
|
||||
// intent.putExtra(StaticValue.KEY_Color,mcolor);
|
||||
// intent.putExtra(StaticValue.KEY_CategoryName, otherdata.getCategoryname());
|
||||
mInflater.getContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return otherdataList.size();
|
||||
}
|
||||
|
||||
public class PreVH extends RecyclerView.ViewHolder {
|
||||
private ImageView imageViewThumb;
|
||||
private ConstraintLayout constraintLayout;
|
||||
private TextView textView;
|
||||
|
||||
public TextView getTextView() {
|
||||
return textView;
|
||||
}
|
||||
|
||||
|
||||
public PreVH(@NonNull ListRvItemBinding binding) {
|
||||
super(binding.getRoot());
|
||||
imageViewThumb = binding.listItemImage;
|
||||
constraintLayout = binding.listRvCons;
|
||||
textView = binding.listItemText;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public ConstraintLayout getConstraintLayout() {
|
||||
return constraintLayout;
|
||||
}
|
||||
|
||||
public ImageView getImageViewThumb() {
|
||||
return imageViewThumb;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.fun.airhornprank.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
|
||||
import com.fun.airhornprank.fragment.CustomFragment;
|
||||
import com.fun.airhornprank.fragment.LikeFragment;
|
||||
import com.fun.airhornprank.fragment.MainFragment;
|
||||
import com.fun.airhornprank.fragment.RankingFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageAdapter extends FragmentStatePagerAdapter {
|
||||
private List<Fragment> mlist = new ArrayList<>();
|
||||
|
||||
public PageAdapter(@NonNull FragmentManager fm) {
|
||||
super(fm);
|
||||
mlist.add(new MainFragment());
|
||||
mlist.add(new CustomFragment());
|
||||
mlist.add(new RankingFragment());
|
||||
mlist.add(new LikeFragment());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return mlist.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mlist.size();
|
||||
}
|
||||
}
|
||||
169
app/src/main/java/com/fun/airhornprank/adapter/RankAdapter.java
Normal file
169
app/src/main/java/com/fun/airhornprank/adapter/RankAdapter.java
Normal file
@ -0,0 +1,169 @@
|
||||
package com.fun.airhornprank.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.PreViewActivity;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.CustomListBinding;
|
||||
import com.fun.airhornprank.databinding.RankListBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RankAdapter extends RecyclerView.Adapter<RankAdapter.RankVH> {
|
||||
private Activity mactivity;
|
||||
private List<Mydata> mlist;
|
||||
private boolean islike = false;
|
||||
|
||||
public RankAdapter(Activity activity) {
|
||||
mactivity = activity;
|
||||
|
||||
}
|
||||
|
||||
public void SetData(List<Mydata> list) {
|
||||
mlist = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RankVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
RankListBinding binding = RankListBinding.inflate(mactivity.getLayoutInflater(), parent, false);
|
||||
return new RankVH(binding);
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RankVH holder, int position) {
|
||||
Mydata customdata = mlist.get(position);
|
||||
boolean like = customdata.getLike();
|
||||
|
||||
if (position == getItemCount() - 1) {
|
||||
holder.getView().setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.getView().setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (like) {
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_like);
|
||||
} else {
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_unlike);
|
||||
}
|
||||
Glide.with(mactivity.getApplicationContext())
|
||||
.load(customdata.getPreUrl())
|
||||
.placeholder(R.mipmap.logo)
|
||||
.into(holder.getImage());
|
||||
|
||||
holder.getLike().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!islike) {
|
||||
islike = true;
|
||||
customdata.setLike(true);
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_like);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(customdata);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
islike = false;
|
||||
customdata.setLike(false);
|
||||
holder.getLike().setBackgroundResource(R.drawable.icon_unlike);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(customdata);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
int id = position + 4;
|
||||
holder.getId().setText(String.valueOf(id));
|
||||
if (customdata.getTitle().length() > 10) {
|
||||
String name = customdata.getTitle().substring(0, 10);
|
||||
holder.getName().setText(name + "...");
|
||||
} else {
|
||||
holder.getName().setText(customdata.getTitle());
|
||||
}
|
||||
|
||||
holder.getRela().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(mactivity, PreViewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, customdata.getTitle());
|
||||
mactivity.startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mlist.size();
|
||||
}
|
||||
|
||||
public static class RankVH extends RecyclerView.ViewHolder {
|
||||
private TextView id;
|
||||
private TextView name;
|
||||
private ImageView image;
|
||||
private ImageView like;
|
||||
private RelativeLayout rela;
|
||||
private View view;
|
||||
|
||||
public View getView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
public TextView getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public TextView getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public ImageView getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public ImageView getLike() {
|
||||
return like;
|
||||
}
|
||||
|
||||
public RelativeLayout getRela() {
|
||||
return rela;
|
||||
}
|
||||
|
||||
public RankVH(@NonNull RankListBinding binding) {
|
||||
super(binding.getRoot());
|
||||
name = binding.rankItemName;
|
||||
like = binding.rankItemLike;
|
||||
image = binding.rankItemImage;
|
||||
id = binding.rankItemId;
|
||||
rela = binding.rankItemRelative;
|
||||
view = binding.rankItemView;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
153
app/src/main/java/com/fun/airhornprank/adapter/ThumAdapter.java
Normal file
153
app/src/main/java/com/fun/airhornprank/adapter/ThumAdapter.java
Normal file
@ -0,0 +1,153 @@
|
||||
package com.fun.airhornprank.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
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.airhornprank.PrankSkin;
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.ListActivity;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.MainRvItemBinding;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ThumAdapter extends RecyclerView.Adapter<ThumAdapter.ThumVH> {
|
||||
private List<Mydata> myDataList;
|
||||
|
||||
private LayoutInflater minflater;
|
||||
private int[] randomcolor;
|
||||
private int[] draw;
|
||||
|
||||
public ThumAdapter(Activity activity, List<Mydata> list) {
|
||||
myDataList = list;
|
||||
minflater = LayoutInflater.from(activity);
|
||||
|
||||
randomcolor = new int[]{
|
||||
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),
|
||||
};
|
||||
|
||||
draw = new int[]{
|
||||
R.drawable.bg_1,
|
||||
R.drawable.bg_2,
|
||||
R.drawable.bg_3,
|
||||
R.drawable.bg_4,
|
||||
R.drawable.bg_5,
|
||||
R.drawable.bg_6,
|
||||
};
|
||||
}
|
||||
|
||||
@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);
|
||||
String url = myData.getCategoryUrl();
|
||||
|
||||
if (url.equals("custom_url")) {
|
||||
holder.getImageViewThumb().setImageResource(R.mipmap.save_image);
|
||||
} else {
|
||||
Glide.with(minflater.getContext())
|
||||
.load(myData.getCategoryUrl())
|
||||
.placeholder(R.mipmap.logo)
|
||||
.into(holder.getImageViewThumb());
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
if (myData.getCategoryname().length() > 6) {
|
||||
String name = myData.getCategoryname().substring(0, 6);
|
||||
|
||||
holder.getTextView().setText(name + "...");
|
||||
} else {
|
||||
holder.getTextView().setText(myData.getCategoryname());
|
||||
}
|
||||
|
||||
int i = position % 6;
|
||||
Drawable backgroundDrawable1 = ContextCompat.getDrawable(minflater.getContext(), draw[i]);
|
||||
if (backgroundDrawable1 != null) {
|
||||
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[i]);
|
||||
minflater.getContext().startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return myDataList.size();
|
||||
}
|
||||
|
||||
public class ThumVH extends RecyclerView.ViewHolder {
|
||||
|
||||
private ImageView imageViewThumb;
|
||||
private ConstraintLayout constraintLayout, mainlistcons;
|
||||
private TextView textView;
|
||||
private View view;
|
||||
|
||||
|
||||
public ThumVH(@NonNull MainRvItemBinding binding) {
|
||||
super(binding.getRoot());
|
||||
imageViewThumb = binding.mainRvImage;
|
||||
constraintLayout = binding.mainCons;
|
||||
mainlistcons = binding.mainListCons;
|
||||
textView = binding.mainRvText;
|
||||
view = binding.view;
|
||||
}
|
||||
|
||||
public View getView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
public ConstraintLayout getConstraintLayout() {
|
||||
return constraintLayout;
|
||||
}
|
||||
|
||||
public ImageView getImageViewThumb() {
|
||||
return imageViewThumb;
|
||||
}
|
||||
|
||||
public ConstraintLayout getMainlistcons() {
|
||||
return mainlistcons;
|
||||
}
|
||||
|
||||
public TextView getTextView() {
|
||||
return textView;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
app/src/main/java/com/fun/airhornprank/data/LikeDAO.java
Normal file
47
app/src/main/java/com/fun/airhornprank/data/LikeDAO.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.fun.airhornprank.data;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.OnConflictStrategy;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Dao
|
||||
public interface LikeDAO {
|
||||
@Query("SELECT * FROM prank_table")
|
||||
List<Mydata> getAll();
|
||||
|
||||
@Query("SELECT * FROM prank_table")
|
||||
LiveData<List<Mydata>> livegetAll();
|
||||
|
||||
@Query("select * from prank_table where islike =:islike ")
|
||||
LiveData<List<Mydata>> getLikedata(boolean islike);
|
||||
@Query("select * from prank_table where isRank =:isrank ")
|
||||
LiveData<List<Mydata>> getRankdata(boolean isrank);
|
||||
@Query("select * from prank_table where title =:title ")
|
||||
List<Mydata> getliketitle(String title);
|
||||
|
||||
@Query("select * from prank_table where categoryname =:name ")
|
||||
List<Mydata> getlist(String name);
|
||||
|
||||
@Query("select * from prank_table where categoryname =:name ")
|
||||
LiveData<List<Mydata>> getCustom(String name);
|
||||
|
||||
@Insert
|
||||
void insertAll(List<Mydata> likeDataList);
|
||||
|
||||
@Insert
|
||||
void insertCustom(Mydata mydata);
|
||||
|
||||
@Query("DELETE FROM prank_table WHERE title = :title")
|
||||
void deleteByTitle(String title);
|
||||
|
||||
@Query("DELETE FROM prank_table WHERE id = :id")
|
||||
void deleteCutsom(int id);
|
||||
|
||||
@Update
|
||||
void update(Mydata likeData);
|
||||
}
|
||||
27
app/src/main/java/com/fun/airhornprank/data/MyDataBase.java
Normal file
27
app/src/main/java/com/fun/airhornprank/data/MyDataBase.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.fun.airhornprank.data;
|
||||
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
import com.fun.airhornprank.PrankSkin;
|
||||
|
||||
@Database(entities = {Mydata.class},version = PrankSkin.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(PrankSkin.app, MyDataBase.class, PrankSkin.DB_Name).build();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return INSTANCE;
|
||||
|
||||
}
|
||||
}
|
||||
93
app/src/main/java/com/fun/airhornprank/data/Mydata.java
Normal file
93
app/src/main/java/com/fun/airhornprank/data/Mydata.java
Normal file
@ -0,0 +1,93 @@
|
||||
package com.fun.airhornprank.data;
|
||||
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import com.fun.airhornprank.PrankSkin;
|
||||
|
||||
@Entity(tableName = PrankSkin.Table_Name)
|
||||
public class Mydata {
|
||||
@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 long time;
|
||||
public Boolean isRank;
|
||||
|
||||
public Boolean getRank() {
|
||||
return isRank;
|
||||
}
|
||||
|
||||
public void setRank(Boolean rank) {
|
||||
isRank = rank;
|
||||
}
|
||||
|
||||
public long getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(long time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,235 @@
|
||||
package com.fun.airhornprank.fragment;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Dialog;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.media.MediaMetadataRetriever;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.RecordActivity;
|
||||
import com.fun.airhornprank.activity.SaveActivity;
|
||||
import com.fun.airhornprank.adapter.CustomAdapter;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.FragmentCustomBinding;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class CustomFragment extends Fragment {
|
||||
FragmentCustomBinding binding;
|
||||
private List<Mydata> customData = new ArrayList<>();
|
||||
private CustomAdapter customAdapter;
|
||||
private Dialog dialog;
|
||||
private static final int REQUEST_RECORD_AUDIO_PERMISSION = 200;
|
||||
private static final int REQUEST_READ_STORAGE_PERMISSION = 500;
|
||||
private static final int REQUEST_PICK_AUDIO = 300;
|
||||
private String[] permissions = {Manifest.permission.RECORD_AUDIO};
|
||||
private String[] permission = {Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE};
|
||||
private boolean show = false;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
binding = FragmentCustomBinding.inflate(inflater, container, false);
|
||||
|
||||
initData();
|
||||
|
||||
initEvent();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
customAdapter = new CustomAdapter(requireActivity());
|
||||
binding.customRv.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
MyDataBase.getInstance().likeDAO().getCustom("custom").observe(getViewLifecycleOwner(), new Observer<List<Mydata>>() {
|
||||
@Override
|
||||
public void onChanged(List<Mydata> mydata) {
|
||||
if (!mydata.isEmpty()) {
|
||||
initView(mydata);
|
||||
} else {
|
||||
show = false;
|
||||
customAdapter.showDelete(false);
|
||||
binding.customDelete.setVisibility(View.GONE);
|
||||
binding.addHide.setVisibility(View.VISIBLE);
|
||||
binding.addTips.setVisibility(View.VISIBLE);
|
||||
binding.add.setVisibility(View.GONE);
|
||||
binding.customRv.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initView(List<Mydata> customData) {
|
||||
binding.customDelete.setVisibility(View.VISIBLE);
|
||||
binding.addHide.setVisibility(View.GONE);
|
||||
binding.addTips.setVisibility(View.GONE);
|
||||
binding.add.setVisibility(View.VISIBLE);
|
||||
binding.customRv.setVisibility(View.VISIBLE);
|
||||
customAdapter.SetData(customData);
|
||||
binding.customRv.setAdapter(customAdapter);
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
binding.add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showDialog();
|
||||
}
|
||||
});
|
||||
binding.addHide.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showDialog();
|
||||
}
|
||||
});
|
||||
binding.customDelete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
show = !show;
|
||||
customAdapter.showDelete(show);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showDialog() {
|
||||
dialog = new Dialog(requireContext());
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setContentView(R.layout.dialog);
|
||||
dialog.setCancelable(true);
|
||||
dialog.getWindow().setGravity(Gravity.BOTTOM);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
dialog.findViewById(R.id.dialog_import).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
if (ContextCompat.checkSelfPermission(requireActivity(), Manifest.permission.READ_MEDIA_AUDIO)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(requireActivity(),
|
||||
new String[]{Manifest.permission.READ_MEDIA_AUDIO},
|
||||
REQUEST_READ_STORAGE_PERMISSION);
|
||||
} else {
|
||||
importAudio();
|
||||
}
|
||||
} else {
|
||||
if (ContextCompat.checkSelfPermission(requireActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
!= PackageManager.PERMISSION_GRANTED ||
|
||||
ContextCompat.checkSelfPermission(requireActivity(), Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
ActivityCompat.requestPermissions(requireActivity(), permission, REQUEST_READ_STORAGE_PERMISSION);
|
||||
} else {
|
||||
importAudio();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
dialog.findViewById(R.id.dialog_record).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (ContextCompat.checkSelfPermission(requireActivity(), Manifest.permission.RECORD_AUDIO)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(requireActivity(), permissions, REQUEST_RECORD_AUDIO_PERMISSION);
|
||||
} else {
|
||||
Intent intent = new Intent(requireContext(), RecordActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (requestCode == REQUEST_PICK_AUDIO && resultCode == getActivity().RESULT_OK) {
|
||||
if (data != null) {
|
||||
Uri selectedAudioUri = data.getData();
|
||||
if (selectedAudioUri != null) {
|
||||
long duration = getAudioDuration(requireContext(), selectedAudioUri);
|
||||
Intent intent = new Intent(requireContext(), SaveActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_Path, selectedAudioUri.toString());
|
||||
intent.putExtra(StaticValue.KEY_Time, duration);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private long getAudioDuration(Context context, Uri uri) {
|
||||
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
||||
long duration = 0;
|
||||
|
||||
try {
|
||||
ContentResolver contentResolver = context.getContentResolver();
|
||||
retriever.setDataSource(context, uri);
|
||||
String time = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
|
||||
duration = Long.parseLong(time);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
retriever.release();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
return duration;
|
||||
}
|
||||
|
||||
private void importAudio() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.setType("audio/*");
|
||||
startActivityForResult(Intent.createChooser(intent, "Select Audio"), REQUEST_PICK_AUDIO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
if (dialog != null) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.fun.airhornprank.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.adapter.LikeAdapter;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.FragmentLikeBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class LikeFragment extends Fragment {
|
||||
|
||||
FragmentLikeBinding binding;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
binding = FragmentLikeBinding.inflate(inflater, container, false);
|
||||
|
||||
initData();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
MyDataBase.getInstance().likeDAO().getLikedata(true).observe(getViewLifecycleOwner(), new Observer<List<Mydata>>() {
|
||||
@Override
|
||||
public void onChanged(List<Mydata> mydata) {
|
||||
if (mydata.isEmpty()) {
|
||||
binding.likeHintText.setVisibility(View.VISIBLE);
|
||||
binding.likeHintImage.setVisibility(View.VISIBLE);
|
||||
binding.likeRv.setVisibility(View.GONE);
|
||||
} else {
|
||||
binding.likeRv.setVisibility(View.VISIBLE);
|
||||
binding.likeHintImage.setVisibility(View.GONE);
|
||||
binding.likeHintText.setVisibility(View.GONE);
|
||||
binding.likeRv.setAdapter(new LikeAdapter(requireActivity(), mydata));
|
||||
binding.likeRv.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.fun.airhornprank.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.SettingActivity;
|
||||
import com.fun.airhornprank.adapter.ThumAdapter;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.FragmentMainBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public class MainFragment extends Fragment {
|
||||
FragmentMainBinding binding;
|
||||
private List<Mydata> allData = new ArrayList<>();
|
||||
private List<Mydata> maindata = new ArrayList<>();
|
||||
private ThumAdapter thumAdapter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
binding = FragmentMainBinding.inflate(inflater, container, false);
|
||||
|
||||
initData();
|
||||
|
||||
binding.mainSetting.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(requireContext(), SettingActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
MyDataBase.getInstance().likeDAO().livegetAll().observe(getViewLifecycleOwner(), new Observer<List<Mydata>>() {
|
||||
@Override
|
||||
public void onChanged(List<Mydata> list) {
|
||||
// maindata = chekData(list);
|
||||
initView(chekData(list));
|
||||
|
||||
}
|
||||
});
|
||||
// Mytools.runIO(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// allData = MyDataBase.getInstance().likeDAO().getAll();
|
||||
// chekData(allData);
|
||||
// if (!chekData(allData).isEmpty()) {
|
||||
// maindata = chekData(allData);
|
||||
// requireActivity().runOnUiThread(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// initView(maindata);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private void initView(List<Mydata> maindata) {
|
||||
thumAdapter = new ThumAdapter(requireActivity(), maindata);
|
||||
binding.marinRv.setAdapter(thumAdapter);
|
||||
binding.marinRv.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
|
||||
}
|
||||
|
||||
private static List<Mydata> chekData(List<Mydata> data) {
|
||||
// Collections.shuffle(data);
|
||||
// data.subList(0, 10);
|
||||
List<Mydata> main = new ArrayList<>();
|
||||
Set<String> name = new HashSet<>();
|
||||
for (Mydata mydata : data) {
|
||||
if (!name.contains(mydata.getCategoryname())) {
|
||||
main.add(mydata);
|
||||
name.add(mydata.getCategoryname());
|
||||
}
|
||||
}
|
||||
return main;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onResume() {
|
||||
// super.onResume();
|
||||
// initData();
|
||||
// }
|
||||
}
|
||||
@ -0,0 +1,249 @@
|
||||
package com.fun.airhornprank.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.fun.airhornprank.PrankSkin;
|
||||
import com.fun.airhornprank.R;
|
||||
import com.fun.airhornprank.activity.PreViewActivity;
|
||||
import com.fun.airhornprank.adapter.RankAdapter;
|
||||
import com.fun.airhornprank.data.MyDataBase;
|
||||
import com.fun.airhornprank.data.Mydata;
|
||||
import com.fun.airhornprank.databinding.FragmentRankingBinding;
|
||||
import com.fun.airhornprank.tool.Mytools;
|
||||
import com.fun.airhornprank.tool.StaticValue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RankingFragment extends Fragment {
|
||||
FragmentRankingBinding binding;
|
||||
private RankAdapter rankAdapter;
|
||||
private boolean islike1 = false;
|
||||
private boolean islike2 = false;
|
||||
private boolean islike3 = false;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
binding = FragmentRankingBinding.inflate(getLayoutInflater());
|
||||
rankAdapter = new RankAdapter(requireActivity());
|
||||
binding.rankRv.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
initRankData();
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initRankData() {
|
||||
MyDataBase.getInstance().likeDAO().getRankdata(true).observe(getViewLifecycleOwner(), new Observer<List<Mydata>>() {
|
||||
@Override
|
||||
public void onChanged(List<Mydata> list) {
|
||||
Mydata mydata1 = list.get(0);
|
||||
Mydata mydata2 = list.get(1);
|
||||
Mydata mydata3 = list.get(2);
|
||||
Glide.with(requireContext())
|
||||
.load(mydata1.getPreUrl())
|
||||
.placeholder(R.mipmap.logo)
|
||||
.into(binding.rankImage1);
|
||||
if (mydata1.getTitle().length() > 6) {
|
||||
String name = mydata1.getTitle().substring(0, 6);
|
||||
binding.rankText1.setText(name + "...");
|
||||
} else {
|
||||
binding.rankText1.setText(mydata1.getTitle());
|
||||
}
|
||||
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Mydata> list = MyDataBase.getInstance().likeDAO().getliketitle(mydata1.getTitle());
|
||||
Mydata mydata = list.get(0);
|
||||
requireActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mydata.getLike()) {
|
||||
binding.rankLike1.setBackgroundResource(R.drawable.icon_like);
|
||||
} else {
|
||||
binding.rankLike1.setBackgroundResource(R.drawable.icon_unlike);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
binding.rankRelative1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(requireContext(), PreViewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, mydata1.getTitle());
|
||||
requireContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
binding.rankLike1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!islike1) {
|
||||
islike1 = true;
|
||||
mydata1.setLike(true);
|
||||
binding.rankLike1.setBackgroundResource(R.drawable.icon_like);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(mydata1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
islike1 = false;
|
||||
mydata1.setLike(false);
|
||||
binding.rankLike1.setBackgroundResource(R.drawable.icon_unlike);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(mydata1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Glide.with(requireContext())
|
||||
.load(mydata2.getPreUrl())
|
||||
.placeholder(R.mipmap.logo)
|
||||
.into(binding.rankImage2);
|
||||
if (mydata2.getTitle().length() > 6) {
|
||||
String name = mydata2.getTitle().substring(0, 6);
|
||||
binding.rankText2.setText(name + "...");
|
||||
} else {
|
||||
binding.rankText2.setText(mydata1.getTitle());
|
||||
}
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Mydata> list = MyDataBase.getInstance().likeDAO().getliketitle(mydata2.getTitle());
|
||||
Mydata mydata = list.get(0);
|
||||
requireActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mydata.getLike()) {
|
||||
binding.rankLike2.setBackgroundResource(R.drawable.icon_like);
|
||||
} else {
|
||||
binding.rankLike2.setBackgroundResource(R.drawable.icon_unlike);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
binding.rankRelative2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(requireContext(), PreViewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, mydata2.getTitle());
|
||||
requireContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
binding.rankLike2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!islike2) {
|
||||
islike2 = true;
|
||||
mydata2.setLike(true);
|
||||
binding.rankLike2.setBackgroundResource(R.drawable.icon_like);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(mydata2);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
islike2 = false;
|
||||
mydata2.setLike(false);
|
||||
binding.rankLike2.setBackgroundResource(R.drawable.icon_unlike);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(mydata2);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Glide.with(requireContext())
|
||||
.load(mydata3.getPreUrl())
|
||||
.placeholder(R.mipmap.logo)
|
||||
.into(binding.rankImage3);
|
||||
if (mydata3.getTitle().length() > 6) {
|
||||
String name = mydata3.getTitle().substring(0, 6);
|
||||
binding.rankText3.setText(name + "...");
|
||||
} else {
|
||||
binding.rankText3.setText(mydata1.getTitle());
|
||||
}
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Mydata> list = MyDataBase.getInstance().likeDAO().getliketitle(mydata3.getTitle());
|
||||
Mydata mydata = list.get(0);
|
||||
requireActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mydata.getLike()) {
|
||||
binding.rankLike3.setBackgroundResource(R.drawable.icon_like);
|
||||
} else {
|
||||
binding.rankLike3.setBackgroundResource(R.drawable.icon_unlike);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
binding.rankRelative3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(requireContext(), PreViewActivity.class);
|
||||
intent.putExtra(StaticValue.KEY_TITLE, mydata3.getTitle());
|
||||
requireContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
binding.rankLike3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!islike3) {
|
||||
islike3 = true;
|
||||
mydata3.setLike(true);
|
||||
binding.rankLike3.setBackgroundResource(R.drawable.icon_like);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(mydata3);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
islike3 = false;
|
||||
mydata3.setLike(false);
|
||||
binding.rankLike3.setBackgroundResource(R.drawable.icon_unlike);
|
||||
Mytools.runIO(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MyDataBase.getInstance().likeDAO().update(mydata3);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
List<Mydata> reList = list.subList(3, 9);
|
||||
rankAdapter.SetData(reList);
|
||||
binding.rankRv.setAdapter(rankAdapter);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.fun.airhornprank.tool;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.MediaRecorder;
|
||||
import android.os.Environment;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class AudioRecorder {
|
||||
private MediaRecorder mediaRecorder;
|
||||
private String tempFileName;
|
||||
private String fileName;
|
||||
private boolean isRecording = false;
|
||||
|
||||
public AudioRecorder(Context context) {
|
||||
|
||||
File dir = context.getCacheDir();
|
||||
File file = new File(dir, "temp_audio.mp3");
|
||||
tempFileName = file.getAbsolutePath();
|
||||
}
|
||||
|
||||
|
||||
public void startRecording() {
|
||||
if (isRecording) return;
|
||||
|
||||
mediaRecorder = new MediaRecorder();
|
||||
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
|
||||
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
|
||||
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
|
||||
mediaRecorder.setOutputFile(tempFileName);
|
||||
|
||||
try {
|
||||
mediaRecorder.prepare();
|
||||
mediaRecorder.start();
|
||||
isRecording = true;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void stopRecording() {
|
||||
if (!isRecording) return;
|
||||
|
||||
try {
|
||||
mediaRecorder.stop();
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
mediaRecorder.release();
|
||||
mediaRecorder = null;
|
||||
isRecording = false;
|
||||
}
|
||||
}
|
||||
|
||||
public String getTempFileName() {
|
||||
return tempFileName;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.`fun`.airhornprank.tool
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.LinearGradient
|
||||
import android.graphics.Paint
|
||||
import android.graphics.RectF
|
||||
import android.graphics.Shader
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
|
||||
class CustomProgressBar(context: Context, attrs: AttributeSet?) : View(context, attrs) {
|
||||
private var progress = 0f // 当前进度
|
||||
private val maxProgress = 100f // 最大进度
|
||||
private val progressBarHeight = 20f // 进度条高度
|
||||
private val cornerRadius = 10f // 圆角半径
|
||||
private val backgroundColor = Color.parseColor("#26FFFFFF")
|
||||
private val startColor = Color.parseColor("#FF9ce8ff") // 起始颜色
|
||||
private val middleColor = Color.parseColor("#FFa4c4fb") // 中间颜色
|
||||
private val endColor = Color.parseColor("#FFbfa4ee") // 结束颜色
|
||||
private val paint = Paint()
|
||||
private val paintTow = Paint()
|
||||
|
||||
init {
|
||||
paint.style = Paint.Style.FILL
|
||||
paint.isAntiAlias = true
|
||||
paintTow.style = Paint.Style.FILL
|
||||
paintTow.isAntiAlias = true
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
// 绘制底色矩形
|
||||
paint.shader = null // 重置着色器
|
||||
paint.color = backgroundColor
|
||||
val backgroundRect = RectF(0f, (height / 2 - progressBarHeight / 2), width.toFloat(), (height / 2 + progressBarHeight / 2))
|
||||
canvas.drawRoundRect(backgroundRect, cornerRadius, cornerRadius, paint)
|
||||
|
||||
|
||||
// 计算进度条的宽度
|
||||
val progressBarWidth = (width * progress / maxProgress)
|
||||
|
||||
// 创建颜色渐变对象
|
||||
val gradient = LinearGradient(0f, 0f, width.toFloat(), 0f, intArrayOf(startColor, middleColor, endColor), null, Shader.TileMode.CLAMP)
|
||||
paintTow.shader = gradient
|
||||
|
||||
// 绘制带圆角的进度条矩形
|
||||
val rect = RectF(0f, (height / 2 - progressBarHeight / 2), progressBarWidth.toFloat(), (height / 2 + progressBarHeight / 2))
|
||||
canvas.drawRoundRect(rect, cornerRadius, cornerRadius, paintTow)
|
||||
}
|
||||
|
||||
fun getProgress():Float{
|
||||
return progress
|
||||
}
|
||||
|
||||
// 设置进度
|
||||
fun setProgress(progress: Float) {
|
||||
this.progress = progress
|
||||
invalidate() // 请求重绘
|
||||
}
|
||||
}
|
||||
36
app/src/main/java/com/fun/airhornprank/tool/MyTextView.java
Normal file
36
app/src/main/java/com/fun/airhornprank/tool/MyTextView.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.fun.airhornprank.tool;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@SuppressLint("AppCompatCustomView")
|
||||
public class MyTextView extends TextView {
|
||||
public MyTextView(Context context) {
|
||||
super(context);
|
||||
initData();
|
||||
}
|
||||
|
||||
public MyTextView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initData();
|
||||
}
|
||||
|
||||
public MyTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initData();
|
||||
}
|
||||
|
||||
public MyTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "DarumadropOne-Regular.ttf"));
|
||||
}
|
||||
}
|
||||
83
app/src/main/java/com/fun/airhornprank/tool/Mytools.java
Normal file
83
app/src/main/java/com/fun/airhornprank/tool/Mytools.java
Normal file
@ -0,0 +1,83 @@
|
||||
package com.fun.airhornprank.tool;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
|
||||
import com.fun.airhornprank.PrankSkin;
|
||||
import com.fun.airhornprank.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.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class Mytools {
|
||||
private static ExecutorService executorService;
|
||||
|
||||
|
||||
public static void runIO(Runnable task) {
|
||||
getExecutorService().execute(task);
|
||||
}
|
||||
|
||||
private static ExecutorService getExecutorService() {
|
||||
if (executorService == null) {
|
||||
executorService = Executors.newSingleThreadExecutor();
|
||||
}
|
||||
return executorService;
|
||||
}
|
||||
|
||||
private static JSONArray loadJson(String filename) {
|
||||
String json;
|
||||
try {
|
||||
AssetManager assetManager = PrankSkin.app.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> getList(String filename) {
|
||||
List<Mydata> dataList = new ArrayList<>();
|
||||
try {
|
||||
JSONArray jsonObject = loadJson(filename);
|
||||
for (int a = 0; a < jsonObject.length(); a++) {
|
||||
JSONObject list = jsonObject.getJSONObject(a);
|
||||
String categoryName = list.getString("categoryName");
|
||||
String categoryUrl = list.getString("categoryUrl");
|
||||
JSONArray classArray = list.getJSONArray("list");
|
||||
for (int i = 0; i < classArray.length(); i++) {
|
||||
JSONObject item = classArray.getJSONObject(i);
|
||||
Mydata allData = new Mydata();
|
||||
allData.setCategoryname(categoryName);
|
||||
allData.setCategoryUrl(categoryUrl);
|
||||
allData.setLike(false);
|
||||
allData.setRank(false);
|
||||
allData.setTitle(item.getString("title"));
|
||||
allData.setMp3Url(item.getString("mp3Url"));
|
||||
allData.setPreUrl(item.getString("preUrl"));
|
||||
dataList.add(allData);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.fun.airhornprank.tool;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
15
app/src/main/java/com/fun/airhornprank/tool/StaticValue.java
Normal file
15
app/src/main/java/com/fun/airhornprank/tool/StaticValue.java
Normal file
@ -0,0 +1,15 @@
|
||||
package com.fun.airhornprank.tool;
|
||||
|
||||
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";
|
||||
public static String KEY_Time = "KEY_time";
|
||||
public static String KEY_Path = "KEY_path";
|
||||
public static String KEY_import = "";
|
||||
|
||||
}
|
||||
30
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
30
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/bg_1.xml
Normal file
20
app/src/main/res/drawable/bg_1.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="158dp"
|
||||
android:height="130dp"
|
||||
android:viewportWidth="158"
|
||||
android:viewportHeight="130">
|
||||
<path
|
||||
android:pathData="M108.25,18.57C108.25,8.31 99.94,0 89.69,0H20C8.95,0 0,8.95 0,20V110C0,121.05 8.95,130 20,130H138C149.05,130 158,121.05 158,110V62.7C158,51.65 149.05,42.7 138,42.7H132.39C119.06,42.7 108.25,31.9 108.25,18.57Z"
|
||||
android:fillColor="#9D9BFF"/>
|
||||
<path
|
||||
android:pathData="M134,2L140,2A16,16 0,0 1,156 18L156,18A16,16 0,0 1,140 34L134,34A16,16 0,0 1,118 18L118,18A16,16 0,0 1,134 2z"
|
||||
android:fillColor="#9D9BFF"
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M135,11L142,17.5L135,24"
|
||||
android:strokeAlpha="0.8"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/bg_2.xml
Normal file
20
app/src/main/res/drawable/bg_2.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="158dp"
|
||||
android:height="130dp"
|
||||
android:viewportWidth="158"
|
||||
android:viewportHeight="130">
|
||||
<path
|
||||
android:pathData="M108.25,18.57C108.25,8.31 99.94,0 89.69,0H20C8.95,0 0,8.95 0,20V110C0,121.05 8.95,130 20,130H138C149.05,130 158,121.05 158,110V62.7C158,51.65 149.05,42.7 138,42.7H132.39C119.06,42.7 108.25,31.9 108.25,18.57Z"
|
||||
android:fillColor="#FF689D"/>
|
||||
<path
|
||||
android:pathData="M134,2L140,2A16,16 0,0 1,156 18L156,18A16,16 0,0 1,140 34L134,34A16,16 0,0 1,118 18L118,18A16,16 0,0 1,134 2z"
|
||||
android:fillColor="#FF689D"
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M135,11L142,17.5L135,24"
|
||||
android:strokeAlpha="0.8"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/bg_3.xml
Normal file
20
app/src/main/res/drawable/bg_3.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="158dp"
|
||||
android:height="130dp"
|
||||
android:viewportWidth="158"
|
||||
android:viewportHeight="130">
|
||||
<path
|
||||
android:pathData="M108.25,18.57C108.25,8.31 99.94,0 89.69,0H20C8.95,0 0,8.95 0,20V110C0,121.05 8.95,130 20,130H138C149.05,130 158,121.05 158,110V62.7C158,51.65 149.05,42.7 138,42.7H132.39C119.06,42.7 108.25,31.9 108.25,18.57Z"
|
||||
android:fillColor="#FAC36C"/>
|
||||
<path
|
||||
android:pathData="M134,2L140,2A16,16 0,0 1,156 18L156,18A16,16 0,0 1,140 34L134,34A16,16 0,0 1,118 18L118,18A16,16 0,0 1,134 2z"
|
||||
android:fillColor="#FAC36C"
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M135,11L142,17.5L135,24"
|
||||
android:strokeAlpha="0.8"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/bg_4.xml
Normal file
20
app/src/main/res/drawable/bg_4.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="158dp"
|
||||
android:height="130dp"
|
||||
android:viewportWidth="158"
|
||||
android:viewportHeight="130">
|
||||
<path
|
||||
android:pathData="M108.25,18.57C108.25,8.31 99.94,0 89.69,0H20C8.95,0 0,8.95 0,20V110C0,121.05 8.95,130 20,130H138C149.05,130 158,121.05 158,110V62.7C158,51.65 149.05,42.7 138,42.7H132.39C119.06,42.7 108.25,31.9 108.25,18.57Z"
|
||||
android:fillColor="#0ADBCE"/>
|
||||
<path
|
||||
android:pathData="M134,2L140,2A16,16 0,0 1,156 18L156,18A16,16 0,0 1,140 34L134,34A16,16 0,0 1,118 18L118,18A16,16 0,0 1,134 2z"
|
||||
android:fillColor="#0ADBCE"
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M135,11L142,17.5L135,24"
|
||||
android:strokeAlpha="0.8"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/bg_5.xml
Normal file
20
app/src/main/res/drawable/bg_5.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="158dp"
|
||||
android:height="130dp"
|
||||
android:viewportWidth="158"
|
||||
android:viewportHeight="130">
|
||||
<path
|
||||
android:pathData="M108.25,18.57C108.25,8.31 99.94,0 89.69,0H20C8.95,0 0,8.95 0,20V110C0,121.05 8.95,130 20,130H138C149.05,130 158,121.05 158,110V62.7C158,51.65 149.05,42.7 138,42.7H132.39C119.06,42.7 108.25,31.9 108.25,18.57Z"
|
||||
android:fillColor="#11C785"/>
|
||||
<path
|
||||
android:pathData="M134,2L140,2A16,16 0,0 1,156 18L156,18A16,16 0,0 1,140 34L134,34A16,16 0,0 1,118 18L118,18A16,16 0,0 1,134 2z"
|
||||
android:fillColor="#11C785"
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M135,11L142,17.5L135,24"
|
||||
android:strokeAlpha="0.8"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/bg_6.xml
Normal file
20
app/src/main/res/drawable/bg_6.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="158dp"
|
||||
android:height="130dp"
|
||||
android:viewportWidth="158"
|
||||
android:viewportHeight="130">
|
||||
<path
|
||||
android:pathData="M108.25,18.57C108.25,8.31 99.94,0 89.69,0H20C8.95,0 0,8.95 0,20V110C0,121.05 8.95,130 20,130H138C149.05,130 158,121.05 158,110V62.7C158,51.65 149.05,42.7 138,42.7H132.39C119.06,42.7 108.25,31.9 108.25,18.57Z"
|
||||
android:fillColor="#FE774B"/>
|
||||
<path
|
||||
android:pathData="M134,2L140,2A16,16 0,0 1,156 18L156,18A16,16 0,0 1,140 34L134,34A16,16 0,0 1,118 18L118,18A16,16 0,0 1,134 2z"
|
||||
android:fillColor="#FE774B"
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M135,11L142,17.5L135,24"
|
||||
android:strokeAlpha="0.8"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
7
app/src/main/res/drawable/butoon_tablayout.xml
Normal file
7
app/src/main/res/drawable/butoon_tablayout.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="75dp" />
|
||||
|
||||
|
||||
</shape>
|
||||
25
app/src/main/res/drawable/custom_check.xml
Normal file
25
app/src/main/res/drawable/custom_check.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M20,7H4C3.735,7 3.48,7.105 3.293,7.293C3.105,7.48 3,7.735 3,8V18C3,18.265 3.105,18.52 3.293,18.707C3.48,18.895 3.735,19 4,19H20C20.265,19 20.52,18.895 20.707,18.707C20.895,18.52 21,18.265 21,18V8C21,7.735 20.895,7.48 20.707,7.293C20.52,7.105 20.265,7 20,7Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M17,11H15M17,15H15M12,3L6,7M3,8V18C3,18.265 3.105,18.52 3.293,18.707C3.48,18.895 3.735,19 4,19H20C20.265,19 20.52,18.895 20.707,18.707C20.895,18.52 21,18.265 21,18V8C21,7.735 20.895,7.48 20.707,7.293C20.52,7.105 20.265,7 20,7H4C3.735,7 3.48,7.105 3.293,7.293C3.105,7.48 3,7.735 3,8Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M17,11H15M17,15H15M7,13C7,12.604 7.117,12.218 7.337,11.889C7.557,11.56 7.869,11.304 8.235,11.152C8.6,11.001 9.002,10.961 9.39,11.038C9.778,11.116 10.134,11.306 10.414,11.586C10.694,11.866 10.884,12.222 10.962,12.61C11.039,12.998 10.999,13.4 10.848,13.765C10.696,14.131 10.44,14.443 10.111,14.663C9.782,14.883 9.396,15 9,15C8.47,15 7.961,14.789 7.586,14.414C7.211,14.039 7,13.53 7,13Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#613EEA"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/custom_cons_bg.xml
Normal file
5
app/src/main/res/drawable/custom_cons_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/tab_check" />
|
||||
<corners android:radius="63dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/custom_delete_cons_bg.xml
Normal file
5
app/src/main/res/drawable/custom_delete_cons_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="29dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/custom_item_bg.xml
Normal file
5
app/src/main/res/drawable/custom_item_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="20dp" />
|
||||
</shape>
|
||||
18
app/src/main/res/drawable/custom_uncheck.xml
Normal file
18
app/src/main/res/drawable/custom_uncheck.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M20,8H4C3.735,8 3.48,8.105 3.293,8.293C3.105,8.48 3,8.735 3,9V19C3,19.265 3.105,19.52 3.293,19.707C3.48,19.895 3.735,20 4,20H20C20.265,20 20.52,19.895 20.707,19.707C20.895,19.52 21,19.265 21,19V9C21,8.735 20.895,8.48 20.707,8.293C20.52,8.105 20.265,8 20,8ZM9,16C8.604,16 8.218,15.883 7.889,15.663C7.56,15.443 7.304,15.131 7.152,14.765C7.001,14.4 6.961,13.998 7.038,13.61C7.116,13.222 7.306,12.866 7.586,12.586C7.865,12.306 8.222,12.116 8.61,12.038C8.998,11.961 9.4,12.001 9.765,12.152C10.131,12.304 10.443,12.56 10.663,12.889C10.883,13.218 11,13.604 11,14C11,14.53 10.789,15.039 10.414,15.414C10.039,15.789 9.53,16 9,16Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"/>
|
||||
<path
|
||||
android:pathData="M17,12H15M17,16H15M12,4L6,8M7,14C7,13.604 7.117,13.218 7.337,12.889C7.557,12.56 7.869,12.304 8.235,12.152C8.6,12.001 9.002,11.961 9.39,12.038C9.778,12.116 10.134,12.306 10.414,12.586C10.694,12.866 10.884,13.222 10.962,13.61C11.039,13.998 10.999,14.4 10.848,14.765C10.696,15.131 10.44,15.443 10.111,15.663C9.782,15.883 9.396,16 9,16C8.47,16 7.961,15.789 7.586,15.414C7.211,15.039 7,14.53 7,14ZM3,9V19C3,19.265 3.105,19.52 3.293,19.707C3.48,19.895 3.735,20 4,20H20C20.265,20 20.52,19.895 20.707,19.707C20.895,19.52 21,19.265 21,19V9C21,8.735 20.895,8.48 20.707,8.293C20.52,8.105 20.265,8 20,8H4C3.735,8 3.48,8.105 3.293,8.293C3.105,8.48 3,8.735 3,9Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
7
app/src/main/res/drawable/dialog_bg.xml
Normal file
7
app/src/main/res/drawable/dialog_bg.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:topLeftRadius="40dp"
|
||||
android:topRightRadius="40dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/dialog_cons_bg.xml
Normal file
5
app/src/main/res/drawable/dialog_cons_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/tab_check" />
|
||||
<corners android:radius="20dp" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/edit_bg.xml
Normal file
8
app/src/main/res/drawable/edit_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">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="44dp" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/tab_check" />
|
||||
</shape>
|
||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
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>
|
||||
28
app/src/main/res/drawable/icon_add.xml
Normal file
28
app/src/main/res/drawable/icon_add.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M18.223,4.25C20.346,5.894 21.75,8.751 21.75,12.002C21.75,15.208 20.385,18.031 18.311,19.685"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M16.25,16.5C17.434,15.684 18.25,13.984 18.25,12.006C18.25,10.027 17.434,8.327 16.25,7.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M4.255,9H6.25L11.25,3H13.25V20.996H11.25L6.25,15H4.255C3.151,15 2.255,14.105 2.255,13V11C2.255,9.895 3.151,9 4.255,9Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_back.xml
Normal file
12
app/src/main/res/drawable/icon_back.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="31dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="31">
|
||||
<path
|
||||
android:pathData="M21.65,14.398H13L16,11.348C16.45,10.898 16.45,10.198 16,9.748C15.55,9.298 14.85,9.298 14.4,9.748L9.55,14.698C9.1,15.148 9.1,15.848 9.55,16.298L14.4,21.248C14.6,21.448 14.9,21.598 15.2,21.598C15.5,21.598 15.75,21.498 16,21.298C16.45,20.848 16.45,20.148 16,19.698L13,16.648H21.65C22.25,16.648 22.75,16.148 22.75,15.548C22.8,14.898 22.3,14.398 21.65,14.398Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M16,0.398C7.65,0.398 0.85,7.148 0.85,15.498C0.85,23.848 7.65,30.598 16,30.598C24.35,30.598 31.15,23.848 31.15,15.498C31.15,7.148 24.35,0.398 16,0.398ZM16,28.398C8.9,28.398 3.1,22.598 3.1,15.498C3.1,8.398 8.9,2.598 16,2.598C23.1,2.598 28.9,8.398 28.9,15.498C28.9,22.598 23.1,28.398 16,28.398Z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_custom_add.xml
Normal file
12
app/src/main/res/drawable/icon_custom_add.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M10.001,16.665V9.999M10.001,9.999V3.332M10.001,9.999H16.667M10.001,9.999H3.334"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
27
app/src/main/res/drawable/icon_custom_import.xml
Normal file
27
app/src/main/res/drawable/icon_custom_import.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="25"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M21.5,13.5C21.5,16.5 19.5,21.5 12.5,21.5C5.5,21.5 3.5,16.5 3.5,13.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M12.504,2.551V16.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M6.5,8.5L12.5,2.5L18.5,8.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
36
app/src/main/res/drawable/icon_custom_record.xml
Normal file
36
app/src/main/res/drawable/icon_custom_record.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="25"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12.5,8.5V15.5"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M17,5.5V18.5"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M3.5,8.5V15.5"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M21.5,9V15"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M8,2V22"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_custom_unlike.xml
Normal file
9
app/src/main/res/drawable/icon_custom_unlike.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<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="M16,28.799C15.6,28.799 15.2,28.649 14.9,28.399C13.75,27.399 12.6,26.449 11.6,25.599C8.7,23.149 6.15,20.999 4.4,18.899C2.4,16.499 1.5,14.299 1.5,11.849C1.5,9.499 2.3,7.299 3.8,5.699C5.3,4.099 7.35,3.199 9.6,3.199C11.25,3.199 12.8,3.749 14.15,4.749C14.7,5.149 15.15,5.649 15.6,6.199C15.8,6.449 16.15,6.449 16.35,6.199C16.8,5.649 17.3,5.199 17.8,4.749C19.15,3.699 20.7,3.199 22.35,3.199C24.6,3.199 26.65,4.099 28.15,5.699C29.65,7.299 30.45,9.499 30.45,11.849C30.45,14.299 29.55,16.499 27.55,18.849C25.8,20.949 23.25,23.099 20.35,25.549C19.35,26.399 18.2,27.349 17.05,28.349C16.8,28.649 16.4,28.799 16,28.799Z"
|
||||
android:fillColor="#F0ECFF"/>
|
||||
</vector>
|
||||
18
app/src/main/res/drawable/icon_delete.xml
Normal file
18
app/src/main/res/drawable/icon_delete.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="25dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="25">
|
||||
<path
|
||||
android:pathData="M18.863,6.104C19.064,6.12 19.252,6.211 19.388,6.36C19.525,6.508 19.601,6.703 19.6,6.905L19.597,6.965L18.455,21.428C18.425,21.815 18.254,22.178 17.976,22.449C17.697,22.72 17.329,22.88 16.941,22.9L16.861,22.902H7.139C6.75,22.902 6.375,22.76 6.083,22.504C5.791,22.247 5.602,21.893 5.552,21.508L5.544,21.428L4.402,6.964C4.386,6.758 4.451,6.554 4.582,6.394C4.714,6.235 4.902,6.132 5.107,6.108C5.313,6.084 5.519,6.141 5.684,6.266C5.848,6.391 5.958,6.575 5.99,6.779L5.997,6.839L7.139,21.302H16.861L18.002,6.839C18.018,6.638 18.109,6.45 18.258,6.313C18.406,6.176 18.601,6.101 18.803,6.102L18.863,6.104H18.863Z"
|
||||
android:fillColor="#444444"/>
|
||||
<path
|
||||
android:pathData="M20.8,5.301C21.008,5.3 21.208,5.38 21.357,5.523C21.507,5.667 21.595,5.863 21.603,6.071C21.611,6.278 21.538,6.481 21.399,6.635C21.26,6.79 21.067,6.884 20.86,6.899L20.8,6.901H3.2C2.992,6.902 2.793,6.822 2.643,6.678C2.493,6.535 2.405,6.338 2.397,6.131C2.389,5.923 2.462,5.721 2.601,5.567C2.74,5.412 2.933,5.317 3.14,5.303L3.2,5.301H20.8Z"
|
||||
android:fillColor="#444444"/>
|
||||
<path
|
||||
android:pathData="M14,2.102C14.621,2.102 15.218,2.342 15.665,2.773C16.112,3.204 16.375,3.791 16.399,4.412L16.4,4.502V6.102C16.401,6.309 16.321,6.509 16.177,6.659C16.034,6.809 15.838,6.897 15.63,6.905C15.423,6.912 15.22,6.839 15.066,6.701C14.911,6.562 14.817,6.369 14.802,6.162L14.8,6.102V4.502C14.8,4.3 14.724,4.105 14.587,3.957C14.45,3.809 14.261,3.719 14.06,3.704L14,3.702H10C9.798,3.701 9.604,3.778 9.456,3.915C9.308,4.052 9.217,4.24 9.202,4.442L9.2,4.502V6.102C9.201,6.309 9.121,6.509 8.978,6.659C8.834,6.809 8.638,6.897 8.43,6.905C8.223,6.912 8.02,6.839 7.866,6.701C7.711,6.562 7.617,6.369 7.602,6.162L7.6,6.102V4.502C7.6,3.881 7.841,3.284 8.271,2.837C8.702,2.389 9.29,2.126 9.91,2.103L10,2.102H14Z"
|
||||
android:fillColor="#444444"/>
|
||||
<path
|
||||
android:pathData="M16,18.102V18.902C16,19.007 15.979,19.111 15.939,19.208C15.899,19.305 15.84,19.393 15.766,19.467C15.691,19.542 15.603,19.601 15.506,19.641C15.409,19.681 15.305,19.702 15.2,19.702H8.8C8.695,19.702 8.591,19.681 8.494,19.641C8.397,19.601 8.309,19.542 8.234,19.467C8.16,19.393 8.101,19.305 8.061,19.208C8.021,19.111 8,19.007 8,18.902V18.102H16Z"
|
||||
android:fillColor="#613EEA"/>
|
||||
</vector>
|
||||
18
app/src/main/res/drawable/icon_item_delete.xml
Normal file
18
app/src/main/res/drawable/icon_item_delete.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M15.719,4.67C15.887,4.683 16.043,4.759 16.157,4.883C16.271,5.007 16.334,5.169 16.333,5.337L16.331,5.387L15.38,17.44C15.354,17.763 15.212,18.065 14.98,18.291C14.747,18.517 14.441,18.65 14.118,18.666L14.05,18.668H5.949C5.625,18.668 5.312,18.55 5.069,18.336C4.826,18.123 4.669,17.827 4.627,17.506L4.62,17.44L3.668,5.387C3.655,5.215 3.709,5.045 3.819,4.912C3.928,4.779 4.085,4.694 4.256,4.674C4.427,4.654 4.599,4.701 4.736,4.805C4.874,4.909 4.965,5.062 4.992,5.233L4.998,5.282L5.949,17.335H14.05L15.002,5.282C15.015,5.115 15.091,4.958 15.215,4.844C15.339,4.73 15.501,4.667 15.669,4.668L15.719,4.67H15.719Z"
|
||||
android:fillColor="#DF272A"/>
|
||||
<path
|
||||
android:pathData="M17.333,4C17.506,3.999 17.673,4.066 17.798,4.185C17.923,4.305 17.996,4.469 18.003,4.642C18.009,4.815 17.948,4.983 17.833,5.112C17.717,5.241 17.556,5.319 17.383,5.332L17.333,5.333H2.667C2.494,5.334 2.327,5.268 2.202,5.148C2.077,5.028 2.004,4.865 1.998,4.692C1.991,4.519 2.052,4.35 2.168,4.221C2.283,4.093 2.444,4.014 2.617,4.002L2.667,4H17.333Z"
|
||||
android:fillColor="#DF272A"/>
|
||||
<path
|
||||
android:pathData="M11.667,1.336C12.184,1.336 12.682,1.536 13.054,1.895C13.427,2.254 13.646,2.744 13.665,3.261L13.667,3.336V4.669C13.668,4.842 13.601,5.009 13.481,5.134C13.362,5.259 13.198,5.332 13.025,5.338C12.852,5.345 12.684,5.284 12.555,5.168C12.426,5.053 12.347,4.892 12.335,4.719L12.333,4.669V3.336C12.333,3.168 12.27,3.006 12.156,2.882C12.041,2.759 11.884,2.684 11.717,2.671L11.667,2.669H8.333C8.165,2.669 8.003,2.733 7.88,2.847C7.757,2.961 7.681,3.118 7.668,3.286L7.667,3.336V4.669C7.668,4.842 7.601,5.009 7.481,5.134C7.362,5.259 7.198,5.332 7.025,5.338C6.852,5.345 6.684,5.284 6.555,5.168C6.426,5.053 6.347,4.892 6.335,4.719L6.333,4.669V3.336C6.333,2.818 6.534,2.321 6.893,1.948C7.252,1.576 7.741,1.357 8.259,1.337L8.333,1.336H11.667Z"
|
||||
android:fillColor="#DF272A"/>
|
||||
<path
|
||||
android:pathData="M13.333,14.668V15.335C13.333,15.422 13.316,15.509 13.282,15.59C13.249,15.671 13.2,15.744 13.138,15.806C13.076,15.868 13.002,15.917 12.922,15.951C12.841,15.984 12.754,16.001 12.667,16.001H7.333C7.246,16.001 7.159,15.984 7.078,15.951C6.997,15.917 6.924,15.868 6.862,15.806C6.8,15.744 6.751,15.671 6.717,15.59C6.684,15.509 6.667,15.422 6.667,15.335V14.668H13.333Z"
|
||||
android:fillColor="#DF272A"/>
|
||||
</vector>
|
||||
21
app/src/main/res/drawable/icon_left.xml
Normal file
21
app/src/main/res/drawable/icon_left.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M18,16.5C19.184,15.684 20,13.984 20,12.006C20,10.027 19.184,8.327 18,7.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M6.005,9H8L13,3H15V20.996H13L8,15H6.005C4.9,15 4.005,14.105 4.005,13V11C4.005,9.895 4.9,9 6.005,9Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_like.xml
Normal file
9
app/src/main/res/drawable/icon_like.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<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="M16,28.799C15.6,28.799 15.2,28.649 14.9,28.399C13.75,27.399 12.6,26.449 11.6,25.599C8.7,23.149 6.15,20.999 4.4,18.899C2.4,16.499 1.5,14.299 1.5,11.849C1.5,9.499 2.3,7.299 3.8,5.699C5.3,4.099 7.35,3.199 9.6,3.199C11.25,3.199 12.8,3.749 14.15,4.749C14.7,5.149 15.15,5.649 15.6,6.199C15.8,6.449 16.15,6.449 16.35,6.199C16.8,5.649 17.3,5.199 17.8,4.749C19.15,3.699 20.7,3.199 22.35,3.199C24.6,3.199 26.65,4.099 28.15,5.699C29.65,7.299 30.45,9.499 30.45,11.849C30.45,14.299 29.55,16.499 27.55,18.849C25.8,20.949 23.25,23.099 20.35,25.549C19.35,26.399 18.2,27.349 17.05,28.349C16.8,28.649 16.4,28.799 16,28.799Z"
|
||||
android:fillColor="#F52C2C"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/icon_loop.xml
Normal file
20
app/src/main/res/drawable/icon_loop.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<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="M29.215,16.822C29.135,17.327 29.013,17.819 28.854,18.294C28.509,19.329 27.987,20.283 27.324,21.12C25.615,23.281 22.969,24.668 20,24.668H10.667C6.265,24.668 2.667,21.12 2.667,16.668C2.667,12.235 6.264,8.668 10.667,8.668H29.333"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2.66667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M25.333,4.668L29.333,8.668L25.333,12.668"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2.66667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
27
app/src/main/res/drawable/icon_null.xml
Normal file
27
app/src/main/res/drawable/icon_null.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M17,16.959V20.996L16,21L10,15H8.005C6.9,15 6.005,14.105 6.005,13V11C6.005,9.895 6.9,9 8.005,9H9.056V9"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M12.585,6.784L16,3H17V11.042"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M3.077,3.043L21,21"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#8768FF"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_privacy.xml
Normal file
12
app/src/main/res/drawable/icon_privacy.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M13.958,1.974L16.646,2.463C17.003,2.528 17.325,2.716 17.557,2.994C17.79,3.272 17.917,3.624 17.917,3.986V13.517C17.917,13.783 17.848,14.046 17.717,14.278C17.586,14.51 17.397,14.705 17.169,14.842L11.2,18.446C10.838,18.664 10.423,18.78 10,18.78C9.577,18.78 9.162,18.664 8.799,18.446L2.831,14.842C2.603,14.705 2.414,14.51 2.283,14.278C2.152,14.046 2.084,13.784 2.083,13.517V3.986C2.083,3.623 2.211,3.272 2.443,2.994C2.675,2.715 2.998,2.527 3.354,2.462L6.042,1.974C8.659,1.498 11.341,1.498 13.958,1.974V1.974ZM13.735,3.204C11.265,2.754 8.735,2.754 6.266,3.204L3.578,3.693C3.509,3.705 3.447,3.742 3.403,3.795C3.358,3.849 3.334,3.916 3.333,3.986V13.517C3.333,13.621 3.388,13.718 3.478,13.772L9.446,17.376C9.613,17.477 9.805,17.53 10,17.53C10.196,17.53 10.387,17.477 10.554,17.376L16.523,13.772C16.567,13.746 16.603,13.708 16.628,13.663C16.654,13.619 16.667,13.568 16.667,13.517V3.986C16.667,3.916 16.642,3.849 16.598,3.795C16.553,3.742 16.491,3.705 16.422,3.693L13.735,3.204Z"
|
||||
android:fillColor="#141518"/>
|
||||
<path
|
||||
android:pathData="M10,5.418C10.221,5.418 10.433,5.506 10.589,5.662C10.745,5.818 10.833,6.03 10.833,6.251V10.663C10.833,10.884 10.745,11.095 10.589,11.252C10.433,11.408 10.221,11.496 10,11.496C9.779,11.496 9.567,11.408 9.411,11.252C9.254,11.095 9.167,10.884 9.167,10.663V6.251C9.167,6.03 9.254,5.818 9.411,5.662C9.567,5.506 9.779,5.418 10,5.418ZM10,12.501C10.221,12.501 10.433,12.589 10.589,12.745C10.745,12.902 10.833,13.114 10.833,13.335V13.751C10.833,13.972 10.745,14.184 10.589,14.341C10.433,14.497 10.221,14.585 10,14.585C9.779,14.585 9.567,14.497 9.411,14.341C9.254,14.184 9.167,13.972 9.167,13.751V13.335C9.167,13.114 9.254,12.902 9.411,12.745C9.567,12.589 9.779,12.501 10,12.501Z"
|
||||
android:fillColor="#141518"/>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/icon_rate.xml
Normal file
15
app/src/main/res/drawable/icon_rate.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="256dp"
|
||||
android:height="256dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M860.4,133.2 L163.7,133.2c-41.6,0 -75.5,33.9 -75.5,75.5l0,510.9c0,41.6 33.9,75.5 75.5,75.5l252.7,0 95.6,95.6 95.6,-95.6 252.8,0c41.6,0 75.5,-33.9 75.5,-75.5L935.9,208.8C935.9,167.1 902,133.2 860.4,133.2zM877.7,232l0,464.5c0,22.4 -18.2,40.6 -40.6,40.6L579.5,737.1l-67.5,67.6 -67.5,-67.6L186.9,737.1c-22.4,0 -40.6,-18.2 -40.6,-40.6L146.2,232c0,-22.4 18.2,-40.6 40.6,-40.6l650.3,0C859.5,191.4 877.7,209.6 877.7,232z"
|
||||
android:fillColor="#141518"/>
|
||||
<path
|
||||
android:pathData="M302.8,403.7 L741.3,403.7c14.9,0 27,-12.5 27,-27.8 0,-15.4 -12.1,-27.9 -27,-27.9L302.8,348.1c-14.9,0 -26.9,12.5 -26.9,27.9C275.9,391.3 288,403.7 302.8,403.7z"
|
||||
android:fillColor="#141518"/>
|
||||
<path
|
||||
android:pathData="M741.3,496.6 L302.8,496.6c-14.9,0 -26.9,12.5 -26.9,27.8 0,15.3 12.1,27.8 26.9,27.8L741.3,552.3c14.9,0 27,-12.5 27,-27.8C768.2,509.1 756.1,496.6 741.3,496.6z"
|
||||
android:fillColor="#141518"/>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/icon_setting.xml
Normal file
15
app/src/main/res/drawable/icon_setting.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="8dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="8">
|
||||
<path
|
||||
android:pathData="M16,7.75C13.95,7.75 12.25,6.05 12.25,4C12.25,1.95 13.95,0.25 16,0.25C18.05,0.25 19.75,1.95 19.75,4C19.75,6.05 18.05,7.75 16,7.75ZM16,2.5C15.15,2.5 14.5,3.2 14.5,4C14.5,4.8 15.2,5.5 16,5.5C16.8,5.5 17.5,4.8 17.5,4C17.5,3.2 16.85,2.5 16,2.5Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M27.85,7.75C25.8,7.75 24.1,6.05 24.1,4C24.1,1.95 25.8,0.25 27.85,0.25C29.9,0.25 31.6,1.95 31.6,4C31.65,6.05 29.95,7.75 27.85,7.75ZM27.85,2.5C27,2.5 26.35,3.2 26.35,4C26.35,4.8 27.05,5.5 27.85,5.5C28.65,5.5 29.35,4.8 29.35,4C29.35,3.2 28.7,2.5 27.85,2.5Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M4.15,7.75C2.1,7.75 0.4,6.05 0.4,4C0.4,1.95 2.1,0.25 4.15,0.25C6.2,0.25 7.9,1.95 7.9,4C7.9,6.05 6.2,7.75 4.15,7.75ZM4.15,2.5C3.3,2.5 2.65,3.2 2.65,4C2.65,4.8 3.35,5.5 4.15,5.5C5,5.5 5.65,4.8 5.65,4C5.65,3.2 4.95,2.5 4.15,2.5Z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/icon_share.xml
Normal file
12
app/src/main/res/drawable/icon_share.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M5.625,7.293C4.015,7.293 2.708,8.6 2.708,10.21C2.708,10.983 3.016,11.725 3.563,12.272C4.11,12.819 4.852,13.126 5.625,13.126C7.236,13.126 8.542,11.821 8.542,10.21C8.542,8.6 7.236,7.293 5.625,7.293ZM5.625,8.543C6.545,8.543 7.292,9.29 7.292,10.21C7.292,11.13 6.546,11.876 5.625,11.876C5.183,11.876 4.759,11.701 4.447,11.388C4.134,11.076 3.958,10.652 3.958,10.21C3.958,9.768 4.134,9.344 4.447,9.031C4.759,8.719 5.183,8.543 5.625,8.543ZM14.792,13.126C14.297,13.126 13.814,13.273 13.403,13.547C12.991,13.822 12.671,14.213 12.481,14.67C12.292,15.127 12.243,15.629 12.339,16.114C12.436,16.6 12.674,17.045 13.023,17.395C13.373,17.744 13.819,17.983 14.304,18.079C14.789,18.176 15.292,18.126 15.748,17.937C16.205,17.747 16.596,17.427 16.871,17.016C17.145,16.604 17.292,16.121 17.292,15.626C17.292,14.246 16.172,13.126 14.792,13.126ZM14.792,14.376C15.039,14.376 15.281,14.45 15.487,14.587C15.692,14.724 15.853,14.92 15.947,15.148C16.042,15.377 16.067,15.628 16.019,15.871C15.97,16.113 15.851,16.336 15.676,16.511C15.502,16.686 15.279,16.805 15.036,16.853C14.793,16.901 14.542,16.877 14.314,16.782C14.085,16.687 13.89,16.527 13.752,16.321C13.615,16.115 13.542,15.874 13.542,15.626C13.542,14.936 14.102,14.376 14.792,14.376ZM14.792,2.293C14.297,2.293 13.814,2.439 13.403,2.714C12.991,2.989 12.671,3.379 12.481,3.836C12.292,4.293 12.243,4.796 12.339,5.281C12.436,5.766 12.674,6.212 13.023,6.561C13.373,6.911 13.819,7.149 14.304,7.246C14.789,7.342 15.292,7.293 15.748,7.103C16.205,6.914 16.596,6.594 16.871,6.182C17.145,5.771 17.292,5.288 17.292,4.793C17.292,3.413 16.172,2.293 14.792,2.293ZM14.792,3.543C15.039,3.543 15.281,3.616 15.487,3.754C15.692,3.891 15.853,4.086 15.947,4.315C16.042,4.543 16.067,4.795 16.019,5.037C15.97,5.28 15.851,5.503 15.676,5.678C15.502,5.852 15.279,5.972 15.036,6.02C14.793,6.068 14.542,6.043 14.314,5.949C14.085,5.854 13.89,5.694 13.752,5.488C13.615,5.282 13.542,5.04 13.542,4.793C13.542,4.103 14.102,3.543 14.792,3.543Z"
|
||||
android:fillColor="#141518"/>
|
||||
<path
|
||||
android:pathData="M6.964,11.345C7.049,11.203 7.188,11.1 7.349,11.06C7.509,11.02 7.68,11.045 7.822,11.13L13.03,14.255C13.17,14.342 13.271,14.48 13.31,14.64C13.349,14.8 13.324,14.969 13.239,15.11C13.154,15.251 13.017,15.353 12.857,15.394C12.698,15.434 12.529,15.41 12.387,15.327L7.178,12.202C7.036,12.117 6.934,11.979 6.894,11.818C6.853,11.657 6.879,11.487 6.964,11.345ZM12.559,5.171C12.696,5.078 12.863,5.043 13.025,5.073C13.187,5.103 13.331,5.195 13.425,5.33C13.519,5.466 13.556,5.633 13.528,5.795C13.499,5.957 13.408,6.102 13.274,6.197L8.274,9.679C8.138,9.772 7.97,9.808 7.808,9.778C7.646,9.748 7.503,9.655 7.408,9.52C7.314,9.385 7.277,9.218 7.306,9.056C7.334,8.893 7.425,8.749 7.56,8.653L12.559,5.171Z"
|
||||
android:fillColor="#141518"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_unlike.xml
Normal file
9
app/src/main/res/drawable/icon_unlike.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<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="M16,28.799C15.6,28.799 15.2,28.649 14.9,28.399C13.75,27.399 12.6,26.449 11.6,25.599C8.7,23.149 6.15,20.999 4.4,18.899C2.4,16.499 1.5,14.299 1.5,11.849C1.5,9.499 2.3,7.299 3.8,5.699C5.3,4.099 7.35,3.199 9.6,3.199C11.25,3.199 12.8,3.749 14.15,4.749C14.7,5.149 15.15,5.649 15.6,6.199C15.8,6.449 16.15,6.449 16.35,6.199C16.8,5.649 17.3,5.199 17.8,4.749C19.15,3.699 20.7,3.199 22.35,3.199C24.6,3.199 26.65,4.099 28.15,5.699C29.65,7.299 30.45,9.499 30.45,11.849C30.45,14.299 29.55,16.499 27.55,18.849C25.8,20.949 23.25,23.099 20.35,25.549C19.35,26.399 18.2,27.349 17.05,28.349C16.8,28.649 16.4,28.799 16,28.799Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
20
app/src/main/res/drawable/icon_unloop.xml
Normal file
20
app/src/main/res/drawable/icon_unloop.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<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="M29.215,16.822C29.135,17.327 29.013,17.819 28.854,18.294C28.509,19.329 27.987,20.283 27.324,21.12C25.615,23.281 22.969,24.668 20,24.668H10.667C6.265,24.668 2.667,21.12 2.667,16.668C2.667,12.235 6.264,8.668 10.667,8.668H29.333"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2.66667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#D4C9FF"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M25.333,4.668L29.333,8.668L25.333,12.668"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2.66667"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#D4C9FF"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
23
app/src/main/res/drawable/like_check.xml
Normal file
23
app/src/main/res/drawable/like_check.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M20.471,8.706C20.471,16.405 12,20 12,20C12,20 3.529,16.442 3.529,8.706C3.475,7.522 3.889,6.365 4.682,5.484C5.475,4.604 6.582,4.07 7.765,4C8.947,4.07 10.055,4.604 10.847,5.484C11.64,6.365 12.054,7.522 12,8.706C11.946,7.522 12.36,6.365 13.153,5.484C13.945,4.604 15.052,4.07 16.235,4C17.418,4.07 18.525,4.604 19.318,5.484C20.111,6.365 20.525,7.522 20.471,8.706Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M10,13H14"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#613EEA"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M12,11L12,15"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#613EEA"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/like_item_bg.xml
Normal file
5
app/src/main/res/drawable/like_item_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/tab_check" />
|
||||
<corners android:radius="20dp" />
|
||||
</shape>
|
||||
23
app/src/main/res/drawable/like_uncheck.xml
Normal file
23
app/src/main/res/drawable/like_uncheck.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M20.471,8.706C20.471,16.405 12,20 12,20C12,20 3.53,16.442 3.53,8.706C3.476,7.522 3.89,6.365 4.682,5.484C5.475,4.604 6.582,4.07 7.765,4C8.948,4.07 10.055,4.604 10.848,5.484C11.64,6.365 12.054,7.522 12,8.706C11.946,7.522 12.36,6.365 13.153,5.484C13.945,4.604 15.053,4.07 16.236,4C17.418,4.07 18.526,4.604 19.318,5.484C20.111,6.365 20.525,7.522 20.471,8.706Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"/>
|
||||
<path
|
||||
android:pathData="M10,13H14"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M12,11L12,15"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/list_rv_item_bg.xml
Normal file
5
app/src/main/res/drawable/list_rv_item_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/tab_check" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
27
app/src/main/res/drawable/main_check.xml
Normal file
27
app/src/main/res/drawable/main_check.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M18,20H4C3.735,20 3.48,19.895 3.293,19.707C3.105,19.52 3,19.265 3,19V5C3,4.735 3.105,4.48 3.293,4.293C3.48,4.105 3.735,4 4,4H18C18.265,4 18.52,4.105 18.707,4.293C18.895,4.48 19,4.735 19,5V19C19,19.265 18.895,19.52 18.707,19.707C18.52,19.895 18.265,20 18,20ZM19,8V16C19.621,15.534 20.125,14.93 20.472,14.236C20.819,13.542 21,12.776 21,12C21,11.224 20.819,10.458 20.472,9.764C20.125,9.07 19.621,8.466 19,8Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M9,16C10.105,16 11,15.105 11,14C11,12.895 10.105,12 9,12C7.895,12 7,12.895 7,14C7,15.105 7.895,16 9,16Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#613EEA"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M11,14.002V8.002C11.398,7.988 11.794,8.056 12.164,8.202C12.535,8.347 12.871,8.568 13.152,8.849C13.434,9.131 13.654,9.467 13.8,9.837C13.946,10.208 14.014,10.604 14,11.002"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#613EEA"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
27
app/src/main/res/drawable/main_uncheck.xml
Normal file
27
app/src/main/res/drawable/main_uncheck.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M9,16C10.105,16 11,15.105 11,14C11,12.895 10.105,12 9,12C7.895,12 7,12.895 7,14C7,15.105 7.895,16 9,16Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M11,14.002V8.002C11.398,7.988 11.794,8.056 12.164,8.202C12.535,8.347 12.871,8.568 13.152,8.849C13.434,9.131 13.654,9.467 13.8,9.837C13.946,10.208 14.014,10.604 14,11.002"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M18,20H4C3.735,20 3.48,19.895 3.293,19.707C3.105,19.52 3,19.265 3,19V5C3,4.735 3.105,4.48 3.293,4.293C3.48,4.105 3.735,4 4,4H18C18.265,4 18.52,4.105 18.707,4.293C18.895,4.48 19,4.735 19,5V19C19,19.265 18.895,19.52 18.707,19.707C18.52,19.895 18.265,20 18,20ZM19,8V16C19.621,15.534 20.125,14.93 20.472,14.236C20.819,13.542 21,12.776 21,12C21,11.224 20.819,10.458 20.472,9.764C20.125,9.07 19.621,8.466 19,8Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#9DB2CE"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/pre_pause.xml
Normal file
15
app/src/main/res/drawable/pre_pause.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="71dp"
|
||||
android:height="70dp"
|
||||
android:viewportWidth="71"
|
||||
android:viewportHeight="70">
|
||||
<path
|
||||
android:pathData="M35.5,0L35.5,0A35,35 0,0 1,70.5 35L70.5,35A35,35 0,0 1,35.5 70L35.5,70A35,35 0,0 1,0.5 35L0.5,35A35,35 0,0 1,35.5 0z"
|
||||
android:fillColor="#8768FF"/>
|
||||
<path
|
||||
android:pathData="M28,23.75L30.5,23.75A2.5,2.5 0,0 1,33 26.25L33,43.75A2.5,2.5 0,0 1,30.5 46.25L28,46.25A2.5,2.5 0,0 1,25.5 43.75L25.5,26.25A2.5,2.5 0,0 1,28 23.75z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M40.5,23.75L43,23.75A2.5,2.5 0,0 1,45.5 26.25L45.5,43.75A2.5,2.5 0,0 1,43 46.25L40.5,46.25A2.5,2.5 0,0 1,38 43.75L38,26.25A2.5,2.5 0,0 1,40.5 23.75z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/pre_play.xml
Normal file
12
app/src/main/res/drawable/pre_play.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="71dp"
|
||||
android:height="70dp"
|
||||
android:viewportWidth="71"
|
||||
android:viewportHeight="70">
|
||||
<path
|
||||
android:pathData="M35.5,0L35.5,0A35,35 0,0 1,70.5 35L70.5,35A35,35 0,0 1,35.5 70L35.5,70A35,35 0,0 1,0.5 35L0.5,35A35,35 0,0 1,35.5 0z"
|
||||
android:fillColor="#8768FF"/>
|
||||
<path
|
||||
android:pathData="M45.5,30.67C48.833,32.594 48.833,37.406 45.5,39.33L34.25,45.825C30.917,47.75 26.75,45.344 26.75,41.495L26.75,28.505C26.75,24.656 30.917,22.25 34.25,24.175L45.5,30.67Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/rank_bg.xml
Normal file
12
app/src/main/res/drawable/rank_bg.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:centerX="0.5"
|
||||
android:centerY="0.5"
|
||||
android:endColor="@color/end_color"
|
||||
android:startColor="@color/star_color"
|
||||
android:type="linear" />
|
||||
|
||||
|
||||
</shape>
|
||||
18
app/src/main/res/drawable/rank_check.xml
Normal file
18
app/src/main/res/drawable/rank_check.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="25"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M11.912,5.248H12.759V1.957H12.054L12.039,2.055C12.024,2.155 11.995,2.236 11.95,2.299C11.905,2.363 11.85,2.416 11.785,2.456C11.716,2.497 11.638,2.526 11.553,2.542C11.472,2.557 11.391,2.565 11.315,2.565L11.149,2.56V3.263H11.912V5.248Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M21.35,13.514H16.554C16.455,13.514 16.354,13.524 16.256,13.545V7.325C16.256,6.555 15.637,5.93 14.876,5.93H9.82C9.059,5.93 8.44,6.555 8.44,7.325V10.295C8.343,10.274 8.243,10.264 8.141,10.264H3.346C2.571,10.264 1.94,10.892 1.94,11.666V20.651C1.94,21.418 2.559,22.042 3.319,22.042H21.377C22.137,22.042 22.756,21.418 22.756,20.651V14.926C22.756,14.147 22.125,13.514 21.35,13.514ZM16.256,14.926C16.256,14.887 16.287,14.856 16.325,14.856H21.35C21.386,14.856 21.419,14.889 21.419,14.926L21.441,20.651C21.441,20.688 21.412,20.718 21.377,20.718H16.256V14.926ZM9.755,7.325C9.755,7.287 9.784,7.257 9.82,7.257H14.876C14.912,7.257 14.941,7.287 14.941,7.325V20.718H9.755V7.325ZM3.278,11.666C3.278,11.628 3.309,11.598 3.346,11.598H8.377C8.415,11.598 8.446,11.628 8.446,11.665L8.44,20.718H3.319C3.284,20.718 3.254,20.688 3.254,20.651L3.278,11.666Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M18.35,12.213C18.458,12.317 18.592,12.398 18.749,12.455C18.903,12.508 19.072,12.535 19.253,12.535C19.412,12.535 19.567,12.511 19.714,12.464C19.862,12.416 19.996,12.345 20.111,12.252C20.228,12.156 20.323,12.037 20.391,11.898C20.461,11.757 20.496,11.595 20.496,11.418C20.496,11.218 20.44,11.043 20.33,10.898C20.271,10.82 20.199,10.756 20.114,10.706C20.172,10.661 20.221,10.607 20.259,10.544C20.341,10.414 20.383,10.261 20.383,10.089C20.383,9.932 20.348,9.79 20.277,9.668C20.209,9.551 20.119,9.45 20.01,9.367C19.902,9.286 19.78,9.225 19.647,9.185C19.352,9.097 19.035,9.106 18.782,9.21C18.639,9.268 18.516,9.349 18.415,9.453C18.313,9.555 18.233,9.681 18.177,9.826C18.122,9.967 18.091,10.124 18.085,10.295L18.08,10.415H18.903L18.901,10.297C18.899,10.167 18.93,10.06 18.992,9.978C19.049,9.905 19.134,9.868 19.253,9.868C19.34,9.868 19.414,9.895 19.48,9.948C19.539,9.996 19.567,10.064 19.567,10.159C19.567,10.218 19.555,10.265 19.53,10.296C19.5,10.333 19.462,10.362 19.414,10.383C19.361,10.406 19.302,10.419 19.24,10.424C19.17,10.43 19.106,10.43 19.048,10.424L18.921,10.412V11.092H19.037C19.11,11.092 19.186,11.094 19.267,11.099C19.335,11.103 19.399,11.116 19.457,11.138C19.506,11.159 19.546,11.19 19.579,11.233C19.607,11.273 19.623,11.342 19.623,11.432C19.623,11.547 19.589,11.634 19.518,11.697C19.444,11.764 19.355,11.797 19.245,11.797C19.173,11.797 19.112,11.785 19.065,11.76C19.014,11.735 18.974,11.703 18.941,11.663C18.906,11.619 18.879,11.567 18.862,11.507C18.842,11.445 18.83,11.377 18.827,11.304L18.824,11.193H18.012L18.012,11.306C18.008,11.5 18.036,11.675 18.095,11.823C18.153,11.973 18.239,12.105 18.35,12.213Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M6.686,8.855H5.389C5.414,8.83 5.441,8.808 5.468,8.786C5.562,8.711 5.661,8.639 5.762,8.572C5.867,8.503 5.971,8.433 6.074,8.363C6.185,8.288 6.284,8.204 6.368,8.112C6.456,8.019 6.529,7.91 6.585,7.786C6.641,7.658 6.668,7.512 6.668,7.34C6.668,7.176 6.637,7.024 6.573,6.888C6.511,6.755 6.426,6.643 6.316,6.548C6.21,6.457 6.087,6.387 5.948,6.339C5.647,6.235 5.258,6.25 4.982,6.371C4.827,6.44 4.695,6.54 4.591,6.665C4.489,6.789 4.412,6.935 4.362,7.099C4.312,7.262 4.29,7.438 4.296,7.624L4.299,7.736H5.117V7.62C5.117,7.546 5.125,7.471 5.138,7.396C5.153,7.323 5.177,7.257 5.207,7.201C5.236,7.149 5.273,7.108 5.321,7.075C5.363,7.047 5.417,7.032 5.483,7.032C5.585,7.032 5.666,7.062 5.729,7.123C5.792,7.185 5.822,7.272 5.822,7.388C5.822,7.462 5.806,7.524 5.774,7.58C5.739,7.643 5.694,7.699 5.64,7.749C5.58,7.805 5.516,7.855 5.451,7.896C5.374,7.945 5.301,7.994 5.234,8.041C5.104,8.132 4.979,8.222 4.861,8.31C4.739,8.4 4.63,8.503 4.535,8.614C4.441,8.727 4.366,8.857 4.31,8.999C4.255,9.144 4.228,9.313 4.228,9.505V9.62H6.686V8.855H6.686Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
7
app/src/main/res/drawable/rank_rv_bg.xml
Normal file
7
app/src/main/res/drawable/rank_rv_bg.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/main_bg" />
|
||||
<corners
|
||||
android:topLeftRadius="40dp"
|
||||
android:topRightRadius="40dp" />
|
||||
</shape>
|
||||
18
app/src/main/res/drawable/rank_uncheck.xml
Normal file
18
app/src/main/res/drawable/rank_uncheck.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="25"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M11.912,5.248H12.759V1.957H12.054L12.039,2.055C12.024,2.155 11.995,2.236 11.95,2.299C11.905,2.363 11.85,2.416 11.785,2.456C11.716,2.497 11.638,2.526 11.553,2.542C11.472,2.557 11.391,2.565 11.315,2.565L11.149,2.56V3.263H11.912V5.248Z"
|
||||
android:fillColor="#9DB2CE"/>
|
||||
<path
|
||||
android:pathData="M21.35,13.514H16.554C16.455,13.514 16.354,13.524 16.256,13.545V7.325C16.256,6.555 15.637,5.93 14.876,5.93H9.82C9.059,5.93 8.44,6.555 8.44,7.325V10.295C8.343,10.274 8.243,10.264 8.141,10.264H3.346C2.571,10.264 1.94,10.892 1.94,11.666V20.651C1.94,21.418 2.559,22.042 3.319,22.042H21.377C22.137,22.042 22.756,21.418 22.756,20.651V14.926C22.756,14.147 22.125,13.514 21.35,13.514ZM16.256,14.926C16.256,14.887 16.287,14.856 16.325,14.856H21.35C21.386,14.856 21.419,14.889 21.419,14.926L21.441,20.651C21.441,20.688 21.412,20.718 21.377,20.718H16.256V14.926ZM9.755,7.325C9.755,7.287 9.784,7.257 9.82,7.257H14.876C14.912,7.257 14.941,7.287 14.941,7.325V20.718H9.755V7.325ZM3.278,11.666C3.278,11.628 3.309,11.598 3.346,11.598H8.377C8.415,11.598 8.446,11.628 8.446,11.665L8.44,20.718H3.319C3.284,20.718 3.254,20.688 3.254,20.651L3.278,11.666Z"
|
||||
android:fillColor="#9DB2CE"/>
|
||||
<path
|
||||
android:pathData="M18.35,12.213C18.458,12.317 18.592,12.398 18.749,12.455C18.903,12.508 19.072,12.535 19.253,12.535C19.412,12.535 19.567,12.511 19.714,12.464C19.862,12.416 19.996,12.345 20.111,12.252C20.228,12.156 20.323,12.037 20.391,11.898C20.461,11.757 20.496,11.595 20.496,11.418C20.496,11.218 20.44,11.043 20.33,10.898C20.271,10.82 20.199,10.756 20.114,10.706C20.172,10.661 20.221,10.607 20.259,10.544C20.341,10.414 20.383,10.261 20.383,10.089C20.383,9.932 20.348,9.79 20.277,9.668C20.209,9.551 20.119,9.45 20.01,9.367C19.902,9.286 19.78,9.225 19.647,9.185C19.352,9.097 19.035,9.106 18.782,9.21C18.639,9.268 18.516,9.349 18.415,9.453C18.313,9.555 18.233,9.681 18.177,9.826C18.122,9.967 18.091,10.124 18.085,10.295L18.08,10.415H18.903L18.901,10.297C18.899,10.167 18.93,10.06 18.992,9.978C19.049,9.905 19.134,9.868 19.253,9.868C19.34,9.868 19.414,9.895 19.48,9.948C19.539,9.996 19.567,10.064 19.567,10.159C19.567,10.218 19.555,10.265 19.53,10.296C19.5,10.333 19.462,10.362 19.414,10.383C19.361,10.406 19.302,10.419 19.24,10.424C19.17,10.43 19.106,10.43 19.048,10.424L18.921,10.412V11.092H19.037C19.11,11.092 19.186,11.094 19.267,11.099C19.335,11.103 19.399,11.116 19.457,11.138C19.506,11.159 19.546,11.19 19.579,11.233C19.607,11.273 19.623,11.342 19.623,11.432C19.623,11.547 19.589,11.634 19.518,11.697C19.444,11.764 19.355,11.797 19.245,11.797C19.173,11.797 19.112,11.785 19.065,11.76C19.014,11.735 18.974,11.703 18.941,11.663C18.906,11.619 18.879,11.567 18.862,11.507C18.842,11.445 18.83,11.377 18.827,11.304L18.824,11.193H18.012L18.012,11.306C18.008,11.5 18.036,11.675 18.095,11.823C18.153,11.973 18.239,12.105 18.35,12.213Z"
|
||||
android:fillColor="#9DB2CE"/>
|
||||
<path
|
||||
android:pathData="M6.686,8.855H5.389C5.414,8.83 5.441,8.808 5.468,8.786C5.562,8.711 5.661,8.639 5.762,8.572C5.867,8.503 5.971,8.433 6.074,8.363C6.185,8.288 6.284,8.204 6.368,8.112C6.456,8.019 6.529,7.91 6.585,7.786C6.641,7.658 6.668,7.512 6.668,7.34C6.668,7.176 6.637,7.024 6.573,6.888C6.511,6.755 6.426,6.643 6.316,6.548C6.21,6.457 6.087,6.387 5.948,6.339C5.647,6.235 5.258,6.25 4.982,6.371C4.827,6.44 4.695,6.54 4.591,6.665C4.489,6.789 4.412,6.935 4.362,7.099C4.312,7.262 4.29,7.438 4.296,7.624L4.299,7.736H5.117V7.62C5.117,7.546 5.125,7.471 5.138,7.396C5.153,7.323 5.177,7.257 5.207,7.201C5.236,7.149 5.273,7.108 5.321,7.075C5.363,7.047 5.417,7.032 5.483,7.032C5.585,7.032 5.666,7.062 5.729,7.123C5.792,7.185 5.822,7.272 5.822,7.388C5.822,7.462 5.806,7.524 5.774,7.58C5.739,7.643 5.694,7.699 5.64,7.749C5.58,7.805 5.516,7.855 5.451,7.896C5.374,7.945 5.301,7.994 5.234,8.041C5.104,8.132 4.979,8.222 4.861,8.31C4.739,8.4 4.63,8.503 4.535,8.614C4.441,8.727 4.366,8.857 4.31,8.999C4.255,9.144 4.228,9.313 4.228,9.505V9.62H6.686V8.855H6.686Z"
|
||||
android:fillColor="#9DB2CE"/>
|
||||
</vector>
|
||||
8
app/src/main/res/drawable/seek_bar_thumb.xml
Normal file
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/white" />
|
||||
<size
|
||||
android:width="12dp"
|
||||
android:height="12dp" />
|
||||
</shape>
|
||||
17
app/src/main/res/drawable/seekbar_style.xml
Normal file
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/seekbar_hdie" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<solid android:color="@color/seekbar_show" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
</layer-list>
|
||||
5
app/src/main/res/drawable/setting_cons_bg.xml
Normal file
5
app/src/main/res/drawable/setting_cons_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/setting_cons_color" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/tab_check.xml
Normal file
5
app/src/main/res/drawable/tab_check.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/tab_check" />
|
||||
<corners android:radius="44dp" />
|
||||
</shape>
|
||||
41
app/src/main/res/layout/activity_list.xml
Normal file
41
app/src/main/res/layout/activity_list.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/list_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:background="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/pre_list_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/pre_list_title" />
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:id="@+id/pre_list_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
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/pre_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/pre_list_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
27
app/src/main/res/layout/activity_main.xml
Normal file
27
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?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.viewpager.widget.ViewPager
|
||||
android:id="@+id/main_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/main_tab"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/butoon_tablayout"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:tabIndicatorHeight="0dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
109
app/src/main/res/layout/activity_pre_view.xml
Normal file
109
app/src/main/res/layout/activity_pre_view.xml
Normal file
@ -0,0 +1,109 @@
|
||||
<?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_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.PreViewActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pre_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/pre_image_frame"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="250dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@mipmap/pre_image_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_back">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pre_image"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="170dp"
|
||||
android:layout_gravity="center" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:id="@+id/pre_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_image_frame" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="45dp"
|
||||
android:progressDrawable="@drawable/seekbar_style"
|
||||
android:thumb="@drawable/seek_bar_thumb"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pre_text" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/volumeleft"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="@drawable/icon_null"
|
||||
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="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:background="@drawable/icon_add"
|
||||
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="50dp"
|
||||
android:background="@drawable/pre_play"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/seekbar" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pre_image_loop"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:background="@drawable/icon_unloop"
|
||||
app:layout_constraintBottom_toBottomOf="@id/pre_play"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/pre_play" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pre_like"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:background="@drawable/icon_unlike"
|
||||
app:layout_constraintBottom_toBottomOf="@id/pre_play"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/pre_play" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
58
app/src/main/res/layout/activity_record.xml
Normal file
58
app/src/main/res/layout/activity_record.xml
Normal file
@ -0,0 +1,58 @@
|
||||
<?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_record"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.RecordActivity">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/record_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:id="@+id/record_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/record_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:id="@+id/record_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="90dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/record_title" />
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:layout_margin="24dp"
|
||||
android:id="@+id/view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/record_time"
|
||||
app:lottie_fileName="6PLI2cponf.json" />
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
100
app/src/main/res/layout/activity_save.xml
Normal file
100
app/src/main/res/layout/activity_save.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?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_save"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.SaveActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/save_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:id="@+id/save_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/record_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/save_image"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="220dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:src="@mipmap/save_image"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/save_title" />
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:id="@+id/save_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/time_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/save_image" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/save_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="36dp"
|
||||
android:background="@drawable/edit_bg"
|
||||
android:gravity="center"
|
||||
android:hint="@string/edit_hint"
|
||||
android:maxLength="10"
|
||||
android:padding="8dp"
|
||||
android:textColorHint="@color/add_tips_color"
|
||||
app:layout_constraintTop_toBottomOf="@id/save_time" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/save_play"
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="95dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/pre_play"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/save_edit" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/save"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/tab_check"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="@string/record_save"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/save_play" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
148
app/src/main/res/layout/activity_setting.xml
Normal file
148
app/src/main/res/layout/activity_setting.xml
Normal file
@ -0,0 +1,148 @@
|
||||
<?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_setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/main_bg"
|
||||
tools:context=".activity.SettingActivity">
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:id="@+id/setting_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/setting_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting_back"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/setting_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/setting_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:background="@drawable/setting_cons_bg"
|
||||
android:padding="24dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/setting_title">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/setting_privacy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privacy_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/icon_privacy"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/setting_share"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_privacy">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/share_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/icon_share"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/setting_rate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_share">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/rate_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/icon_rate"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/setting_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/setting_rate">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/version_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
27
app/src/main/res/layout/activity_splash.xml
Normal file
27
app/src/main/res/layout/activity_splash.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?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_splash"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/splash_bg_2x"
|
||||
tools:context=".activity.SplashActivity">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@mipmap/splash_bg" />-->
|
||||
|
||||
<com.fun.airhornprank.tool.CustomProgressBar
|
||||
android:id="@+id/splash_pg"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="100dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
16
app/src/main/res/layout/activity_web.xml
Normal file
16
app/src/main/res/layout/activity_web.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?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_web"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.WebActivity">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/web"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
32
app/src/main/res/layout/custom_check_cons.xml
Normal file
32
app/src/main/res/layout/custom_check_cons.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"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/tab_check">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/main_image"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_margin="7dp"
|
||||
android:src="@drawable/custom_check"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.fun.airhornprank.tool.MyTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/custom_tab_text"
|
||||
android:textColor="@color/white"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_image"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/main_image"
|
||||
app:layout_constraintTop_toTopOf="@id/main_image" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
91
app/src/main/res/layout/custom_list.xml
Normal file
91
app/src/main/res/layout/custom_list.xml
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="24dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/custom_cons"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/custom_item_delete"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/custom_image"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@drawable/ic_launcher_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/custom_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/custom_image"
|
||||
app:layout_constraintEnd_toStartOf="@id/custom_time"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/custom_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/add_tips_color"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/custom_like"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/custom_like"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/icon_unlike"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/custom_item_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/custom_delete_cons_bg"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/custom_cons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/custom_cons">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/icon_item_delete"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user