init
88
.gitignore
vendored
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
# Built application files
|
||||||
|
*.apk
|
||||||
|
*.aar
|
||||||
|
*.ap_
|
||||||
|
*.aab
|
||||||
|
|
||||||
|
# Files for the ART/Dalvik VM
|
||||||
|
*.dex
|
||||||
|
|
||||||
|
# Java class files
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
bin/
|
||||||
|
gen/
|
||||||
|
out/
|
||||||
|
# Uncomment the following line in case you need and you don't have the release build type files in your app
|
||||||
|
# release/
|
||||||
|
|
||||||
|
# Gradle files
|
||||||
|
.gradle/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Local configuration file (sdk path, etc)
|
||||||
|
local.properties
|
||||||
|
|
||||||
|
# Proguard folder generated by Eclipse
|
||||||
|
proguard/
|
||||||
|
|
||||||
|
# Log Files
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Android Studio Navigation editor temp files
|
||||||
|
.navigation/
|
||||||
|
|
||||||
|
# Android Studio captures folder
|
||||||
|
captures/
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
*.iml
|
||||||
|
.idea/workspace.xml
|
||||||
|
.idea/tasks.xml
|
||||||
|
.idea/gradle.xml
|
||||||
|
.idea/assetWizardSettings.xml
|
||||||
|
.idea/dictionaries
|
||||||
|
.idea/libraries
|
||||||
|
# Android Studio 3 in .gitignore file.
|
||||||
|
.idea/caches
|
||||||
|
.idea/modules.xml
|
||||||
|
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
|
||||||
|
.idea/navEditor.xml
|
||||||
|
|
||||||
|
# Keystore files
|
||||||
|
# Uncomment the following lines if you do not want to check your keystore files in.
|
||||||
|
#*.jks
|
||||||
|
#*.keystore
|
||||||
|
|
||||||
|
# External native build folder generated in Android Studio 2.2 and later
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx/
|
||||||
|
|
||||||
|
# Google Services (e.g. APIs or Firebase)
|
||||||
|
# google-services.json
|
||||||
|
|
||||||
|
# Freeline
|
||||||
|
freeline.py
|
||||||
|
freeline/
|
||||||
|
freeline_project_description.json
|
||||||
|
|
||||||
|
# fastlane
|
||||||
|
fastlane/report.xml
|
||||||
|
fastlane/Preview.html
|
||||||
|
fastlane/screenshots
|
||||||
|
fastlane/test_output
|
||||||
|
fastlane/readme.md
|
||||||
|
|
||||||
|
# Version control
|
||||||
|
vcs.xml
|
||||||
|
|
||||||
|
# lint
|
||||||
|
lint/intermediates/
|
||||||
|
lint/generated/
|
||||||
|
lint/outputs/
|
||||||
|
lint/tmp/
|
||||||
|
# lint/reports/
|
||||||
|
|
||||||
|
# Android Profiling
|
||||||
|
*.hprof
|
||||||
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
73
app/build.gradle.kts
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
id("com.google.gms.google-services")
|
||||||
|
id("applovin-quality-service")
|
||||||
|
}
|
||||||
|
applovin {
|
||||||
|
apiKey = "HiXscdwWaEIFC16qq8xh13TwCnN5Jrs_b0ANd1EtqbPEQX_KegZ5CxV47OaffUbNouMT1l31b3ND3kKEbthqWZ"
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.prankapp.fartsounds.airhorn"
|
||||||
|
compileSdk = 33
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.prankapp.fartsounds.airhorn"
|
||||||
|
minSdk = 21
|
||||||
|
targetSdk = 33
|
||||||
|
versionCode = 2
|
||||||
|
versionName = "1.1"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
//prank01 prank prank123
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation("androidx.core:core-ktx:1.9.0")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
|
implementation("com.google.android.material:material:1.8.0")
|
||||||
|
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||||
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||||
|
testImplementation("junit:junit:4.13.2")
|
||||||
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||||
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||||
|
|
||||||
|
implementation ("com.google.code.gson:gson:2.8.6")
|
||||||
|
|
||||||
|
implementation ("com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.47")
|
||||||
|
|
||||||
|
implementation ("com.github.bumptech.glide:glide:4.16.0")
|
||||||
|
implementation ("me.drakeet.materialdialog:library:1.3.1")
|
||||||
|
|
||||||
|
annotationProcessor ("com.github.bumptech.glide:compiler:4.16.0")
|
||||||
|
implementation ("com.github.ForgetAll:LoadingDialog:v1.1.2")
|
||||||
|
|
||||||
|
implementation ("com.alibaba:fastjson:1.2.70")
|
||||||
|
implementation(platform("com.google.firebase:firebase-bom:33.0.0"))
|
||||||
|
implementation("com.google.firebase:firebase-analytics")
|
||||||
|
|
||||||
|
implementation("com.applovin:applovin-sdk:12.5.0")
|
||||||
|
implementation("com.applovin.mediation:adcolony-adapter:4.8.0.4")
|
||||||
|
implementation("com.applovin.mediation:ironsource-adapter:8.1.0.0.0")
|
||||||
|
implementation("com.applovin.mediation:vungle-adapter:7.3.2.1")
|
||||||
|
implementation("com.applovin.mediation:facebook-adapter:6.17.0.0")
|
||||||
|
implementation("com.applovin.mediation:bytedance-adapter:5.9.0.6.0")
|
||||||
|
implementation("com.applovin.mediation:unityads-adapter:4.12.0.0")
|
||||||
|
|
||||||
|
}
|
||||||
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "545114132353",
|
||||||
|
"project_id": "prank-app-funny-sounds-air-hor",
|
||||||
|
"storage_bucket": "prank-app-funny-sounds-air-hor.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:545114132353:android:2f3713b50c726900a2a280",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.prankapp.fartsounds.airhorn"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyCkBnu8PFLZmPPBEEv1o27iTAYBVZpBdec"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
BIN
app/prank01.jks
Normal file
BIN
app/prankapp.jks
Normal file
10
app/prankappkey.rtf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{\rtf1\ansi\ansicpg936\cocoartf2761
|
||||||
|
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
{\*\expandedcolortbl;;}
|
||||||
|
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
|
||||||
|
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
|
\f0\fs24 \cf0 key store psd \uc0\u65306 prank123\
|
||||||
|
alias\uc0\u65306 prank\
|
||||||
|
key psd\uc0\u65306 prank123123}
|
||||||
21
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# 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
|
||||||
48
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?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.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name=".app.Application__"
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
android:icon="@mipmap/ic_lancher_prank01"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/ic_lancher_prank01"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/prank01"
|
||||||
|
tools:targetApi="31">
|
||||||
|
<activity
|
||||||
|
android:name=".splash_prank.SplashActivity"
|
||||||
|
android:theme="@style/splashprank"
|
||||||
|
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=".MainActivity"/>
|
||||||
|
<activity android:name=".ui.PrankDetailsActivity"/>
|
||||||
|
<activity android:name=".ui.AboutHhdgActivity"/>
|
||||||
|
<activity android:name=".ui.SettingActivity"/>
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="com.prankapp.fartsounds.airhorn"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true"
|
||||||
|
tools:replace="android:authorities">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/file_path" />
|
||||||
|
</provider>
|
||||||
|
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
3956
app/src/main/assets/prank.json
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
|
||||||
|
import com.prankapp.fartsounds.airhorn.adapterdfds.MyFragmentPagerAdapter;
|
||||||
|
import com.prankapp.fartsounds.airhorn.ui.HomeFragment;
|
||||||
|
import com.prankapp.fartsounds.airhorn.ui.MineFragment;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.ImmUtils;
|
||||||
|
import com.prankapp.fartsounds.airhorn.view.NoScrollViewPager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
List<Fragment> fragmentList = new ArrayList<>();
|
||||||
|
RadioGroup radioGroup;
|
||||||
|
RadioButton radio_home;
|
||||||
|
RadioButton radio_mine;
|
||||||
|
NoScrollViewPager noScrollViewPager;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
noScrollViewPager = findViewById(R.id.viewpager);
|
||||||
|
radioGroup = findViewById(R.id.radioGroup);
|
||||||
|
radio_home = findViewById(R.id.radio_home);
|
||||||
|
radio_mine = findViewById(R.id.radio_mine);
|
||||||
|
|
||||||
|
|
||||||
|
ImmUtils.setStatusBar(this,false,false);
|
||||||
|
fragmentList.clear();
|
||||||
|
|
||||||
|
HomeFragment homeFragment = new HomeFragment();
|
||||||
|
MineFragment mineFragment = new MineFragment();
|
||||||
|
fragmentList.add(homeFragment);
|
||||||
|
fragmentList.add(mineFragment);
|
||||||
|
|
||||||
|
noScrollViewPager.setAdapter(new MyFragmentPagerAdapter(getSupportFragmentManager(), fragmentList));
|
||||||
|
noScrollViewPager.setCurrentItem(0);
|
||||||
|
noScrollViewPager.setNoScroll(true);
|
||||||
|
noScrollViewPager.setOffscreenPageLimit(3);
|
||||||
|
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(RadioGroup radioGroup, int checkedId) {
|
||||||
|
if(R.id.radio_home == checkedId){
|
||||||
|
noScrollViewPager.setCurrentItem(0, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(R.id.radio_mine == checkedId){
|
||||||
|
noScrollViewPager.setCurrentItem(1, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Drawable drawable1=getResources().getDrawable(R.drawable.selector_home);
|
||||||
|
drawable1.setBounds(0,0,dip2px(this,20),dip2px(this,20));
|
||||||
|
radio_home.setCompoundDrawables(null,drawable1,null,null);
|
||||||
|
|
||||||
|
Drawable drawable2=getResources().getDrawable(R.drawable.selector_my);
|
||||||
|
drawable2.setBounds(0,0,dip2px(this,20),dip2px(this,20));
|
||||||
|
radio_mine.setCompoundDrawables(null,drawable2,null,null);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int dip2px(Context context, float dpValue) {
|
||||||
|
final float scale = context.getResources().getDisplayMetrics().density;
|
||||||
|
return (int) (dpValue * scale + 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static int px2dip(Context context, float pxValue) {
|
||||||
|
final float scale = context.getResources().getDisplayMetrics().density;
|
||||||
|
return (int) (pxValue / scale + 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.ad_util;
|
||||||
|
|
||||||
|
public interface AdPrankListener {
|
||||||
|
void adPrankShow();
|
||||||
|
void adPrankClose();
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.ad_util;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.lifecycle.Lifecycle;
|
||||||
|
import androidx.lifecycle.LifecycleObserver;
|
||||||
|
import androidx.lifecycle.OnLifecycleEvent;
|
||||||
|
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||||
|
|
||||||
|
import com.applovin.mediation.MaxAd;
|
||||||
|
import com.applovin.mediation.MaxAdListener;
|
||||||
|
import com.applovin.mediation.MaxError;
|
||||||
|
import com.applovin.mediation.ads.MaxAppOpenAd;
|
||||||
|
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||||
|
|
||||||
|
public class MaxPrankAdManager implements LifecycleObserver, MaxAdListener {
|
||||||
|
private MaxInterstitialAd appOpenAd;
|
||||||
|
private Context context;
|
||||||
|
AdPrankListener adListener;
|
||||||
|
public MaxPrankAdManager(Context context, String id, AdPrankListener adLoadedListener) {
|
||||||
|
ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
|
||||||
|
this.adListener = adLoadedListener;
|
||||||
|
this.context = context;
|
||||||
|
appOpenAd = new MaxInterstitialAd(id, context);
|
||||||
|
appOpenAd.setListener(this);
|
||||||
|
appOpenAd.loadAd();
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnLifecycleEvent(Lifecycle.Event.ON_START)
|
||||||
|
public void onStart() {
|
||||||
|
//showAdIfReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAdLoaded(final MaxAd ad) {
|
||||||
|
Log.e("prank","onAdLoaded");
|
||||||
|
adListener.adPrankShow();
|
||||||
|
appOpenAd.showAd();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAdLoadFailed(final String adUnitId, final MaxError error) {
|
||||||
|
Log.e("prank","onAdLoadFailed");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAdDisplayed(final MaxAd ad) {
|
||||||
|
Log.e("prank","onAdDisplayed");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAdClicked(final MaxAd ad) {
|
||||||
|
Log.e("prank","onAdClicked");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAdHidden(final MaxAd ad) {
|
||||||
|
adListener.adPrankClose();
|
||||||
|
// appOpenAd.loadAd();
|
||||||
|
Log.e("prank","onAdHidden");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAdDisplayFailed(final MaxAd ad, final MaxError error) {
|
||||||
|
appOpenAd.loadAd();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.adapterdfds;
|
||||||
|
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MineLikeAdapter extends BaseQuickAdapter<PrankListModel, BaseViewHolder> {
|
||||||
|
|
||||||
|
public MineLikeAdapter(int layoutResId, @Nullable List<PrankListModel> data) {
|
||||||
|
super(layoutResId, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void convert(@NonNull BaseViewHolder helper, PrankListModel item) {
|
||||||
|
ImageView imageView = helper.getView(R.id.iv_like);
|
||||||
|
Glide.with(mContext).load(item.getCategoryUrl()).into(imageView);
|
||||||
|
TextView textView = helper.getView(R.id.tv_like_title);
|
||||||
|
textView.setText(item.getCategoryName());
|
||||||
|
helper.addOnClickListener(R.id.iv_delete);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.adapterdfds;
|
||||||
|
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MyFragmentPagerAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
|
public List<Fragment> mFragments;
|
||||||
|
private String[] titleArray;
|
||||||
|
|
||||||
|
public MyFragmentPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
|
||||||
|
super(fm);
|
||||||
|
this.mFragments = fragments;
|
||||||
|
}
|
||||||
|
public MyFragmentPagerAdapter(FragmentManager fm, List<Fragment> fragmentList, String[] titleArray) {
|
||||||
|
super(fm);
|
||||||
|
this.mFragments = fragmentList;
|
||||||
|
this.titleArray = titleArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Fragment getItem(int position) {
|
||||||
|
return mFragments.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mFragments.size();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public CharSequence getPageTitle(int position) {
|
||||||
|
return titleArray[position];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFramentData(List<Fragment> fragmentList) {
|
||||||
|
this.mFragments = fragmentList;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitleData(String[] titleArray) {
|
||||||
|
this.titleArray = titleArray;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroyItem(ViewGroup container, int position, Object object) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.adapterdfds;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PrankDetailsListAdapter extends BaseQuickAdapter<PrankListModel.ListBean, BaseViewHolder> {
|
||||||
|
public PrankDetailsListAdapter(int layoutResId, @Nullable List<PrankListModel.ListBean> data) {
|
||||||
|
super(layoutResId, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void convert(@NonNull BaseViewHolder helper, PrankListModel.ListBean item) {
|
||||||
|
ImageView image = helper.getView(R.id.iv_item);
|
||||||
|
RequestOptions options = new RequestOptions()
|
||||||
|
.bitmapTransform(new RoundedCorners(dip2px(mContext, 100)));
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(item.getPreUrl())
|
||||||
|
.apply(options)
|
||||||
|
.into(image);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int dip2px(Context context, float dpValue) {
|
||||||
|
final float scale = context.getResources().getDisplayMetrics().density;
|
||||||
|
return (int) (dpValue * scale + 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static int px2dip(Context context, float pxValue) {
|
||||||
|
final float scale = context.getResources().getDisplayMetrics().density;
|
||||||
|
return (int) (pxValue / scale + 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.adapterdfds;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PrankListAdapter extends BaseQuickAdapter<PrankListModel, BaseViewHolder> {
|
||||||
|
|
||||||
|
public PrankListAdapter(int layoutResId, List<PrankListModel> data) {
|
||||||
|
super(layoutResId, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void convert(BaseViewHolder helper, PrankListModel item) {
|
||||||
|
ImageView image = helper.getView(R.id.prank_image);
|
||||||
|
TextView tv_titleff = helper.getView(R.id.tv_titleff);
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(item.getCategoryUrl())
|
||||||
|
.into(image);
|
||||||
|
tv_titleff.setText(item.getCategoryName());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.app;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.Utils;
|
||||||
|
|
||||||
|
public class Application__ extends Application {
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
Utils.init(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PrankListModel {
|
||||||
|
|
||||||
|
|
||||||
|
private String categoryId;
|
||||||
|
private String categoryName;
|
||||||
|
private String categoryUrl;
|
||||||
|
private List<ListBean> list;
|
||||||
|
|
||||||
|
public String getCategoryId() {
|
||||||
|
return categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryId(String categoryId) {
|
||||||
|
this.categoryId = categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoryName() {
|
||||||
|
return categoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryName(String categoryName) {
|
||||||
|
this.categoryName = categoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoryUrl() {
|
||||||
|
return categoryUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryUrl(String categoryUrl) {
|
||||||
|
this.categoryUrl = categoryUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ListBean> getList() {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<ListBean> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ListBean {
|
||||||
|
private String title;
|
||||||
|
private String mp3Url;
|
||||||
|
private String preUrl;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.splash_prank;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.applovin.sdk.AppLovinMediationProvider;
|
||||||
|
import com.applovin.sdk.AppLovinSdk;
|
||||||
|
import com.applovin.sdk.AppLovinSdkConfiguration;
|
||||||
|
import com.applovin.sdk.AppLovinSdkInitializationConfiguration;
|
||||||
|
import com.prankapp.fartsounds.airhorn.MainActivity;
|
||||||
|
import com.prankapp.fartsounds.airhorn.ad_util.AdPrankListener;
|
||||||
|
import com.prankapp.fartsounds.airhorn.ad_util.MaxPrankAdManager;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.Constant;
|
||||||
|
|
||||||
|
public class SplashActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
Handler handlerdfdsf = new Handler();
|
||||||
|
private Runnable runnablegfdg;
|
||||||
|
|
||||||
|
|
||||||
|
private boolean isShowedPrankAd = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
runnablegfdg = new Runnable() {
|
||||||
|
int count = 15;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (count > 0) {
|
||||||
|
if (isShowedPrankAd) {
|
||||||
|
handlerdfdsf.removeCallbacks(runnablegfdg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
count--;
|
||||||
|
handlerdfdsf.postDelayed(this, 1000);
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
|
startActivity(new Intent(SplashActivity.this, MainActivity.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
handlerdfdsf.postDelayed(runnablegfdg, 0);
|
||||||
|
|
||||||
|
|
||||||
|
AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder( "yuB4fQEc6yE5384qm7dKkZU6eOJDHwLmJfxUZ8s7A7nDa5nUlrG85VwVgJCl3X_EQWhiRZTyyVhiJWlmorVRxi", this )
|
||||||
|
.setMediationProvider( AppLovinMediationProvider.MAX )
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// Initialize the SDK with the configuration
|
||||||
|
AppLovinSdk.getInstance( this ).initialize( initConfig, new AppLovinSdk.SdkInitializationListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onSdkInitialized(final AppLovinSdkConfiguration sdkConfig)
|
||||||
|
{
|
||||||
|
Log.e("hhh", "sdk初始化成功");
|
||||||
|
|
||||||
|
MaxPrankAdManager maxAdManager = new MaxPrankAdManager(SplashActivity.this, Constant.adIdpPrankSplash, new AdPrankListener() {
|
||||||
|
@Override
|
||||||
|
public void adPrankShow() {
|
||||||
|
isShowedPrankAd = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void adPrankClose() {
|
||||||
|
finish();
|
||||||
|
startActivity(new Intent(SplashActivity.this, MainActivity.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
handlerdfdsf.removeCallbacks(runnablegfdg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.ui;
|
||||||
|
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.ImmUtils;
|
||||||
|
|
||||||
|
public class AboutHhdgActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
TextView tvVersion;
|
||||||
|
ImageView iv_back;
|
||||||
|
LinearLayout ll_ysdddd;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_about);
|
||||||
|
ImmUtils.setStatusBar(this,false,false);
|
||||||
|
|
||||||
|
tvVersion = findViewById(R.id.tv_version);
|
||||||
|
iv_back = findViewById(R.id.iv_back);
|
||||||
|
|
||||||
|
PackageManager packageManager = getPackageManager();
|
||||||
|
String packageName = getPackageName();
|
||||||
|
try {
|
||||||
|
PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0);
|
||||||
|
tvVersion.setText("V"+packageInfo.versionName);
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
iv_back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.ui;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.adapterdfds.PrankListAdapter;
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.Constant;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.ImmUtils;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.JsonUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class HomeFragment extends Fragment {
|
||||||
|
RecyclerView recyclerView;
|
||||||
|
ArrayList<PrankListModel> prankListModel;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
|
View view = inflater.inflate(R.layout.fragment_view, container, false);
|
||||||
|
return view;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
recyclerView = view.findViewById(R.id.rlv_prank);
|
||||||
|
|
||||||
|
ImmUtils.setStatusBar(getActivity(),false,false);
|
||||||
|
|
||||||
|
try {
|
||||||
|
prankListModel = JsonUtils.parseJsonListFromAssets(getActivity(),"prank.json");
|
||||||
|
|
||||||
|
Constant.prankListModel.clear();
|
||||||
|
Constant.prankListModel.addAll(prankListModel);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
PrankListAdapter prankListAdapter = new PrankListAdapter(R.layout.item_prank,prankListModel);
|
||||||
|
|
||||||
|
recyclerView.setLayoutManager(new GridLayoutManager(getActivity(),2));
|
||||||
|
recyclerView.setAdapter(prankListAdapter);
|
||||||
|
prankListAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
|
startActivity(new Intent(getActivity(), PrankDetailsActivity.class).putExtra("id",prankListModel.get(position).getCategoryId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,131 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.ui;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.adapterdfds.MineLikeAdapter;
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.Constant;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.SPUtils;
|
||||||
|
|
||||||
|
public class MineFragment extends Fragment {
|
||||||
|
RecyclerView recyclerView;
|
||||||
|
ImageView ivSetting;
|
||||||
|
ImageView iv_more;
|
||||||
|
RecyclerView rlv_like;
|
||||||
|
MineLikeAdapter mineLikeAdapter;
|
||||||
|
ArrayList<PrankListModel> pankList = new ArrayList<>();
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
|
View view = inflater.inflate(R.layout.fragment_mine, container, false);
|
||||||
|
return view;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
iv_more = view.findViewById(R.id.iv_more);
|
||||||
|
rlv_like = view.findViewById(R.id.rlv_like);
|
||||||
|
iv_more.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
startActivity(new Intent(getActivity(),SettingActivity.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mineLikeAdapter = new MineLikeAdapter(R.layout.item_mine_like,pankList);
|
||||||
|
rlv_like.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
|
rlv_like.setAdapter(mineLikeAdapter);
|
||||||
|
mineLikeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
|
startActivity(new Intent(getActivity(), PrankDetailsActivity.class).putExtra("id",pankList.get(position).getCategoryId()));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mineLikeAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
|
if(view.getId() == R.id.iv_delete){
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
|
builder.setTitle("Tips");
|
||||||
|
builder.setMessage("Unfavorited?");
|
||||||
|
builder.setPositiveButton("Sure", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
deleteLike(position);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
// 点击取消按钮后的逻辑
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog dialog = builder.create();
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
getList();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getList(){
|
||||||
|
String shouCang = SPUtils.getInstance().getString(Constant.shouCang);
|
||||||
|
pankList.clear();
|
||||||
|
if(!shouCang.isEmpty()){
|
||||||
|
JSONArray jsonArray = JSONArray.parseArray(shouCang);
|
||||||
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
PrankListModel prankListModel = JSON.parseObject(jsonArray.get(i).toString(), PrankListModel.class);
|
||||||
|
pankList.add(prankListModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.e("6666size",pankList.size()+"");
|
||||||
|
if (pankList.isEmpty()){
|
||||||
|
View emptyView = getLayoutInflater().inflate(R.layout.layout_empty_view,null);
|
||||||
|
mineLikeAdapter.setEmptyView(emptyView);
|
||||||
|
}
|
||||||
|
mineLikeAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteLike(int index){
|
||||||
|
pankList.remove(index);
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(pankList);
|
||||||
|
SPUtils.getInstance().put(Constant.shouCang,json);
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,352 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.ui;
|
||||||
|
|
||||||
|
import android.animation.ObjectAnimator;
|
||||||
|
import android.media.MediaPlayer;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.ad_util.AdPrankListener;
|
||||||
|
import com.prankapp.fartsounds.airhorn.ad_util.MaxPrankAdManager;
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.Constant;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.ImmUtils;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.SPUtils;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.ShakeUtils;
|
||||||
|
import com.xiasuhuei321.loadingdialog.view.LoadingDialog;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class PrankDetailsActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
ImageView iv_back;
|
||||||
|
ImageView ivContent;
|
||||||
|
ImageView iv_bofang;
|
||||||
|
TextView tv_shake_tips;
|
||||||
|
|
||||||
|
boolean isBoFang = false;
|
||||||
|
boolean isYaoHuangBoFang = false;
|
||||||
|
boolean isPrepare = false;
|
||||||
|
LoadingDialog loadingDialog;
|
||||||
|
PrankListModel.ListBean itemContent;
|
||||||
|
private ImageView iv_shoucang;
|
||||||
|
ShakeUtils mShakeUtils;
|
||||||
|
int jj = 0;
|
||||||
|
private List<PrankListModel> pankList;
|
||||||
|
ObjectAnimator animator;
|
||||||
|
|
||||||
|
boolean isPlayAd = false;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_prank_details);
|
||||||
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog
|
||||||
|
.setLoadingText("loading...")
|
||||||
|
.setSuccessText("Success")
|
||||||
|
.setInterceptBack(true)
|
||||||
|
.show();
|
||||||
|
ImmUtils.setStatusBar(this,false,false);
|
||||||
|
|
||||||
|
iv_back = findViewById(R.id.iv_back);
|
||||||
|
tv_shake_tips = findViewById(R.id.tv_shake_tips);
|
||||||
|
ivContent = findViewById(R.id.iv_conent);
|
||||||
|
iv_bofang = findViewById(R.id.iv_bofang);
|
||||||
|
iv_shoucang = findViewById(R.id.iv_shoucang);
|
||||||
|
|
||||||
|
iv_back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
new MaxPrankAdManager(PrankDetailsActivity.this, Constant.adIdPrankSee, new AdPrankListener() {
|
||||||
|
@Override
|
||||||
|
public void adPrankShow() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void adPrankClose() {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
String id = getIntent().getStringExtra("id");
|
||||||
|
ArrayList<PrankListModel.ListBean> listBeans = new ArrayList<>();
|
||||||
|
|
||||||
|
isShoucah(id);
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < Constant.prankListModel.size(); i++) {
|
||||||
|
if (Constant.prankListModel.get(i).getCategoryId().equals(id)) {
|
||||||
|
jj = i ;
|
||||||
|
listBeans.addAll(Constant.prankListModel.get(i).getList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
itemContent = listBeans.get(0);
|
||||||
|
|
||||||
|
iv_shoucang.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if(isShoucah(id)){
|
||||||
|
pankList.remove(getIndex(id));
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(pankList);
|
||||||
|
SPUtils.getInstance().put(Constant.shouCang,json);
|
||||||
|
}else{
|
||||||
|
pankList.add(Constant.prankListModel.get(jj));
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(pankList);
|
||||||
|
SPUtils.getInstance().put(Constant.shouCang,json);
|
||||||
|
|
||||||
|
}
|
||||||
|
isShoucah(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (mShakeUtils==null){
|
||||||
|
|
||||||
|
mShakeUtils = new ShakeUtils(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Glide.with(this).load(itemContent.getPreUrl()).into(ivContent);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Constant.mediaPlayer.reset();
|
||||||
|
Constant.mediaPlayer.setDataSource(itemContent.getMp3Url());
|
||||||
|
Constant.mediaPlayer.setLooping(true);
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
Constant.mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
|
||||||
|
@Override
|
||||||
|
public void onPrepared(MediaPlayer mp) {
|
||||||
|
isPrepare = true;
|
||||||
|
loadingDialog.loadSuccess();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(id.equals("625f83491fea07887e61906a") || id.equals("636b8e5415831ec42fc7d80a")){//左右摇晃
|
||||||
|
// 设置动画的初始位置,0表示当前位置
|
||||||
|
animator = ObjectAnimator.ofFloat(ivContent, "translationX", -20f,20f);//上下摇晃
|
||||||
|
}else if(id.equals("625f83491fea07887e61906b") || id.equals("62be51cc4d4edd56b588d54e") || id.equals("62be51f84d4edd56b588d54f")|| id.equals("625f83491fea07887e619065")|| id.equals("64b617f06d7b94ebbe2a20fa")) {
|
||||||
|
tv_shake_tips.setVisibility(View.VISIBLE);
|
||||||
|
iv_bofang.setVisibility(View.INVISIBLE);
|
||||||
|
animator = ObjectAnimator.ofFloat(ivContent, "translationY", 0f, 20f, -20f, 20f, -20f, 20f, 0f);
|
||||||
|
}else {
|
||||||
|
animator = ObjectAnimator.ofFloat(ivContent, "translationY", 0f,0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 动画时长
|
||||||
|
animator.setDuration(30);
|
||||||
|
|
||||||
|
// 重复次数,-1表示无限重复
|
||||||
|
animator.setRepeatCount(-1);
|
||||||
|
|
||||||
|
// 重复模式,ObjectAnimator.REVERSE表示反向
|
||||||
|
animator.setRepeatMode(ObjectAnimator.REVERSE);
|
||||||
|
|
||||||
|
Constant.mediaPlayer.prepareAsync();
|
||||||
|
|
||||||
|
Constant.mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||||
|
@Override
|
||||||
|
public void onCompletion(MediaPlayer mp) {
|
||||||
|
iv_bofang.setImageDrawable(getDrawable(R.mipmap.ic_bofang1));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mShakeUtils.setOnShakeListener(new ShakeUtils.OnShakeListener() {
|
||||||
|
@Override
|
||||||
|
public void onShake() {
|
||||||
|
if(id.equals("625f83491fea07887e61906b") || id.equals("62be51cc4d4edd56b588d54e") || id.equals("62be51f84d4edd56b588d54f")|| id.equals("625f83491fea07887e619065")|| id.equals("64b617f06d7b94ebbe2a20fa")) {
|
||||||
|
Log.e("666","摇晃了");
|
||||||
|
playYaoHuangSingle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
iv_bofang.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
if(!isPlayAd){
|
||||||
|
new MaxPrankAdManager(PrankDetailsActivity.this, Constant.adIdPrankUse, new AdPrankListener() {
|
||||||
|
@Override
|
||||||
|
public void adPrankShow() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void adPrankClose() {
|
||||||
|
isPlayAd = true;
|
||||||
|
if(!isPrepare){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isBoFang){
|
||||||
|
isBoFang =false;
|
||||||
|
Constant.mediaPlayer.pause();
|
||||||
|
iv_bofang.setImageDrawable(getDrawable(R.mipmap.ic_bofang1));
|
||||||
|
animator.cancel();
|
||||||
|
}else {
|
||||||
|
Constant.mediaPlayer.start();
|
||||||
|
isBoFang =true;
|
||||||
|
iv_bofang.setImageDrawable(getDrawable(R.mipmap.ic_zanting1));
|
||||||
|
/* if(id.equals("625f83491fea07887e61906b")){
|
||||||
|
animator.start();
|
||||||
|
}*/
|
||||||
|
animator.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}else {
|
||||||
|
|
||||||
|
if(!isPrepare){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isBoFang){
|
||||||
|
isBoFang =false;
|
||||||
|
Constant.mediaPlayer.pause();
|
||||||
|
iv_bofang.setImageDrawable(getDrawable(R.mipmap.ic_bofang1));
|
||||||
|
animator.cancel();
|
||||||
|
}else {
|
||||||
|
Constant.mediaPlayer.start();
|
||||||
|
isBoFang =true;
|
||||||
|
iv_bofang.setImageDrawable(getDrawable(R.mipmap.ic_zanting1));
|
||||||
|
/* if(id.equals("625f83491fea07887e61906b")){
|
||||||
|
animator.start();
|
||||||
|
}*/
|
||||||
|
animator.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void playYaoHuangSingle(){
|
||||||
|
|
||||||
|
if(!isPlayAd){
|
||||||
|
new MaxPrankAdManager(PrankDetailsActivity.this, Constant.adIdPrankUse, new AdPrankListener() {
|
||||||
|
@Override
|
||||||
|
public void adPrankShow() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void adPrankClose() {
|
||||||
|
isPlayAd = true;
|
||||||
|
if(!isPrepare){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isYaoHuangBoFang){
|
||||||
|
isYaoHuangBoFang =false;
|
||||||
|
Constant.mediaPlayer.pause();
|
||||||
|
animator.cancel();
|
||||||
|
}else {
|
||||||
|
Constant.mediaPlayer.start();
|
||||||
|
isYaoHuangBoFang =true;
|
||||||
|
animator.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}else {
|
||||||
|
if(!isPrepare){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isYaoHuangBoFang){
|
||||||
|
isYaoHuangBoFang =false;
|
||||||
|
Constant.mediaPlayer.pause();
|
||||||
|
animator.cancel();
|
||||||
|
}else {
|
||||||
|
Constant.mediaPlayer.start();
|
||||||
|
isYaoHuangBoFang =true;
|
||||||
|
animator.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void playLoop(){
|
||||||
|
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
if (isBoFang || isYaoHuangBoFang){
|
||||||
|
Constant.mediaPlayer.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (mShakeUtils!=null){
|
||||||
|
mShakeUtils.onResume();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
if (mShakeUtils!=null){
|
||||||
|
mShakeUtils.onPause( );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean isShoucah(String id){
|
||||||
|
iv_shoucang.setImageDrawable(getResources().getDrawable(R.mipmap.xihuan2));
|
||||||
|
String shouCang = SPUtils.getInstance().getString(Constant.shouCang);
|
||||||
|
pankList = new ArrayList<>();
|
||||||
|
if(!shouCang.isEmpty()){
|
||||||
|
JSONArray jsonArray = JSONArray.parseArray(shouCang);
|
||||||
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
PrankListModel prankListModel = JSON.parseObject(jsonArray.get(i).toString(), PrankListModel.class);
|
||||||
|
pankList.add(prankListModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean sss= false;
|
||||||
|
for (int i = 0; i < pankList.size(); i++) {
|
||||||
|
if(Objects.equals(pankList.get(i).getCategoryId(), id)){
|
||||||
|
sss = true;
|
||||||
|
iv_shoucang.setImageDrawable(getResources().getDrawable(R.mipmap.xihuan1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sss;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIndex(String id){
|
||||||
|
int reti = 0;
|
||||||
|
for (int i = 0; i < pankList.size(); i++) {
|
||||||
|
if(Objects.equals(pankList.get(i).getCategoryId(), id)){
|
||||||
|
reti = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return reti;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.ui;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||||
|
import com.prankapp.fartsounds.airhorn.R;
|
||||||
|
import com.prankapp.fartsounds.airhorn.utilsfff.ImmUtils;
|
||||||
|
|
||||||
|
public class SettingActivity extends AppCompatActivity {
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_setting);
|
||||||
|
ImmUtils.setStatusBar(this,false,false);
|
||||||
|
ImageView imageView = findViewById(R.id.iv_back);
|
||||||
|
RelativeLayout rl_about = findViewById(R.id.rl_about);
|
||||||
|
RelativeLayout rl_feedback = findViewById(R.id.rl_feedback);
|
||||||
|
RelativeLayout rl_yinsii = findViewById(R.id.rl_yinsii);
|
||||||
|
RelativeLayout rl_yonghu = findViewById(R.id.rl_yonghu);
|
||||||
|
rl_feedback.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
// 参数2:设置BottomSheetDialog的主题样式;将背景设置为transparent,这样我们写的shape_bottom_sheet_dialog.xml才会起作用
|
||||||
|
BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(SettingActivity.this, R.style.BottomSheetDialog);
|
||||||
|
//不传第二个参数
|
||||||
|
//BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(this);
|
||||||
|
|
||||||
|
// 底部弹出的布局
|
||||||
|
View bottomView = LayoutInflater.from(SettingActivity.this).inflate(R.layout.bottom_sheet_layout, null);
|
||||||
|
TextView tvEmail = bottomView.findViewById(R.id.tv_email);
|
||||||
|
TextView cancel = bottomView.findViewById(R.id.cancel);
|
||||||
|
cancel.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
bottomSheetDialog.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tvEmail.setText("google@email.com");
|
||||||
|
bottomSheetDialog.setContentView(bottomView);
|
||||||
|
//设置点击dialog外部不消失
|
||||||
|
//bottomSheetDialog.setCanceledOnTouchOutside(false);
|
||||||
|
bottomSheetDialog.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
rl_yinsii.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.setAction("android.intent.action.VIEW");
|
||||||
|
Uri content_url = Uri.parse("https://prankapp.bitbucket.io/privacy.html");
|
||||||
|
intent.setData(content_url);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
rl_yonghu.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.setAction("android.intent.action.VIEW");
|
||||||
|
Uri content_url = Uri.parse("https://wallpaperbox.bitbucket.io/privacy.html");
|
||||||
|
intent.setData(content_url);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
imageView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
rl_about.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
startActivity(new Intent(SettingActivity.this,AboutHhdgActivity.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.utilsfff;
|
||||||
|
|
||||||
|
import android.media.MediaPlayer;
|
||||||
|
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class Constant {
|
||||||
|
public static ArrayList<PrankListModel> prankListModel = new ArrayList<>();
|
||||||
|
public static MediaPlayer mediaPlayer = new MediaPlayer();
|
||||||
|
public static String shouCang = "shoucang";
|
||||||
|
|
||||||
|
public static final String adIdpPrankSplash= "39bd4f9165d75fed";
|
||||||
|
public static final String adIdPrankSee= "76532814de4b3bdf";
|
||||||
|
public static final String adIdPrankUse= "5dd7aa533ceff51e";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.utilsfff
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.os.Build
|
||||||
|
import android.view.View
|
||||||
|
import android.view.WindowManager
|
||||||
|
import com.prankapp.fartsounds.airhorn.R
|
||||||
|
|
||||||
|
object ImmUtils {
|
||||||
|
@JvmStatic
|
||||||
|
fun setStatusBar(activity: Activity, useThemestatusBarColor: Boolean, withoutUseStatusBarColor: Boolean) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
val decorView = activity.window.decorView
|
||||||
|
val option = (View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
|
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE)
|
||||||
|
decorView.systemUiVisibility = option
|
||||||
|
if (useThemestatusBarColor) {
|
||||||
|
activity.window.statusBarColor = activity.resources.getColor(R.color.white)
|
||||||
|
} else {
|
||||||
|
activity.window.statusBarColor = Color.TRANSPARENT
|
||||||
|
}
|
||||||
|
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { //4.4到5.0
|
||||||
|
val localLayoutParams = activity.window.attributes
|
||||||
|
localLayoutParams.flags = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS or localLayoutParams.flags
|
||||||
|
}
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !withoutUseStatusBarColor) {
|
||||||
|
activity.window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
||||||
|
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M && !withoutUseStatusBarColor) {
|
||||||
|
val window = activity.window
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
|
||||||
|
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
|
||||||
|
window.statusBarColor = Color.parseColor("#80999999")
|
||||||
|
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
|
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.utilsfff;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.prankapp.fartsounds.airhorn.model.PrankListModel;
|
||||||
|
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class JsonUtils {
|
||||||
|
|
||||||
|
|
||||||
|
public static ArrayList<PrankListModel> parseJsonListFromAssets(Context context, String fileName) {
|
||||||
|
ArrayList<PrankListModel> outerItems = new ArrayList<>();
|
||||||
|
try (InputStream is = context.getAssets().open(fileName)) {
|
||||||
|
int size = is.available();
|
||||||
|
byte[] buffer = new byte[size];
|
||||||
|
is.read(buffer);
|
||||||
|
String jsonString = new String(buffer, "UTF-8");
|
||||||
|
|
||||||
|
JSONArray jsonArray = new JSONArray(jsonString);
|
||||||
|
for (int i = 0; i < jsonArray.length(); i++) {
|
||||||
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||||
|
PrankListModel outerItem = new PrankListModel();
|
||||||
|
outerItem.setCategoryUrl(jsonObject.getString("categoryUrl")) ;
|
||||||
|
outerItem.setCategoryName(jsonObject.getString("categoryName"));
|
||||||
|
outerItem.setCategoryId(jsonObject.getString("categoryId"));
|
||||||
|
|
||||||
|
// 解析innerItems列表
|
||||||
|
JSONArray innerJsonArray = jsonObject.getJSONArray("list");
|
||||||
|
ArrayList<PrankListModel.ListBean> innerItemList = new ArrayList<>();
|
||||||
|
for (int j = 0; j < innerJsonArray.length(); j++) {
|
||||||
|
JSONObject innerJsonObject = innerJsonArray.getJSONObject(j);
|
||||||
|
PrankListModel.ListBean innerItem = new PrankListModel.ListBean();
|
||||||
|
innerItem.setPreUrl(innerJsonObject.getString("preUrl")) ;
|
||||||
|
innerItem.setMp3Url(innerJsonObject.getString("mp3Url"));
|
||||||
|
innerItem.setTitle(innerJsonObject.getString("title"));
|
||||||
|
innerItemList.add(innerItem);
|
||||||
|
}
|
||||||
|
outerItem.setList(innerItemList);;
|
||||||
|
|
||||||
|
outerItems.add(outerItem);
|
||||||
|
}
|
||||||
|
} catch (IOException | JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return outerItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.utilsfff
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Canvas
|
||||||
|
import android.graphics.Path
|
||||||
|
import android.os.Build
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
|
||||||
|
class PrinkRImageView @JvmOverloads constructor(
|
||||||
|
context: Context?,
|
||||||
|
attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : AppCompatImageView(
|
||||||
|
context!!, attrs, defStyleAttr
|
||||||
|
) {
|
||||||
|
var width = 0f
|
||||||
|
var height = 0f
|
||||||
|
|
||||||
|
init {
|
||||||
|
if (Build.VERSION.SDK_INT < 18) {
|
||||||
|
setLayerType(LAYER_TYPE_SOFTWARE, null)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
|
||||||
|
super.onLayout(changed, left, top, right, bottom)
|
||||||
|
width = getWidth().toFloat()
|
||||||
|
height = getHeight().toFloat()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDraw(canvas: Canvas) {
|
||||||
|
if (width > 12 && height > 12) {
|
||||||
|
val path = Path()
|
||||||
|
path.moveTo(12f, 0f)
|
||||||
|
path.lineTo(width - 12, 0f)
|
||||||
|
path.quadTo(width, 0f, width, 12f)
|
||||||
|
path.lineTo(width, height - 12)
|
||||||
|
path.quadTo(width, height, width - 12, height)
|
||||||
|
path.lineTo(12f, height)
|
||||||
|
path.quadTo(0f, height, 0f, height - 12)
|
||||||
|
path.lineTo(0f, 12f)
|
||||||
|
path.quadTo(0f, 0f, 12f, 0f)
|
||||||
|
canvas.clipPath(path)
|
||||||
|
}
|
||||||
|
super.onDraw(canvas)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,257 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.utilsfff
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.SharedPreferences
|
||||||
|
|
||||||
|
class SPUtils private constructor(spName: String) {
|
||||||
|
private val sp: SharedPreferences
|
||||||
|
|
||||||
|
init {
|
||||||
|
sp = Utils.context!!.getSharedPreferences(spName, Context.MODE_PRIVATE)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中写入String
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
*/
|
||||||
|
fun put(key: String, value: String) {
|
||||||
|
sp.edit().putString(key, value).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取String
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`""`
|
||||||
|
*/
|
||||||
|
fun getString(key: String): String? {
|
||||||
|
return getString(key, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取String
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param defaultValue 默认值
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`defaultValue`
|
||||||
|
*/
|
||||||
|
fun getString(key: String, defaultValue: String): String? {
|
||||||
|
return sp.getString(key, defaultValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中写入int
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
*/
|
||||||
|
fun put(key: String, value: Int) {
|
||||||
|
sp.edit().putInt(key, value).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取int
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return 存在返回对应值,不存在返回默认值-1
|
||||||
|
*/
|
||||||
|
fun getInt(key: String): Int {
|
||||||
|
return getInt(key, -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取int
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param defaultValue 默认值
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`defaultValue`
|
||||||
|
*/
|
||||||
|
fun getInt(key: String, defaultValue: Int): Int {
|
||||||
|
return sp.getInt(key, defaultValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中写入long
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
*/
|
||||||
|
fun put(key: String, value: Long) {
|
||||||
|
sp.edit().putLong(key, value).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取long
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return 存在返回对应值,不存在返回默认值-1
|
||||||
|
*/
|
||||||
|
fun getLong(key: String): Long {
|
||||||
|
return getLong(key, -1L)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取long
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param defaultValue 默认值
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`defaultValue`
|
||||||
|
*/
|
||||||
|
fun getLong(key: String, defaultValue: Long): Long {
|
||||||
|
return sp.getLong(key, defaultValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中写入float
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
*/
|
||||||
|
fun put(key: String, value: Float) {
|
||||||
|
sp.edit().putFloat(key, value).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取float
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return 存在返回对应值,不存在返回默认值-1
|
||||||
|
*/
|
||||||
|
fun getFloat(key: String): Float {
|
||||||
|
return getFloat(key, -1f)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取float
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param defaultValue 默认值
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`defaultValue`
|
||||||
|
*/
|
||||||
|
fun getFloat(key: String, defaultValue: Float): Float {
|
||||||
|
return sp.getFloat(key, defaultValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中写入boolean
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
*/
|
||||||
|
fun put(key: String, value: Boolean) {
|
||||||
|
sp.edit().putBoolean(key, value).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取boolean
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`false`
|
||||||
|
*/
|
||||||
|
fun getBoolean(key: String): Boolean {
|
||||||
|
return getBoolean(key, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取boolean
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param defaultValue 默认值
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`defaultValue`
|
||||||
|
*/
|
||||||
|
fun getBoolean(key: String, defaultValue: Boolean): Boolean {
|
||||||
|
return sp.getBoolean(key, defaultValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中写入String集合
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param values 值
|
||||||
|
*/
|
||||||
|
fun put(key: String, values: Set<String?>) {
|
||||||
|
sp.edit().putStringSet(key, values).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取StringSet
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`Collections.<String>emptySet()`
|
||||||
|
*/
|
||||||
|
fun getStringSet(key: String): Set<String>? {
|
||||||
|
return getStringSet(key, emptySet<String>())
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中读取StringSet
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param defaultValue 默认值
|
||||||
|
* @return 存在返回对应值,不存在返回默认值`defaultValue`
|
||||||
|
*/
|
||||||
|
fun getStringSet(key: String, defaultValue: Set<String?>): Set<String>? {
|
||||||
|
return sp.getStringSet(key, defaultValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
val all: Map<String, *>
|
||||||
|
/**
|
||||||
|
* SP中获取所有键值对
|
||||||
|
*
|
||||||
|
* @return Map对象
|
||||||
|
*/
|
||||||
|
get() = sp.all
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SP中是否存在该key
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @return `true`: 存在<br></br>`false`: 不存在
|
||||||
|
*/
|
||||||
|
operator fun contains(key: String): Boolean {
|
||||||
|
return sp.contains(key)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clear() {
|
||||||
|
sp.edit().clear().apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val sSPMap: MutableMap<String, SPUtils> = HashMap()
|
||||||
|
@JvmStatic
|
||||||
|
val instance: SPUtils
|
||||||
|
get() = getInstance("")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取SP实例
|
||||||
|
*
|
||||||
|
* @param spName sp名
|
||||||
|
* @return [SPUtils]
|
||||||
|
*/
|
||||||
|
fun getInstance(spName: String): SPUtils {
|
||||||
|
var spName = spName
|
||||||
|
if (isSpace(spName)) spName = "spUtils"
|
||||||
|
var sp = sSPMap[spName]
|
||||||
|
if (sp == null) {
|
||||||
|
sp = SPUtils(spName)
|
||||||
|
sSPMap[spName] = sp
|
||||||
|
}
|
||||||
|
return sp
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isSpace(s: String?): Boolean {
|
||||||
|
if (s == null) return true
|
||||||
|
var i = 0
|
||||||
|
val len = s.length
|
||||||
|
while (i < len) {
|
||||||
|
if (!Character.isWhitespace(s[i])) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
++i
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.utilsfff;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.hardware.Sensor;
|
||||||
|
import android.hardware.SensorEvent;
|
||||||
|
import android.hardware.SensorEventListener;
|
||||||
|
import android.hardware.SensorManager;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
|
public class ShakeUtils implements SensorEventListener {
|
||||||
|
|
||||||
|
public static final int MIN_CLICK_DELAY_TIME = 1000;
|
||||||
|
|
||||||
|
private long lastClickTime = 0;
|
||||||
|
|
||||||
|
public ShakeUtils(Context context) {
|
||||||
|
mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnShakeListener(OnShakeListener onShakeListener) {
|
||||||
|
mOnShakeListener = onShakeListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onResume() {
|
||||||
|
mSensorManager.registerListener(this,
|
||||||
|
mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
|
||||||
|
SensorManager.SENSOR_DELAY_NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onPause() {
|
||||||
|
mSensorManager.unregisterListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSensorChanged(SensorEvent event) {
|
||||||
|
|
||||||
|
int sensorType = event.sensor.getType();
|
||||||
|
//values[0]:X轴,values[1]:Y轴,values[2]:Z轴
|
||||||
|
float[] values = event.values;
|
||||||
|
if (sensorType == Sensor.TYPE_ACCELEROMETER) {
|
||||||
|
//这里可以调节摇一摇的灵敏度
|
||||||
|
|
||||||
|
if ((Math.abs(values[0]) > SENSOR_VALUE || Math.abs(values[1]) > SENSOR_VALUE || Math.abs(values[2]) > SENSOR_VALUE)) {
|
||||||
|
System.out.println("sensor value == " + " " + values[0] + " " + values[1] + " " + values[2]);
|
||||||
|
if (null != mOnShakeListener) {
|
||||||
|
long currentTime = Calendar.getInstance().getTimeInMillis();
|
||||||
|
if (currentTime - lastClickTime > MIN_CLICK_DELAY_TIME) {
|
||||||
|
lastClickTime = currentTime;
|
||||||
|
mOnShakeListener.onShake();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnShakeListener {
|
||||||
|
public void onShake();
|
||||||
|
}
|
||||||
|
|
||||||
|
private SensorManager mSensorManager = null;
|
||||||
|
private OnShakeListener mOnShakeListener = null;
|
||||||
|
private static final int SENSOR_VALUE = 15;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.utilsfff
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
|
||||||
|
object Utils {
|
||||||
|
@SuppressLint("StaticFieldLeak")
|
||||||
|
var context: Context? = null
|
||||||
|
private set
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化工具类
|
||||||
|
*
|
||||||
|
* @param context 上下文
|
||||||
|
*/
|
||||||
|
@JvmStatic
|
||||||
|
fun init(context: Context) {
|
||||||
|
Utils.context = context.applicationContext
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package com.prankapp.fartsounds.airhorn.view;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
public class NoScrollViewPager extends ViewPager {
|
||||||
|
private boolean noScroll = false;
|
||||||
|
|
||||||
|
public NoScrollViewPager(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public NoScrollViewPager(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoScroll(boolean noScroll) {
|
||||||
|
this.noScroll = noScroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void scrollTo(int x, int y) {
|
||||||
|
super.scrollTo(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent arg0) {
|
||||||
|
if (noScroll)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return super.onTouchEvent(arg0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onInterceptTouchEvent(MotionEvent arg0) {
|
||||||
|
if (noScroll)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return super.onInterceptTouchEvent(arg0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCurrentItem(int item, boolean smoothScroll) {
|
||||||
|
super.setCurrentItem(item, smoothScroll);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCurrentItem(int item) {
|
||||||
|
super.setCurrentItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
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>
|
||||||
5
app/src/main/res/drawable/home_top_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"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#fff"/>
|
||||||
|
</shape>
|
||||||
BIN
app/src/main/res/drawable/ic_lancher_prank01.jpg
Normal file
|
After Width: | Height: | Size: 450 KiB |
BIN
app/src/main/res/drawable/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/main_tab_selected.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
|
||||||
|
<item android:color="#2c2c2c" android:state_checked="true"/>
|
||||||
|
|
||||||
|
<item android:color="#8a8a8a"/>
|
||||||
|
|
||||||
|
</selector>
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
|
||||||
|
<item android:color="@color/mainColor" android:state_checked="true"/>
|
||||||
|
|
||||||
|
<item android:color="#4d4d4d"/>
|
||||||
|
|
||||||
|
</selector>
|
||||||
5
app/src/main/res/drawable/selector_home.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/home_fill_no" android:state_checked="true"/>
|
||||||
|
<item android:drawable="@mipmap/home_fill_select"/>
|
||||||
|
</selector>
|
||||||
5
app/src/main/res/drawable/selector_my.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/mine2_select" android:state_checked="true" />
|
||||||
|
<item android:drawable="@mipmap/mine2_no"/>
|
||||||
|
</selector>
|
||||||
6
app/src/main/res/drawable/shape_10.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/white"/>
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/shape_10_grey.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#f5f5f5"/>
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/shape_10_item.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#f9f9f9"/>
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/shape_bottom_sheet_dialog.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/white"/>
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
</shape>
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@color/white"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:width="80dp"
|
||||||
|
android:height="80dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:drawable="@drawable/ic_lancher_prank01">
|
||||||
|
</item>
|
||||||
|
|
||||||
|
|
||||||
|
</layer-list>
|
||||||
37
app/src/main/res/layout/activity_about.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#f0f0f0"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginStart="30dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:src="@mipmap/back_fill"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:src="@mipmap/ic_lancher_prank01"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:layout_gravity="center_horizontal"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/app_name"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="10dp"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_version"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text=""/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
66
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.prankapp.fartsounds.airhorn.view.NoScrollViewPager
|
||||||
|
android:id="@+id/viewpager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_above="@+id/linearLayout_ll"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true">
|
||||||
|
|
||||||
|
</com.prankapp.fartsounds.airhorn.view.NoScrollViewPager>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout_ll"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroup"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="#FAFAFA"
|
||||||
|
android:checkedButton="@+id/radio_home"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radio_home"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableTop="@drawable/selector_home"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="Prank"
|
||||||
|
android:textColor="@drawable/main_tab_selected"
|
||||||
|
android:textSize="@dimen/dp_10" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radio_mine"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableTop="@drawable/selector_my"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="Favorite"
|
||||||
|
android:textColor="@drawable/main_tab_selected"
|
||||||
|
android:textSize="@dimen/dp_10" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
57
app/src/main/res/layout/activity_prank_details.xml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#61d4f9"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_marginStart="30dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:src="@mipmap/back_fill"/>
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_shoucang"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_marginEnd="30dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:src="@mipmap/xihuan2"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_conent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginStart="50dp"
|
||||||
|
android:layout_marginEnd="50dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_bofang"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginBottom="50dp"
|
||||||
|
android:src="@mipmap/ic_bofang1"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_shake_tips"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginBottom="50dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:text="Please shake the phone to control start and pause"/>
|
||||||
|
</RelativeLayout>
|
||||||
136
app/src/main/res/layout/activity_setting.xml
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#f0f0f0"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginStart="30dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:src="@mipmap/back_fill"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="35dp"
|
||||||
|
android:textColor="#000"
|
||||||
|
android:text="Setting"
|
||||||
|
android:textSize="18dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</RelativeLayout>
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="20dp"/>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_about"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/shape_10">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:textColor="#202020"
|
||||||
|
android:text="About"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:src="@mipmap/arrow_rightdfdfd"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_feedback"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:background="@drawable/shape_10">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:textColor="#202020"
|
||||||
|
android:text="Feedback"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:src="@mipmap/arrow_rightdfdfd"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_yinsii"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/shape_10">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:textColor="#202020"
|
||||||
|
android:text="Privacy Policy"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:src="@mipmap/arrow_rightdfdfd"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_yonghu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:background="@drawable/shape_10">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:textColor="#202020"
|
||||||
|
android:text="Terms of Service"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:src="@mipmap/arrow_rightdfdfd"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
28
app/src/main/res/layout/bottom_sheet_layout.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/shape_bottom_sheet_dialog">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_email"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="#191919"
|
||||||
|
android:gravity="center"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="10dp"
|
||||||
|
android:background="#F5F5F5"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cancel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="Cancel"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="#191919"
|
||||||
|
android:gravity="center"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
54
app/src/main/res/layout/fragment_mine.xml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/coordinator"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#f0f0f0"
|
||||||
|
android:fitsSystemWindows="false">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="5dp"
|
||||||
|
android:background="@drawable/home_top_bg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="20dp" />
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:textColor="#000"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:textSize="18dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="My Prank"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_more"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:src="@mipmap/ic_gd"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_like"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
45
app/src/main/res/layout/fragment_view.xml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/coordinator"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#f5f5f5"
|
||||||
|
android:fitsSystemWindows="false">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="5dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="20dp" />
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:textColor="#000"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:textSize="18dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/app_name"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_prank"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
37
app/src/main/res/layout/item_mine_like.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/shape_10"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_like"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:background="@drawable/shape_10_grey"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_like_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#101010"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="11111"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_delete"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:src="@mipmap/gengduo"/>
|
||||||
|
</LinearLayout>
|
||||||
22
app/src/main/res/layout/item_prank.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.prankapp.fartsounds.airhorn.utilsfff.PrinkRImageView
|
||||||
|
android:id="@+id/prank_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="130dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/shape_10"
|
||||||
|
android:layout_gravity="center"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_titleff"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""/>
|
||||||
|
</LinearLayout>
|
||||||
9
app/src/main/res/layout/item_prank_item.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_item"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"/>
|
||||||
|
</RelativeLayout>
|
||||||
10
app/src/main/res/layout/layout_empty_view.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="No data"/>
|
||||||
|
</RelativeLayout>
|
||||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
BIN
app/src/main/res/mipmap-xxhdpi/arrow_rightdfdfd.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/back_fill.png
Normal file
|
After Width: | Height: | Size: 812 B |
BIN
app/src/main/res/mipmap-xxhdpi/gengduo.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/home_fill_no.png
Normal file
|
After Width: | Height: | Size: 1021 B |
BIN
app/src/main/res/mipmap-xxhdpi/home_fill_select.png
Normal file
|
After Width: | Height: | Size: 1019 B |
BIN
app/src/main/res/mipmap-xxhdpi/ic_back_prank01.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_bofang.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_bofang1.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_delete_mine.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_empty.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_gd.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
app/src/main/res/mipmap-xxhdpi/ic_home_no_selected__.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
app/src/main/res/mipmap-xxhdpi/ic_home_noselect.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_home_selected_.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_home_selected__.png
Normal file
|
After Width: | Height: | Size: 806 B |
BIN
app/src/main/res/mipmap-xxhdpi/ic_home_selected____.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_lancher_prank01.jpg
Normal file
|
After Width: | Height: | Size: 450 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_mine_more.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_mine_more_white.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_mine_noselect.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_mine_noselect___.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_mine_selected_.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_mine_selected__.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_setting_prank.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_shoucanged.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_shoucangno.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_zanting.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_zanting1.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/mine2_no.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/mine2_select.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/xihuan1.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/xihuan2.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
7
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Base.Theme.Prink01" parent="Theme.Material3.DayNight.NoActionBar">
|
||||||
|
<!-- Customize your dark theme here. -->
|
||||||
|
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
6
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="black">#FF000000</color>
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
<color name="mainColor">#00BCD4</color>
|
||||||
|
</resources>
|
||||||
3
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">Prank App</string>
|
||||||
|
</resources>
|
||||||
12
app/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<!--实现BottomSheetDialog圆角效果-->
|
||||||
|
<style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
|
||||||
|
<item name="bottomSheetStyle">@style/bottomSheetStyleWrapper</item>
|
||||||
|
</style>
|
||||||
|
<style name="bottomSheetStyleWrapper" parent="Widget.Design.BottomSheet.Modal">
|
||||||
|
<item name="android:background">@android:color/transparent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
22
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="prank01" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
|
<!-- Customize your light theme here. -->
|
||||||
|
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||||
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:windowTranslucentNavigation">true</item>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.WallpaperNew" parent="prank01" />
|
||||||
|
|
||||||
|
|
||||||
|
<style name="splashprank" parent="prank01">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
Flutter draws its first frame -->
|
||||||
|
<!-- <item name="android:windowFullscreen">true</item>-->
|
||||||
|
<item name="android:windowBackground">@drawable/spalsh_laudfdsfdfnch_background</item>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
13
app/src/main/res/xml/backup_rules.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Sample backup rules file; uncomment and customize as necessary.
|
||||||
|
See https://developer.android.com/guide/topics/data/autobackup
|
||||||
|
for details.
|
||||||
|
Note: This file is ignored for devices older that API 31
|
||||||
|
See https://developer.android.com/about/versions/12/backup-restore
|
||||||
|
-->
|
||||||
|
<full-backup-content>
|
||||||
|
<!--
|
||||||
|
<include domain="sharedpref" path="."/>
|
||||||
|
<exclude domain="sharedpref" path="device.xml"/>
|
||||||
|
-->
|
||||||
|
</full-backup-content>
|
||||||