This commit is contained in:
litingting 2026-01-26 15:01:50 +08:00
parent 0c21f263a7
commit 6a1f978e3a
64 changed files with 346 additions and 351 deletions

BIN
app/FunPrankSounds Normal file

Binary file not shown.

View File

@ -8,7 +8,6 @@ plugins {
id("com.android.application") id("com.android.application")
id("org.jetbrains.kotlin.android") id("org.jetbrains.kotlin.android")
id("io.objectbox") id("io.objectbox")
id("plugin.resTools")
} }
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date()) val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
val keystorePropertiesFile = file("keystore.properties") val keystorePropertiesFile = file("keystore.properties")
@ -70,14 +69,7 @@ android {
} }
} }
} }
resConfig {
new_prefix = "better_" // 资源前缀
old_prefix = "" // 老前缀,可为''空字符串
// === below use default
// resFolderPath 资源目录
// srcFolderPath 源代码目录
// manifestFilePath 清单文件目录
}
dependencies { dependencies {
implementation("androidx.appcompat:appcompat:1.7.1") implementation("androidx.appcompat:appcompat:1.7.1")
implementation("com.google.android.material:material:1.13.0") implementation("com.google.android.material:material:1.13.0")

View File

@ -1,6 +1,6 @@
app_name=Prank Sound App app_name=Fun Prank Sounds
package_name=com.light.prank.sound.app package_name=com.fun.wave.pranksounds
keystoreFile=PrankSoundApp keystoreFile=FunPrankSounds
key_alias=PrankSoundAppkey0 key_alias=FunPrankSounds_key0
key_store_password=PrankSoundApp key_store_password=FunPrankSounds
key_password=PrankSoundApp key_password=FunPrankSounds

View File

@ -8,12 +8,13 @@
android:maxSdkVersion="32" /> android:maxSdkVersion="32" />
<uses-permission <uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32" /> android:maxSdkVersion="32"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />
<application <application
android:name="com.fun.pranksounds.com.fun.wave.pranksounds.utils.App" android:name=".utils.App"
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
@ -23,27 +24,27 @@
tools:targetApi="31"> tools:targetApi="31">
<activity <activity
android:name="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcPlayPranks" android:name=".activity.PlayActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcCategoryList" android:name=".activity.ListActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcMain" android:name=".activity.OneActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.fun.pranksounds.com.fun.wave.pranksounds.custom.AcSave" android:name=".mine.SaveActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.fun.pranksounds.com.fun.wave.pranksounds.custom.AcRecording" android:name=".mine.RecordingActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcSplashUi" android:name=".activity.WelActivity"
android:exported="true" android:exported="true"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Theme.Welcome"> android:theme="@style/Theme.Welcome">

View File

@ -1,62 +0,0 @@
package com.fun.wave.pranksounds.activity;
import android.content.Intent;
import android.view.View;
import androidx.recyclerview.widget.GridLayoutManager;
import com.fun.wave.pranksounds.base.BaseActivity;
import com.fun.wave.pranksounds.dataListener.SoundsWrapper;
import com.fun.wave.pranksounds.utils.MyItemSpace;
import com.fun.wave.pranksounds.utils.MyUtils;
import com.fun.wave.pranksounds.dataListener.OnClickItemListener;
import com.fun.wave.pranksounds.dataListener.PrankBean;
import com.fun.pranksounds.databinding.AcCategoryListBinding;
public class AcCategoryList extends BaseActivity<AcCategoryListBinding> implements View.OnClickListener, OnClickItemListener {
private SoundsWrapper data;
private int colorIndex;
@Override
protected void init() {
data = (SoundsWrapper) getIntent().getSerializableExtra(MyUtils.KEY_LIST_DATA);
colorIndex = getIntent().getIntExtra(MyUtils.KEY_LIST_COLOR_POS,0);
viewBind.categoryName.setText(data.getName());
onList();
viewBind.back.setOnClickListener(this);
}
@Override
protected AcCategoryListBinding initViewBinding() {
return AcCategoryListBinding.inflate(getLayoutInflater());
}
private void onList() {
MyItemSpace itemHelper = new MyItemSpace(5, 5, 0);
viewBind.listRecycler.addItemDecoration(itemHelper);
viewBind.listRecycler.setLayoutManager(new GridLayoutManager(this, 2));
AdapterCategoryList adapterCategoryList = new AdapterCategoryList(this, data.getPrankBeanList(),0,this);
viewBind.listRecycler.setAdapter(adapterCategoryList);
adapterCategoryList.setColorIndex(colorIndex);
}
@Override
public void onClick(View v) {
if(v.equals(viewBind.back)){
finish();
}
}
@Override
public void onClickSoundsListener(PrankBean data) {
Intent intent = new Intent(this, AcPlayPranks.class);
intent.putExtra(MyUtils.KEY_PLAY_DATA, data);
intent.putExtra(MyUtils.KEY_LIST_COLOR_POS, colorIndex);
startActivity(intent);
}
}

View File

@ -0,0 +1,63 @@
package com.fun.wave.pranksounds.activity;
import android.content.Intent;
import android.view.View;
import androidx.recyclerview.widget.GridLayoutManager;
import com.fun.wave.pranksounds.base.BaseActivity;
import com.fun.wave.pranksounds.databinding.ListActivityBinding;
import com.fun.wave.pranksounds.listener.ClickSoundsListener;
import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.wave.pranksounds.listener.SoundsWrapper;
import com.fun.wave.pranksounds.main.ListAdapter;
import com.fun.wave.pranksounds.utils.Common;
import com.fun.wave.pranksounds.utils.ItemDec;
public class ListActivity extends BaseActivity<ListActivityBinding> implements View.OnClickListener, ClickSoundsListener {
private SoundsWrapper data;
private int colorIndex;
@Override
protected void init() {
data = (SoundsWrapper) getIntent().getSerializableExtra(Common.KEY_LIST_DATA);
colorIndex = getIntent().getIntExtra(Common.KEY_LIST_COLOR_POS,0);
viewBind.categoryName.setText(data.getName());
onList();
viewBind.back.setOnClickListener(this);
}
@Override
protected ListActivityBinding initViewBinding() {
return ListActivityBinding.inflate(getLayoutInflater());
}
private void onList() {
ItemDec itemHelper = new ItemDec(5, 5, 0);
viewBind.listRecycler.addItemDecoration(itemHelper);
viewBind.listRecycler.setLayoutManager(new GridLayoutManager(this, 2));
ListAdapter listAdapter = new ListAdapter(this, data.getPrankBeanList(),0,this);
viewBind.listRecycler.setAdapter(listAdapter);
listAdapter.setColorIndex(colorIndex);
}
@Override
public void onClick(View v) {
if(v.equals(viewBind.back)){
finish();
}
}
@Override
public void onClickSoundsListener(PrankBean data) {
Intent intent = new Intent(this, PlayActivity.class);
intent.putExtra(Common.KEY_PLAY_DATA, data);
intent.putExtra(Common.KEY_LIST_COLOR_POS, colorIndex);
startActivity(intent);
}
}

View File

@ -18,16 +18,16 @@ import androidx.fragment.app.Fragment;
import androidx.viewpager2.adapter.FragmentStateAdapter; import androidx.viewpager2.adapter.FragmentStateAdapter;
import androidx.viewpager2.widget.ViewPager2; import androidx.viewpager2.widget.ViewPager2;
import com.fun.pranksounds.R; import com.fun.wave.pranksounds.R;
import com.fun.wave.pranksounds.base.BaseActivity; import com.fun.wave.pranksounds.base.BaseActivity;
import com.fun.wave.pranksounds.custom.AcRecording; import com.fun.wave.pranksounds.collection.CollectionFragment;
import com.fun.wave.pranksounds.custom.AcSave; import com.fun.wave.pranksounds.databinding.OneActivityBinding;
import com.fun.wave.pranksounds.custom.FragmentCustom; import com.fun.wave.pranksounds.databinding.TabItemLayoutBinding;
import com.fun.pranksounds.databinding.AcMainBinding; import com.fun.wave.pranksounds.main.MainFragment;
import com.fun.pranksounds.databinding.TabItemLayoutBinding; import com.fun.wave.pranksounds.mine.MineFragment;
import com.fun.wave.pranksounds.like.FragmentLike; import com.fun.wave.pranksounds.mine.RecordingActivity;
import com.fun.wave.pranksounds.main.FragmentMain; import com.fun.wave.pranksounds.mine.SaveActivity;
import com.fun.wave.pranksounds.utils.MyUtils; import com.fun.wave.pranksounds.utils.Common;
import com.google.android.material.tabs.TabLayout; import com.google.android.material.tabs.TabLayout;
import com.google.android.material.tabs.TabLayoutMediator; import com.google.android.material.tabs.TabLayoutMediator;
@ -35,7 +35,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class AcMain extends BaseActivity<AcMainBinding> { public class OneActivity extends BaseActivity<OneActivityBinding> {
private ActivityResultLauncher<String> audioPickerLauncher; private ActivityResultLauncher<String> audioPickerLauncher;
@ -70,7 +70,7 @@ public class AcMain extends BaseActivity<AcMainBinding> {
if (isGranted) { if (isGranted) {
intentRecordAudio(); intentRecordAudio();
} else { } else {
Toast.makeText(AcMain.this, "Recording permission denied", Toast.LENGTH_SHORT).show(); Toast.makeText(OneActivity.this, "Recording permission denied", Toast.LENGTH_SHORT).show();
} }
} }
); );
@ -92,7 +92,7 @@ public class AcMain extends BaseActivity<AcMainBinding> {
if (isGranted) { if (isGranted) {
importAudio(); importAudio();
} else { } else {
Toast.makeText(AcMain.this, getString(R.string.permission_denied), Toast.LENGTH_SHORT).show(); Toast.makeText(OneActivity.this, getString(R.string.permission_denied), Toast.LENGTH_SHORT).show();
} }
} }
} }
@ -103,9 +103,9 @@ public class AcMain extends BaseActivity<AcMainBinding> {
public void onActivityResult(Uri uri) { public void onActivityResult(Uri uri) {
// Handle the returned Uri // Handle the returned Uri
if (uri != null) { if (uri != null) {
long duration = MyUtils.getAudioDuration(AcMain.this, uri); long duration = Common.getAudioDuration(OneActivity.this, uri);
Intent intent = new Intent(AcMain.this, AcSave.class); Intent intent = new Intent(OneActivity.this, SaveActivity.class);
intent.putExtra(AcSave.KEY_Path, uri.toString()); intent.putExtra(SaveActivity.KEY_Path, uri.toString());
// intent.putExtra(AcSave.KEY_Time, duration); // intent.putExtra(AcSave.KEY_Time, duration);
startActivity(intent); startActivity(intent);
} }
@ -114,20 +114,20 @@ public class AcMain extends BaseActivity<AcMainBinding> {
} }
@Override @Override
protected AcMainBinding initViewBinding() { protected OneActivityBinding initViewBinding() {
return AcMainBinding.inflate(getLayoutInflater()); return OneActivityBinding.inflate(getLayoutInflater());
} }
private void intentRecordAudio() { private void intentRecordAudio() {
Intent intent = new Intent(AcMain.this, AcRecording.class); Intent intent = new Intent(OneActivity.this, RecordingActivity.class);
startActivity(intent); startActivity(intent);
} }
private void initVp2() { private void initVp2() {
List<Fragment> fragmentList = new ArrayList<>(); List<Fragment> fragmentList = new ArrayList<>();
fragmentList.add(FragmentMain.newInstance()); fragmentList.add(MainFragment.newInstance());
fragmentList.add(FragmentLike.newInstance()); fragmentList.add(CollectionFragment.newInstance());
fragmentList.add(FragmentCustom.newInstance()); fragmentList.add(MineFragment.newInstance());
viewBind.vp2.setAdapter(new FragmentStateAdapter(this) { viewBind.vp2.setAdapter(new FragmentStateAdapter(this) {
@NonNull @NonNull
@Override @Override
@ -202,7 +202,7 @@ public class AcMain extends BaseActivity<AcMainBinding> {
@Override @Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults); super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == MyUtils.REQUEST_READ_STORAGE_PERMISSION) { if (requestCode == Common.REQUEST_READ_STORAGE_PERMISSION) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
importAudio(); importAudio();
} else { } else {
@ -221,18 +221,18 @@ public class AcMain extends BaseActivity<AcMainBinding> {
switch (type) { switch (type) {
case 0: case 0:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (ContextCompat.checkSelfPermission(AcMain.this, MyUtils.permission_read_audio[0]) if (ContextCompat.checkSelfPermission(OneActivity.this, Common.permission_read_audio[0])
!= PackageManager.PERMISSION_GRANTED) { != PackageManager.PERMISSION_GRANTED) {
requestStorePermissionsLauncher.launch(MyUtils.permission_read_audio); requestStorePermissionsLauncher.launch(Common.permission_read_audio);
} else { } else {
importAudio(); importAudio();
} }
} else { } else {
if (ContextCompat.checkSelfPermission(AcMain.this, Manifest.permission.WRITE_EXTERNAL_STORAGE) if (ContextCompat.checkSelfPermission(OneActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_GRANTED || != PackageManager.PERMISSION_GRANTED ||
ContextCompat.checkSelfPermission(AcMain.this, Manifest.permission.READ_EXTERNAL_STORAGE) ContextCompat.checkSelfPermission(OneActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_GRANTED) { != PackageManager.PERMISSION_GRANTED) {
requestStorePermissionsLauncher.launch(MyUtils.permission_store); requestStorePermissionsLauncher.launch(Common.permission_store);
} else { } else {
importAudio(); importAudio();
} }
@ -245,9 +245,9 @@ public class AcMain extends BaseActivity<AcMainBinding> {
} }
private void checkAndRequestAudioPermission() { private void checkAndRequestAudioPermission() {
if (ContextCompat.checkSelfPermission(AcMain.this, MyUtils.permission_record_audio) if (ContextCompat.checkSelfPermission(OneActivity.this, Common.permission_record_audio)
!= PackageManager.PERMISSION_GRANTED) { != PackageManager.PERMISSION_GRANTED) {
requestRecordAudioLauncher.launch(MyUtils.permission_record_audio); requestRecordAudioLauncher.launch(Common.permission_record_audio);
} else { } else {
intentRecordAudio(); intentRecordAudio();
} }

View File

@ -12,21 +12,22 @@ import android.view.View;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.fun.wave.pranksounds.utils.PopupClock; import com.fun.wave.pranksounds.R;
import com.fun.wave.pranksounds.base.BaseActivity; import com.fun.wave.pranksounds.base.BaseActivity;
import com.fun.wave.pranksounds.utils.MyItemSpace; import com.fun.wave.pranksounds.databinding.PlayActivityBinding;
import com.fun.wave.pranksounds.utils.MyUtils; import com.fun.wave.pranksounds.listener.ClickSoundsListener;
import com.fun.wave.pranksounds.dataListener.ObjectBoxMan; import com.fun.wave.pranksounds.listener.ClickTimerListener;
import com.fun.wave.pranksounds.dataListener.OnClickItemListener; import com.fun.wave.pranksounds.listener.ObjectBoxMan;
import com.fun.wave.pranksounds.dataListener.OnClickTimerListener; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.main.ListAdapter;
import com.fun.pranksounds.R; import com.fun.wave.pranksounds.utils.Common;
import com.fun.pranksounds.databinding.AcPlayPranksBinding; import com.fun.wave.pranksounds.utils.ItemDec;
import com.fun.wave.pranksounds.utils.PopupClock;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
public class AcPlayPranks extends BaseActivity<AcPlayPranksBinding> implements View.OnClickListener, OnClickTimerListener, OnClickItemListener { public class PlayActivity extends BaseActivity<PlayActivityBinding> implements View.OnClickListener, ClickTimerListener, ClickSoundsListener {
@ -43,8 +44,8 @@ public class AcPlayPranks extends BaseActivity<AcPlayPranksBinding> implements V
@Override @Override
protected void init() { protected void init() {
PrankBean = (PrankBean) getIntent().getSerializableExtra(MyUtils.KEY_PLAY_DATA); PrankBean = (PrankBean) getIntent().getSerializableExtra(Common.KEY_PLAY_DATA);
color = getIntent().getIntExtra(MyUtils.KEY_LIST_COLOR_POS,0); color = getIntent().getIntExtra(Common.KEY_LIST_COLOR_POS,0);
initAudio(); initAudio();
String covert = PrankBean.getCovert(); String covert = PrankBean.getCovert();
if (covert != null && !covert.isEmpty()) { if (covert != null && !covert.isEmpty()) {
@ -61,7 +62,7 @@ public class AcPlayPranks extends BaseActivity<AcPlayPranksBinding> implements V
viewBind.imLike.setOnClickListener(this); viewBind.imLike.setOnClickListener(this);
viewBind.imLoop.setOnClickListener(this); viewBind.imLoop.setOnClickListener(this);
viewBind.imTimer.setOnClickListener(this); viewBind.imTimer.setOnClickListener(this);
MyUtils.setVolume(this, viewBind.seekbar); Common.setVolume(this, viewBind.seekbar);
initLike(); initLike();
loadMore(); loadMore();
@ -69,8 +70,8 @@ public class AcPlayPranks extends BaseActivity<AcPlayPranksBinding> implements V
} }
@Override @Override
protected AcPlayPranksBinding initViewBinding() { protected PlayActivityBinding initViewBinding() {
return AcPlayPranksBinding.inflate(getLayoutInflater()); return PlayActivityBinding.inflate(getLayoutInflater());
} }
private void stopCountDown() { private void stopCountDown() {
@ -120,12 +121,12 @@ public class AcPlayPranks extends BaseActivity<AcPlayPranksBinding> implements V
} }
private void loadMore() { private void loadMore() {
List<PrankBean> more = ObjectBoxMan.getMore(); List<PrankBean> more = ObjectBoxMan.getMore();
MyItemSpace itemHelper = new MyItemSpace(0, 0, (int) MyUtils.dpToPx(3)); ItemDec itemHelper = new ItemDec(0, 0, (int) Common.dpToPx(3));
AdapterCategoryList adapterCategoryList = new AdapterCategoryList(this, more, 1, this); ListAdapter listAdapter = new ListAdapter(this, more, 1, this);
viewBind.moreRecycler.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)); viewBind.moreRecycler.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
viewBind.moreRecycler.setAdapter(adapterCategoryList); viewBind.moreRecycler.setAdapter(listAdapter);
viewBind.moreRecycler.addItemDecoration(itemHelper); viewBind.moreRecycler.addItemDecoration(itemHelper);
adapterCategoryList.setColorIndex(color); listAdapter.setColorIndex(color);
} }
private void initAudio() { private void initAudio() {
@ -205,7 +206,7 @@ public class AcPlayPranks extends BaseActivity<AcPlayPranksBinding> implements V
mediaPlayer.setLooping(viewBind.imLoop.isSelected()); mediaPlayer.setLooping(viewBind.imLoop.isSelected());
} else if (v.equals(viewBind.imTimer)) { } else if (v.equals(viewBind.imTimer)) {
if (popupClock == null) { if (popupClock == null) {
popupClock = new PopupClock(AcPlayPranks.this, this); popupClock = new PopupClock(PlayActivity.this, this);
} }
popupClock.showTop(viewBind.imTimer); popupClock.showTop(viewBind.imTimer);
} }
@ -237,8 +238,8 @@ public class AcPlayPranks extends BaseActivity<AcPlayPranksBinding> implements V
@Override @Override
public void onClickSoundsListener(PrankBean data) { public void onClickSoundsListener(PrankBean data) {
Intent intent = new Intent(this, AcPlayPranks.class); Intent intent = new Intent(this, PlayActivity.class);
intent.putExtra(MyUtils.KEY_PLAY_DATA, data); intent.putExtra(Common.KEY_PLAY_DATA, data);
startActivity(intent); startActivity(intent);
finish(); finish();
} }

View File

@ -3,11 +3,10 @@ package com.fun.wave.pranksounds.activity;
import android.content.Intent; import android.content.Intent;
import android.os.CountDownTimer; import android.os.CountDownTimer;
import com.fun.wave.pranksounds.base.BaseActivity; import com.fun.wave.pranksounds.base.BaseActivity;
import com.fun.pranksounds.databinding.AcSplashUiBinding; import com.fun.wave.pranksounds.databinding.WelActivityBinding;
public class AcSplashUi extends BaseActivity<AcSplashUiBinding> { public class WelActivity extends BaseActivity<WelActivityBinding> {
private CountDownTimer countDownTimer; private CountDownTimer countDownTimer;
@Override @Override
@ -29,13 +28,13 @@ public class AcSplashUi extends BaseActivity<AcSplashUiBinding> {
} }
@Override @Override
protected AcSplashUiBinding initViewBinding() { protected WelActivityBinding initViewBinding() {
return AcSplashUiBinding.inflate(getLayoutInflater()); return WelActivityBinding.inflate(getLayoutInflater());
} }
private void welcomeMain() { private void welcomeMain() {
viewBind.loadingPb.setProgress(100); viewBind.loadingPb.setProgress(100);
Intent intent = new Intent(this, AcMain.class); Intent intent = new Intent(this, OneActivity.class);
startActivity(intent); startActivity(intent);
finish(); finish();
} }

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.like; package com.fun.wave.pranksounds.collection;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@ -10,18 +10,18 @@ import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.fun.wave.pranksounds.activity.AcPlayPranks; import com.fun.wave.pranksounds.R;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.activity.PlayActivity;
import com.fun.wave.pranksounds.dataListener.ObjectBoxMan; import com.fun.wave.pranksounds.databinding.CollectionAdapterBinding;
import com.fun.wave.pranksounds.utils.MyUtils; import com.fun.wave.pranksounds.listener.ObjectBoxMan;
import com.fun.pranksounds.R; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.pranksounds.databinding.LikeAdapterBinding; import com.fun.wave.pranksounds.utils.Common;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
public class AdapterLike extends RecyclerView.Adapter<AdapterLike.ViewHolder> { public class CollectionAdapter extends RecyclerView.Adapter<CollectionAdapter.ViewHolder> {
private List<PrankBean> mValues; private List<PrankBean> mValues;
private Context mCOn; private Context mCOn;
@ -29,7 +29,7 @@ public class AdapterLike extends RecyclerView.Adapter<AdapterLike.ViewHolder> {
public AdapterLike(Context context, List<PrankBean> items, boolean showDelete) { public CollectionAdapter(Context context, List<PrankBean> items, boolean showDelete) {
mValues = items; mValues = items;
mCOn = context; mCOn = context;
this.showDelete = showDelete; this.showDelete = showDelete;
@ -45,7 +45,7 @@ public class AdapterLike extends RecyclerView.Adapter<AdapterLike.ViewHolder> {
@Override @Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new ViewHolder(LikeAdapterBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)); return new ViewHolder(CollectionAdapterBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
@ -56,7 +56,7 @@ public class AdapterLike extends RecyclerView.Adapter<AdapterLike.ViewHolder> {
PrankBean PrankBean = mValues.get(position); PrankBean PrankBean = mValues.get(position);
holder.vb.ttvName.setText(PrankBean.getName()); holder.vb.ttvName.setText(PrankBean.getName());
int colorIndex = PrankBean.getColorIndex(); int colorIndex = PrankBean.getColorIndex();
holder.vb.layout.setBackground(ContextCompat.getDrawable(mCOn, MyUtils.childBgs[colorIndex])); holder.vb.layout.setBackground(ContextCompat.getDrawable(mCOn, Common.childBgs[colorIndex]));
if (PrankBean.isCustomization()) { if (PrankBean.isCustomization()) {
Glide.with(mCOn).load(R.drawable.image_sounds).into(holder.vb.image); Glide.with(mCOn).load(R.drawable.image_sounds).into(holder.vb.image);
} else { } else {
@ -98,9 +98,9 @@ public class AdapterLike extends RecyclerView.Adapter<AdapterLike.ViewHolder> {
holder.vb.layout.setOnClickListener(new View.OnClickListener() { holder.vb.layout.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Intent intent = new Intent(mCOn, AcPlayPranks.class); Intent intent = new Intent(mCOn, PlayActivity.class);
intent.putExtra(MyUtils.KEY_PLAY_DATA, PrankBean); intent.putExtra(Common.KEY_PLAY_DATA, PrankBean);
intent.putExtra(MyUtils.KEY_LIST_COLOR_POS, colorIndex); intent.putExtra(Common.KEY_LIST_COLOR_POS, colorIndex);
mCOn.startActivity(intent); mCOn.startActivity(intent);
} }
}); });
@ -113,9 +113,9 @@ public class AdapterLike extends RecyclerView.Adapter<AdapterLike.ViewHolder> {
public class ViewHolder extends RecyclerView.ViewHolder { public class ViewHolder extends RecyclerView.ViewHolder {
public LikeAdapterBinding vb; public CollectionAdapterBinding vb;
public ViewHolder(LikeAdapterBinding binding) { public ViewHolder(CollectionAdapterBinding binding) {
super(binding.getRoot()); super(binding.getRoot());
vb = binding; vb = binding;
} }

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.like; package com.fun.wave.pranksounds.collection;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
@ -10,24 +10,24 @@ import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.fun.wave.pranksounds.utils.MyItemSpace; import com.fun.wave.pranksounds.databinding.CollectionFragmentBinding;
import com.fun.wave.pranksounds.dataListener.ObjectBoxMan; import com.fun.wave.pranksounds.listener.ObjectBoxMan;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.pranksounds.databinding.FragmentLikeBinding; import com.fun.wave.pranksounds.utils.ItemDec;
import java.util.List; import java.util.List;
public class FragmentLike extends Fragment { public class CollectionFragment extends Fragment {
private AdapterLike adapter; private CollectionAdapter adapter;
public FragmentLike() { public CollectionFragment() {
} }
@SuppressWarnings("unused") @SuppressWarnings("unused")
public static FragmentLike newInstance() { public static CollectionFragment newInstance() {
FragmentLike fragment = new FragmentLike(); CollectionFragment fragment = new CollectionFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
fragment.setArguments(args); fragment.setArguments(args);
return fragment; return fragment;
@ -38,12 +38,12 @@ public class FragmentLike extends Fragment {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
} }
private FragmentLikeBinding collectBinding; private CollectionFragmentBinding collectBinding;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
collectBinding = FragmentLikeBinding.inflate(getLayoutInflater()); collectBinding = CollectionFragmentBinding.inflate(getLayoutInflater());
RecyclerView recyclerView = collectBinding.list; RecyclerView recyclerView = collectBinding.list;
recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2)); recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
List<PrankBean> all = ObjectBoxMan.getAllLike(); List<PrankBean> all = ObjectBoxMan.getAllLike();
@ -54,8 +54,8 @@ public class FragmentLike extends Fragment {
collectBinding.layoutEmpty.setVisibility(View.GONE); collectBinding.layoutEmpty.setVisibility(View.GONE);
collectBinding.list.setVisibility(View.VISIBLE); collectBinding.list.setVisibility(View.VISIBLE);
} }
adapter = new AdapterLike(requireContext(), all,false); adapter = new CollectionAdapter(requireContext(), all,false);
MyItemSpace itemHelper = new MyItemSpace(7, 7, 7); ItemDec itemHelper = new ItemDec(7, 7, 7);
recyclerView.addItemDecoration(itemHelper); recyclerView.addItemDecoration(itemHelper);
recyclerView.setAdapter(adapter); recyclerView.setAdapter(adapter);

View File

@ -1,6 +0,0 @@
package com.fun.wave.pranksounds.dataListener;
public interface OnClickItemListener {
void onClickSoundsListener(PrankBean data);
}

View File

@ -1,6 +0,0 @@
package com.fun.wave.pranksounds.dataListener;
public interface OnClickTimerListener {
void onClickTimerListener(long time);
}

View File

@ -0,0 +1,6 @@
package com.fun.wave.pranksounds.listener;
public interface ClickSoundsListener {
void onClickSoundsListener(PrankBean data);
}

View File

@ -0,0 +1,6 @@
package com.fun.wave.pranksounds.listener;
public interface ClickTimerListener {
void onClickTimerListener(long time);
}

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.dataListener; package com.fun.wave.pranksounds.listener;
import android.content.Context; import android.content.Context;

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.utils; package com.fun.wave.pranksounds.listener;
public interface OnUpdateRecordingTime { public interface OnUpdateRecordingTime {

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.dataListener; package com.fun.wave.pranksounds.listener;
import java.io.Serializable; import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.dataListener; package com.fun.wave.pranksounds.listener;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.activity; package com.fun.wave.pranksounds.main;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -10,25 +10,25 @@ import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.fun.wave.pranksounds.dataListener.OnClickItemListener; import com.fun.wave.pranksounds.databinding.ListAdapterBinding;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.listener.ClickSoundsListener;
import com.fun.wave.pranksounds.utils.MyUtils; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.pranksounds.databinding.CategoryListAdapterBinding; import com.fun.wave.pranksounds.utils.Common;
import java.util.List; import java.util.List;
public class AdapterCategoryList extends RecyclerView.Adapter<AdapterCategoryList.ViewHolder> { public class ListAdapter extends RecyclerView.Adapter<ListAdapter.ViewHolder> {
private final List<PrankBean> mValues; private final List<PrankBean> mValues;
private Context mCon; private Context mCon;
private int type; private int type;
private OnClickItemListener mListener; private ClickSoundsListener mListener;
private int colorIndex; private int colorIndex;
public void setColorIndex(int colorIndex) { public void setColorIndex(int colorIndex) {
this.colorIndex = colorIndex; this.colorIndex = colorIndex;
} }
public AdapterCategoryList(Context context, List<PrankBean> items, int mType, OnClickItemListener listener) { public ListAdapter(Context context, List<PrankBean> items, int mType, ClickSoundsListener listener) {
mValues = items; mValues = items;
this.mCon = context; this.mCon = context;
type = mType; type = mType;
@ -37,14 +37,14 @@ public class AdapterCategoryList extends RecyclerView.Adapter<AdapterCategoryLis
@Override @Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new ViewHolder(CategoryListAdapterBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)); return new ViewHolder(ListAdapterBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
} }
@Override @Override
public void onBindViewHolder(final ViewHolder holder, int position) { public void onBindViewHolder(final ViewHolder holder, int position) {
holder.vb.relative.setBackground(ContextCompat.getDrawable(mCon, MyUtils.childBgs[colorIndex])); holder.vb.relative.setBackground(ContextCompat.getDrawable(mCon, Common.childBgs[colorIndex]));
PrankBean PrankBean = mValues.get(position); PrankBean PrankBean = mValues.get(position);
String covert = PrankBean.getCovert(); String covert = PrankBean.getCovert();
Glide.with(mCon).load(covert).into(holder.vb.image); Glide.with(mCon).load(covert).into(holder.vb.image);
@ -63,9 +63,9 @@ public class AdapterCategoryList extends RecyclerView.Adapter<AdapterCategoryLis
} }
public class ViewHolder extends RecyclerView.ViewHolder { public class ViewHolder extends RecyclerView.ViewHolder {
private CategoryListAdapterBinding vb; private ListAdapterBinding vb;
public ViewHolder(CategoryListAdapterBinding binding) { public ViewHolder(ListAdapterBinding binding) {
super(binding.getRoot()); super(binding.getRoot());
vb = binding; vb = binding;
ViewGroup.LayoutParams layoutParams = vb.relative.getLayoutParams(); ViewGroup.LayoutParams layoutParams = vb.relative.getLayoutParams();
@ -73,7 +73,7 @@ public class AdapterCategoryList extends RecyclerView.Adapter<AdapterCategoryLis
layoutParams.width = RelativeLayout.LayoutParams.MATCH_PARENT; layoutParams.width = RelativeLayout.LayoutParams.MATCH_PARENT;
vb.name.setMaxLines(2); vb.name.setMaxLines(2);
} else { } else {
layoutParams.width = (int) MyUtils.dpToPx(130); layoutParams.width = (int) Common.dpToPx(130);
vb.name.setMaxLines(1); vb.name.setMaxLines(1);
} }
vb.relative.setLayoutParams(layoutParams); vb.relative.setLayoutParams(layoutParams);

View File

@ -10,22 +10,22 @@ import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.fun.wave.pranksounds.activity.AcCategoryList; import com.fun.wave.pranksounds.activity.ListActivity;
import com.fun.wave.pranksounds.dataListener.SoundsWrapper; import com.fun.wave.pranksounds.listener.SoundsWrapper;
import com.fun.wave.pranksounds.utils.MyUtils; import com.fun.wave.pranksounds.utils.Common;
import com.fun.pranksounds.databinding.MainAdapterBinding; import com.fun.wave.pranksounds.databinding.MainAdapterBinding;
import java.util.List; import java.util.List;
public class AdapterMain extends RecyclerView.Adapter<AdapterMain.ViewHolder> { public class MainAdapter extends RecyclerView.Adapter<MainAdapter.ViewHolder> {
private final List<SoundsWrapper> mValues; private final List<SoundsWrapper> mValues;
private Context mCon; private Context mCon;
public AdapterMain(Context context, List<SoundsWrapper> items) { public MainAdapter(Context context, List<SoundsWrapper> items) {
mValues = items; mValues = items;
this.mCon = context; this.mCon = context;
} }
@ -41,7 +41,7 @@ public class AdapterMain extends RecyclerView.Adapter<AdapterMain.ViewHolder> {
public void onBindViewHolder(final ViewHolder holder, int position) { public void onBindViewHolder(final ViewHolder holder, int position) {
int absoluteAdapterPosition = holder.getAbsoluteAdapterPosition(); int absoluteAdapterPosition = holder.getAbsoluteAdapterPosition();
int i = absoluteAdapterPosition % 6; int i = absoluteAdapterPosition % 6;
holder.vb.relative.setBackground(ContextCompat.getDrawable(mCon, MyUtils.bgs[i])); holder.vb.relative.setBackground(ContextCompat.getDrawable(mCon, Common.bgs[i]));
SoundsWrapper soundsWrapper = mValues.get(absoluteAdapterPosition); SoundsWrapper soundsWrapper = mValues.get(absoluteAdapterPosition);
String covert = soundsWrapper.getCovert(); String covert = soundsWrapper.getCovert();
Glide.with(mCon).load(covert).into(holder.vb.image); Glide.with(mCon).load(covert).into(holder.vb.image);
@ -49,9 +49,9 @@ public class AdapterMain extends RecyclerView.Adapter<AdapterMain.ViewHolder> {
holder.vb.relative.setOnClickListener(new View.OnClickListener() { holder.vb.relative.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Intent intent = new Intent(mCon, AcCategoryList.class); Intent intent = new Intent(mCon, ListActivity.class);
intent.putExtra(MyUtils.KEY_LIST_DATA, soundsWrapper); intent.putExtra(Common.KEY_LIST_DATA, soundsWrapper);
intent.putExtra(MyUtils.KEY_LIST_COLOR_POS, i); intent.putExtra(Common.KEY_LIST_COLOR_POS, i);
mCon.startActivity(intent); mCon.startActivity(intent);
} }
}); });

View File

@ -8,27 +8,27 @@ import android.view.ViewGroup;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import com.fun.wave.pranksounds.databinding.MainFragmentBinding;
import com.fun.wave.pranksounds.utils.App; import com.fun.wave.pranksounds.utils.App;
import com.fun.wave.pranksounds.utils.MyItemSpace; import com.fun.wave.pranksounds.utils.ItemDec;
import com.fun.pranksounds.databinding.FragmentMainBinding;
import java.util.Collections; import java.util.Collections;
public class FragmentMain extends Fragment { public class MainFragment extends Fragment {
private FragmentMainBinding binding; private MainFragmentBinding binding;
public FragmentMain() { public MainFragment() {
} }
@SuppressWarnings("unused") @SuppressWarnings("unused")
public static FragmentMain newInstance() { public static MainFragment newInstance() {
FragmentMain fragment = new FragmentMain(); MainFragment fragment = new MainFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
fragment.setArguments(args); fragment.setArguments(args);
return fragment; return fragment;
@ -42,13 +42,13 @@ public class FragmentMain extends Fragment {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
binding = FragmentMainBinding.inflate(inflater); binding = MainFragmentBinding.inflate(inflater);
MyItemSpace itemHelper = new MyItemSpace(15, 15, 7); ItemDec itemHelper = new ItemDec(15, 15, 7);
binding.recyclerView.addItemDecoration(itemHelper); binding.recyclerView.addItemDecoration(itemHelper);
binding.recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2)); binding.recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
Collections.shuffle(App.bean); Collections.shuffle(App.bean);
binding.recyclerView.setAdapter(new AdapterMain(requireContext(), App.bean )); binding.recyclerView.setAdapter(new MainAdapter(requireContext(), App.bean ));

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.custom; package com.fun.wave.pranksounds.mine;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -8,25 +8,25 @@ import android.view.ViewGroup;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import com.fun.wave.pranksounds.dataListener.ObjectBoxMan; import com.fun.wave.pranksounds.collection.CollectionAdapter;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.databinding.MineFragmentBinding;
import com.fun.pranksounds.databinding.FragmentCustomBinding; import com.fun.wave.pranksounds.listener.ObjectBoxMan;
import com.fun.wave.pranksounds.like.AdapterLike; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.wave.pranksounds.utils.MyItemSpace; import com.fun.wave.pranksounds.utils.ItemDec;
import java.util.List; import java.util.List;
public class FragmentCustom extends Fragment { public class MineFragment extends Fragment {
private FragmentCustomBinding binding; private MineFragmentBinding binding;
private AdapterLike adapter; private CollectionAdapter adapter;
public FragmentCustom() { public MineFragment() {
} }
public static FragmentCustom newInstance() { public static MineFragment newInstance() {
FragmentCustom fragment = new FragmentCustom(); MineFragment fragment = new MineFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
fragment.setArguments(args); fragment.setArguments(args);
return fragment; return fragment;
@ -36,12 +36,12 @@ public class FragmentCustom extends Fragment {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
binding = FragmentCustomBinding.inflate(getLayoutInflater()); binding = MineFragmentBinding.inflate(getLayoutInflater());
MyItemSpace itemHelper = new MyItemSpace(7, 7, 7); ItemDec itemHelper = new ItemDec(7, 7, 7);
binding.recyclerImport.addItemDecoration(itemHelper); binding.recyclerImport.addItemDecoration(itemHelper);
binding.recyclerImport.setLayoutManager(new GridLayoutManager(requireContext(), 2)); binding.recyclerImport.setLayoutManager(new GridLayoutManager(requireContext(), 2));
List<PrankBean> all = ObjectBoxMan.getAllCustomization(); List<PrankBean> all = ObjectBoxMan.getAllCustomization();
adapter = new AdapterLike(requireContext(), all, true); adapter = new CollectionAdapter(requireContext(), all, true);
updateEmpty(all); updateEmpty(all);
binding.recyclerImport.setAdapter(adapter); binding.recyclerImport.setAdapter(adapter);
return binding.getRoot(); return binding.getRoot();

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.custom; package com.fun.wave.pranksounds.mine;
import android.content.Intent; import android.content.Intent;
import android.os.Handler; import android.os.Handler;
@ -6,22 +6,22 @@ import android.os.Looper;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import com.fun.pranksounds.R; import com.fun.wave.pranksounds.R;
import com.fun.wave.pranksounds.base.BaseActivity; import com.fun.wave.pranksounds.base.BaseActivity;
import com.fun.pranksounds.databinding.AcRecordingBinding; import com.fun.wave.pranksounds.databinding.RecordingActivityBinding;
import com.fun.wave.pranksounds.utils.MyRecorderUtils; import com.fun.wave.pranksounds.listener.OnUpdateRecordingTime;
import com.fun.wave.pranksounds.utils.OnUpdateRecordingTime; import com.fun.wave.pranksounds.utils.RecordUtils;
public class AcRecording extends BaseActivity<AcRecordingBinding> { public class RecordingActivity extends BaseActivity<RecordingActivityBinding> {
private Handler handler = new Handler(Looper.getMainLooper()); private Handler handler = new Handler(Looper.getMainLooper());
private boolean isCreate = false; private boolean isCreate = false;
private MyRecorderUtils myRecorderUtils; private RecordUtils recordUtils;
@Override @Override
protected void init() { protected void init() {
myRecorderUtils = new MyRecorderUtils(this, handler, new OnUpdateRecordingTime() { recordUtils = new RecordUtils(this, handler, new OnUpdateRecordingTime() {
@Override @Override
public void onUpdateTime(long time) { public void onUpdateTime(long time) {
@ -36,8 +36,8 @@ public class AcRecording extends BaseActivity<AcRecordingBinding> {
} }
@Override @Override
protected AcRecordingBinding initViewBinding() { protected RecordingActivityBinding initViewBinding() {
return AcRecordingBinding.inflate(getLayoutInflater()); return RecordingActivityBinding.inflate(getLayoutInflater());
} }
private void initEvent() { private void initEvent() {
@ -59,7 +59,7 @@ public class AcRecording extends BaseActivity<AcRecordingBinding> {
private void createSound(Boolean isStop) { private void createSound(Boolean isStop) {
if (!isCreate) { if (!isCreate) {
myRecorderUtils.startRecording(); recordUtils.startRecording();
viewBind.lottieView.playAnimation(); viewBind.lottieView.playAnimation();
viewBind.viewPause.setSelected(true); viewBind.viewPause.setSelected(true);
isCreate = true; isCreate = true;
@ -67,22 +67,22 @@ public class AcRecording extends BaseActivity<AcRecordingBinding> {
if (isStop) { if (isStop) {
viewBind.lottieView.cancelAnimation(); viewBind.lottieView.cancelAnimation();
viewBind.viewPause.setSelected(false); viewBind.viewPause.setSelected(false);
myRecorderUtils.stopRecording(); recordUtils.stopRecording();
Intent intent = new Intent(AcRecording.this, AcSave.class); Intent intent = new Intent(RecordingActivity.this, SaveActivity.class);
// intent.putExtra(AcSave.KEY_Time, elapsedTime); // intent.putExtra(AcSave.KEY_Time, elapsedTime);
intent.putExtra(AcSave.KEY_Path, myRecorderUtils.getTempFileName()); intent.putExtra(SaveActivity.KEY_Path, recordUtils.getTempFileName());
intent.putExtra(AcSave.KEY_import, 1); intent.putExtra(SaveActivity.KEY_import, 1);
startActivity(intent); startActivity(intent);
finish(); finish();
} else { } else {
Log.d("================","--"+myRecorderUtils.isRecording()); Log.d("================","--"+ recordUtils.isRecording());
if (myRecorderUtils.isRecording()) { if (recordUtils.isRecording()) {
viewBind.viewPause.setSelected(false); viewBind.viewPause.setSelected(false);
myRecorderUtils.pauseRecording(); recordUtils.pauseRecording();
viewBind.lottieView.pauseAnimation(); viewBind.lottieView.pauseAnimation();
} else { } else {
viewBind.viewPause.setSelected(true); viewBind.viewPause.setSelected(true);
myRecorderUtils.resumeRecording(); recordUtils.resumeRecording();
viewBind.lottieView.resumeAnimation(); viewBind.lottieView.resumeAnimation();
} }
} }
@ -93,6 +93,6 @@ public class AcRecording extends BaseActivity<AcRecordingBinding> {
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
myRecorderUtils.stopRecording(); recordUtils.stopRecording();
} }
} }

View File

@ -1,4 +1,4 @@
package com.fun.wave.pranksounds.custom; package com.fun.wave.pranksounds.mine;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.ContentResolver; import android.content.ContentResolver;
@ -13,18 +13,18 @@ import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import com.fun.wave.pranksounds.R;
import com.fun.wave.pranksounds.base.BaseActivity; import com.fun.wave.pranksounds.base.BaseActivity;
import com.fun.wave.pranksounds.dataListener.ObjectBoxMan; import com.fun.wave.pranksounds.databinding.SaveActivityBinding;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.listener.ObjectBoxMan;
import com.fun.pranksounds.R; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.pranksounds.databinding.AcSaveBinding;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
public class AcSave extends BaseActivity<AcSaveBinding> { public class SaveActivity extends BaseActivity<SaveActivityBinding> {
private String path; private String path;
@ -50,8 +50,8 @@ public class AcSave extends BaseActivity<AcSaveBinding> {
} }
@Override @Override
protected AcSaveBinding initViewBinding() { protected SaveActivityBinding initViewBinding() {
return AcSaveBinding.inflate(getLayoutInflater()); return SaveActivityBinding.inflate(getLayoutInflater());
} }
private void togglePrank() throws IOException { private void togglePrank() throws IOException {
@ -139,14 +139,14 @@ public class AcSave extends BaseActivity<AcSaveBinding> {
if (!TextUtils.isEmpty(name)) { if (!TextUtils.isEmpty(name)) {
if(!b){ if(!b){
viewBind.saveEdit.setText(""); viewBind.saveEdit.setText("");
Toast.makeText(AcSave.this, getString(R.string.name_hint), Toast.LENGTH_SHORT).show(); Toast.makeText(SaveActivity.this, getString(R.string.name_hint), Toast.LENGTH_SHORT).show();
return; return;
} }
saveData(name); saveData(name);
Toast.makeText(AcSave.this, getString(R.string.save_tips), Toast.LENGTH_SHORT).show(); Toast.makeText(SaveActivity.this, getString(R.string.save_tips), Toast.LENGTH_SHORT).show();
finish(); finish();
} else { } else {
Toast.makeText(AcSave.this, getString(R.string.save_tip), Toast.LENGTH_SHORT).show(); Toast.makeText(SaveActivity.this, getString(R.string.save_tip), Toast.LENGTH_SHORT).show();
} }
}); });
} }

View File

@ -4,10 +4,10 @@ import android.app.Application;
import android.content.res.AssetManager; import android.content.res.AssetManager;
import android.graphics.Typeface; import android.graphics.Typeface;
import com.fun.wave.pranksounds.dataListener.SoundsWrapper; import com.fun.wave.pranksounds.listener.SoundsWrapper;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.wave.pranksounds.dataListener.ObjectBoxMan; import com.fun.wave.pranksounds.listener.ObjectBoxMan;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -34,9 +34,9 @@ public class App extends Application {
try { try {
prankBeanList = new ArrayList<>(); prankBeanList = new ArrayList<>();
InputStream open = getAssets().open("prank.json"); InputStream open = getAssets().open("prank.json");
String string = MyUtils.getString(open); String string = Common.getString(open);
if (!string.isEmpty()) { if (!string.isEmpty()) {
bean = MyUtils.getBean(string); bean = Common.getBean(string);
for (SoundsWrapper category:bean){ for (SoundsWrapper category:bean){
for (PrankBean prankBean1 : category.getPrankBeanList()) { for (PrankBean prankBean1 : category.getPrankBeanList()) {
prankBean1.setLike(false); prankBean1.setLike(false);

View File

@ -15,9 +15,9 @@ import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.fun.wave.pranksounds.dataListener.PrankBean; import com.fun.wave.pranksounds.listener.PrankBean;
import com.fun.wave.pranksounds.dataListener.SoundsWrapper; import com.fun.wave.pranksounds.listener.SoundsWrapper;
import com.fun.pranksounds.R; import com.fun.wave.pranksounds.R;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
@ -31,7 +31,7 @@ import java.io.StringWriter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class MyUtils { public class Common {
public static int[] bgs = new int[]{R.drawable.main_item_bg,R.drawable.main_item_bg,R.drawable.main_item_bg,R.drawable.main_item_bg, public static int[] bgs = new int[]{R.drawable.main_item_bg,R.drawable.main_item_bg,R.drawable.main_item_bg,R.drawable.main_item_bg,
R.drawable.main_item_bg,R.drawable.main_item_bg}; R.drawable.main_item_bg,R.drawable.main_item_bg};

View File

@ -10,11 +10,11 @@ import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager; import androidx.recyclerview.widget.StaggeredGridLayoutManager;
public class MyItemSpace extends RecyclerView.ItemDecoration { public class ItemDec extends RecyclerView.ItemDecoration {
private int v, h, ex; private int v, h, ex;
public MyItemSpace(int v, int h, int ex) { public ItemDec(int v, int h, int ex) {
this.v = Math.round(dpToPx(v)); this.v = Math.round(dpToPx(v));
this.h = Math.round(dpToPx(h)); this.h = Math.round(dpToPx(h));
this.ex = Math.round(dpToPx(ex)); this.ex = Math.round(dpToPx(ex));

View File

@ -8,13 +8,13 @@ import android.util.AttributeSet;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.fun.pranksounds.R; import com.fun.wave.pranksounds.R;
public class MyTv extends androidx.appcompat.widget.AppCompatTextView { public class MineTextView extends androidx.appcompat.widget.AppCompatTextView {
public MyTv(Context context, @Nullable AttributeSet attrs) { public MineTextView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs); super(context, attrs);
initAttrs(context,attrs); initAttrs(context,attrs);
} }
@ -24,7 +24,7 @@ public class MyTv extends androidx.appcompat.widget.AppCompatTextView {
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MyTV); TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MyTV);
boolean aBoolean = typedArray.getBoolean(R.styleable.MyTV_apply_font,false); boolean aBoolean = typedArray.getBoolean(R.styleable.MyTV_apply_font,false);
if(aBoolean){ if(aBoolean){
MyUtils.initFont(this); Common.initFont(this);
} }
typedArray.recycle(); typedArray.recycle();

View File

@ -8,15 +8,15 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.PopupWindow; import android.widget.PopupWindow;
import com.fun.wave.pranksounds.dataListener.OnClickTimerListener; import com.fun.wave.pranksounds.listener.ClickTimerListener;
import com.fun.pranksounds.databinding.PopupClockBinding; import com.fun.wave.pranksounds.databinding.PopupClockBinding;
public class PopupClock implements View.OnClickListener { public class PopupClock implements View.OnClickListener {
private PopupClockBinding binding; private PopupClockBinding binding;
private PopupWindow popupWindow; private PopupWindow popupWindow;
private OnClickTimerListener mListener; private ClickTimerListener mListener;
public PopupClock(Activity context, OnClickTimerListener listener) { public PopupClock(Activity context, ClickTimerListener listener) {
mListener = listener; mListener = listener;
binding = PopupClockBinding.inflate(context.getLayoutInflater()); binding = PopupClockBinding.inflate(context.getLayoutInflater());
popupWindow = new PopupWindow(binding.getRoot(), ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); popupWindow = new PopupWindow(binding.getRoot(), ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
@ -50,12 +50,12 @@ public class PopupClock implements View.OnClickListener {
Gravity.NO_GRAVITY); Gravity.NO_GRAVITY);
} }
private void setSelected(MyTv tv) { private void setSelected(MineTextView tv) {
int childCount = binding.layoutTime.getChildCount(); int childCount = binding.layoutTime.getChildCount();
for (int i = 0; i < childCount; i++) { for (int i = 0; i < childCount; i++) {
View child = binding.layoutTime.getChildAt(i); View child = binding.layoutTime.getChildAt(i);
if (child instanceof MyTv) { if (child instanceof MineTextView) {
MyTv tvTimer = (MyTv) child; MineTextView tvTimer = (MineTextView) child;
if (tvTimer.equals(tv)) { if (tvTimer.equals(tv)) {
tvTimer.setSelected(true); tvTimer.setSelected(true);
} else { } else {
@ -77,8 +77,8 @@ public class PopupClock implements View.OnClickListener {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (v instanceof MyTv) { if (v instanceof MineTextView) {
MyTv v1 = (MyTv) v; MineTextView v1 = (MineTextView) v;
String string = v1.getText().toString(); String string = v1.getText().toString();
switch (string){ switch (string){
case "off": case "off":

View File

@ -5,11 +5,13 @@ import android.media.MediaRecorder;
import android.os.Handler; import android.os.Handler;
import android.util.Log; import android.util.Log;
import com.fun.wave.pranksounds.listener.OnUpdateRecordingTime;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
public class MyRecorderUtils { public class RecordUtils {
private MediaRecorder mediaRecorder; private MediaRecorder mediaRecorder;
private String tempFileName; private String tempFileName;
private boolean isRecording = false; private boolean isRecording = false;
@ -22,7 +24,7 @@ public class MyRecorderUtils {
private Runnable updateRunnable; private Runnable updateRunnable;
private Handler mHandler; private Handler mHandler;
public MyRecorderUtils(Context context, Handler handler,OnUpdateRecordingTime listener) { public RecordUtils(Context context, Handler handler, OnUpdateRecordingTime listener) {
mHandler = handler; mHandler = handler;
File dir = context.getCacheDir(); File dir = context.getCacheDir();
File file = new File(dir, "temp_audio.mp3"); File file = new File(dir, "temp_audio.mp3");

View File

@ -9,7 +9,7 @@ import android.util.AttributeSet
import android.view.View import android.view.View
import androidx.core.animation.doOnEnd import androidx.core.animation.doOnEnd
class CustomRippleView @JvmOverloads constructor( class RippleView @JvmOverloads constructor(
context: Context, context: Context,
attrs: AttributeSet? = null attrs: AttributeSet? = null
) : View(context, attrs) { ) : View(context, attrs) {

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/drawable_loop_1" android:state_selected="false" />
<item android:drawable="@drawable/drawable_loop_0" android:state_selected="true" />
</selector>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/drawable_play_like_0" android:state_selected="false" />
<item android:drawable="@drawable/drawable_red_like" android:state_selected="true" />
</selector>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/collection_unselected" android:state_selected="false" />
<item android:drawable="@drawable/collection_selected" android:state_selected="true" />
</selector>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/loop_unselected" android:state_selected="false" />
<item android:drawable="@drawable/loop_selected" android:state_selected="true" />
</selector>

View File

@ -21,7 +21,7 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="5dp"> android:padding="5dp">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/ttv_name" android:id="@+id/ttv_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -53,7 +53,7 @@
android:layout_alignEnd="@id/layout" android:layout_alignEnd="@id/layout"
android:layout_gravity="end" android:layout_gravity="end"
android:padding="5dp" android:padding="5dp"
android:src="@drawable/drawable_delete" /> android:src="@drawable/ic_remove_collection" />
<View <View

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/title_layout" android:id="@+id/title_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_height="40dp"
@ -35,7 +35,7 @@
android:layout_width="200dp" android:layout_width="200dp"
android:layout_height="200dp" android:layout_height="200dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:src="@drawable/drawable_image_empty" /> android:src="@drawable/image_empty_data" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:background="@drawable/background" android:background="@drawable/background"
tools:context="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcCategoryList"> tools:context=".activity.ListActivity">
<RelativeLayout <RelativeLayout
android:id="@+id/title_layout" android:id="@+id/title_layout"
@ -16,7 +16,7 @@
android:paddingBottom="2dp" android:paddingBottom="2dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/category_name" android:id="@+id/category_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -33,7 +33,7 @@
android:layout_height="45dp" android:layout_height="45dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:padding="10dp" android:padding="10dp"
android:src="@drawable/drawable_back_00" /> android:src="@drawable/ic_back" />
</RelativeLayout> </RelativeLayout>

View File

@ -15,7 +15,7 @@
android:paddingEnd="5dp" android:paddingEnd="5dp"
android:paddingBottom="10dp"> android:paddingBottom="10dp">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -17,7 +17,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="150dp"> android:layout_height="150dp">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -6,7 +6,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/title_layout" android:id="@+id/title_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_height="40dp"

View File

@ -4,9 +4,9 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="com.fun.pranksounds.com.fun.wave.pranksounds.custom.FragmentCustom"> tools:context=".activity.OneActivity">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/title_layout" android:id="@+id/title_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_height="40dp"
@ -36,7 +36,7 @@
android:layout_width="200dp" android:layout_width="200dp"
android:layout_height="200dp" android:layout_height="200dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:src="@drawable/drawable_image_empty" /> android:src="@drawable/image_empty_data" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/background" android:background="@drawable/background"
tools:context="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcMain"> tools:context=".activity.OneActivity">
<androidx.viewpager2.widget.ViewPager2 <androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp2" android:id="@+id/vp2"

View File

@ -6,7 +6,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/background" android:background="@drawable/background"
tools:context="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcPlayPranks"> tools:context=".activity.PlayActivity">
<RelativeLayout <RelativeLayout
android:id="@+id/title_layout" android:id="@+id/title_layout"
@ -16,7 +16,7 @@
android:paddingBottom="12dp" android:paddingBottom="12dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -33,7 +33,7 @@
android:layout_height="45dp" android:layout_height="45dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:padding="10dp" android:padding="10dp"
android:src="@drawable/drawable_back_00" /> android:src="@drawable/ic_back" />
</RelativeLayout> </RelativeLayout>
@ -86,7 +86,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"> android:layout_gravity="center">
<com.fun.pranksounds.utils.CustomRippleView <com.fun.wave.pranksounds.utils.RippleView
android:id="@+id/rippleView" android:id="@+id/rippleView"
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="150dp" /> android:layout_height="150dp" />
@ -119,7 +119,7 @@
android:layout_marginStart="66dp" android:layout_marginStart="66dp"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:padding="4dp" android:padding="4dp"
android:src="@drawable/drawable_timer_1" android:src="@drawable/icon_timer"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -130,7 +130,7 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:padding="2dp" android:padding="2dp"
android:src="@drawable/drawable_looper" android:src="@drawable/status_looper"
app:layout_constraintLeft_toRightOf="@id/im_timer" app:layout_constraintLeft_toRightOf="@id/im_timer"
app:layout_constraintTop_toTopOf="@id/im_timer" /> app:layout_constraintTop_toTopOf="@id/im_timer" />
@ -141,7 +141,7 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:padding="5dp" android:padding="5dp"
android:src="@drawable/selector_like" android:src="@drawable/status_collection"
app:layout_constraintLeft_toRightOf="@id/im_loop" app:layout_constraintLeft_toRightOf="@id/im_loop"
app:layout_constraintTop_toTopOf="@id/im_timer" /> app:layout_constraintTop_toTopOf="@id/im_timer" />
@ -160,7 +160,7 @@
android:layout_width="22dp" android:layout_width="22dp"
android:layout_height="22dp" android:layout_height="22dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/drawable_volume_white" /> android:src="@drawable/icon_volume" />
<SeekBar <SeekBar
android:id="@+id/seekbar" android:id="@+id/seekbar"
@ -170,7 +170,7 @@
android:layout_toEndOf="@id/im" android:layout_toEndOf="@id/im"
android:maxHeight="5dp" android:maxHeight="5dp"
android:progress="10" android:progress="10"
android:progressDrawable="@drawable/drawable_layer_sounds" android:progressDrawable="@drawable/rect_sounds"
android:thumb="@drawable/drawable_thumb" /> android:thumb="@drawable/drawable_thumb" />
</RelativeLayout> </RelativeLayout>
@ -180,7 +180,7 @@
</LinearLayout> </LinearLayout>
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/more_title" android:id="@+id/more_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -3,10 +3,10 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/drawable_bg_timer" android:background="@drawable/rect_timer_dialog"
android:padding="10dp"> android:padding="10dp">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -23,7 +23,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:orientation="horizontal"> android:orientation="horizontal">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/tv_off" android:id="@+id/tv_off"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -43,7 +43,7 @@
android:background="@color/main_gray" /> android:background="@color/main_gray" />
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/tv_15s" android:id="@+id/tv_15s"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -63,7 +63,7 @@
android:background="@color/main_gray" /> android:background="@color/main_gray" />
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/tv_30s" android:id="@+id/tv_30s"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -83,7 +83,7 @@
android:background="@color/main_gray" /> android:background="@color/main_gray" />
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/tv_1m" android:id="@+id/tv_1m"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -103,7 +103,7 @@
android:background="@color/main_gray" /> android:background="@color/main_gray" />
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/tv_5m" android:id="@+id/tv_5m"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -15,7 +15,7 @@
android:paddingBottom="12dp" android:paddingBottom="12dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -32,13 +32,13 @@
android:layout_height="45dp" android:layout_height="45dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:padding="10dp" android:padding="10dp"
android:src="@drawable/drawable_back_00" /> android:src="@drawable/ic_back" />
</RelativeLayout> </RelativeLayout>
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/audio_time" android:id="@+id/audio_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -15,7 +15,7 @@
android:paddingBottom="12dp" android:paddingBottom="12dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -30,7 +30,7 @@
android:layout_height="45dp" android:layout_height="45dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:padding="10dp" android:padding="10dp"
android:src="@drawable/drawable_back_00" /> android:src="@drawable/ic_back" />
</RelativeLayout> </RelativeLayout>
@ -55,7 +55,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/audio_im" app:layout_constraintTop_toBottomOf="@id/audio_im"
android:background="@drawable/drawable_bg_btn" android:background="@drawable/bg_button_save"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="10dp" android:paddingStart="10dp"
@ -67,7 +67,7 @@
android:layout_height="22dp" android:layout_height="22dp"
android:src="@drawable/selector_play" /> android:src="@drawable/selector_play" />
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
@ -75,7 +75,7 @@
android:text="@string/play_audio" android:text="@string/play_audio"
app:apply_font="true" /> app:apply_font="true" />
</LinearLayout> </LinearLayout>
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:id="@+id/audio_time" android:id="@+id/audio_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -92,7 +92,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="36dp" android:layout_margin="36dp"
android:background="@drawable/drawable_bg_edittext" android:background="@drawable/bg_stoke_name"
android:gravity="center" android:gravity="center"
android:hint="@string/save_audio_name_hint" android:hint="@string/save_audio_name_hint"
android:maxLength="10" android:maxLength="10"
@ -107,7 +107,7 @@
android:layout_height="45dp" android:layout_height="45dp"
android:paddingStart="35dp" android:paddingStart="35dp"
android:paddingEnd="35dp" android:paddingEnd="35dp"
android:background="@drawable/drawable_bg_btn" android:background="@drawable/bg_button_save"
android:gravity="center" android:gravity="center"
android:text="@string/save" android:text="@string/save"
android:layout_marginTop="50dp" android:layout_marginTop="50dp"

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/main" android:id="@+id/main"
android:background="@color/color_07377B" android:background="@color/color_07377B"
tools:context="com.fun.pranksounds.com.fun.wave.pranksounds.activity.AcSplashUi"> tools:context=".activity.WelActivity">
<androidx.constraintlayout.utils.widget.ImageFilterView <androidx.constraintlayout.utils.widget.ImageFilterView
@ -16,7 +16,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/welcome_icon" /> android:src="@drawable/welcome_icon" />
<com.fun.wave.pranksounds.utils.MyTv <com.fun.wave.pranksounds.utils.MineTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@id/loading_pb" android:layout_above="@id/loading_pb"
@ -43,7 +43,7 @@
android:layout_marginEnd="25dp" android:layout_marginEnd="25dp"
android:layout_marginBottom="35dp" android:layout_marginBottom="35dp"
android:progress="90" android:progress="90"
android:progressDrawable="@drawable/drawable_welcome_pb" /> android:progressDrawable="@drawable/pb_welcome" />
</RelativeLayout> </RelativeLayout>

View File

@ -16,6 +16,5 @@ buildscript {
// Android Gradle Plugin 4.1.0 or later supported. // Android Gradle Plugin 4.1.0 or later supported.
// classpath("com.android.tools.build:gradle:8.1.0") // classpath("com.android.tools.build:gradle:8.1.0")
classpath("io.objectbox:objectbox-gradle-plugin:5.0.1") classpath("io.objectbox:objectbox-gradle-plugin:5.0.1")
classpath ("io.github.jiayuliang1314:ResTools:1.0.5")
} }
} }