This commit is contained in:
litingting 2025-07-21 17:20:25 +08:00
commit ea0a3d478d
118 changed files with 169472 additions and 0 deletions

15
.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

1
app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

65
app/build.gradle.kts Normal file
View File

@ -0,0 +1,65 @@
import java.text.SimpleDateFormat
import java.util.Date
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
id("io.objectbox")
}
val timeStamp: String = SimpleDateFormat("MM_dd_HH_mm").format(Date())
android {
namespace = "com.apps.chillscreen"
compileSdk = 35
defaultConfig {
applicationId = "com.apps.chillscreen"
minSdk = 24
targetSdk = 35
versionCode = 1
versionName = "1.0"
setProperty(
"archivesBaseName",
"Chill Screen_V" + versionName + "(${versionCode})_$timeStamp"
)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
implementation(libs.androidx.appcompat.v161)
implementation(libs.material.v190)
androidTestImplementation(libs.androidx.espresso.core)
implementation(libs.glide)
implementation(libs.objectbox.android)
annotationProcessor(libs.objectbox.processor)
implementation(libs.okhttp)
}

BIN
app/chillscreen.jks Normal file

Binary file not shown.

View File

@ -0,0 +1,92 @@
{
"_note1": "KEEP THIS FILE! Check it into a version control system (VCS) like git.",
"_note2": "ObjectBox manages crucial IDs for your object model. See docs for details.",
"_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.",
"entities": [
{
"id": "1:8642070015452780183",
"lastPropertyId": "13:8659570369183987252",
"name": "Picture",
"properties": [
{
"id": "1:2281413809626359424",
"name": "id",
"type": 6,
"flags": 1
},
{
"id": "2:2813672656064195547",
"name": "categoryName",
"type": 9
},
{
"id": "3:2944220475631401649",
"name": "imId",
"type": 9
},
{
"id": "4:359108763579872549",
"name": "description",
"type": 9
},
{
"id": "5:1531781432145234897",
"name": "fullUrl",
"type": 9
},
{
"id": "6:5786469581425172317",
"name": "previewUrl1080",
"type": 9
},
{
"id": "7:2354808997131349944",
"name": "previewUrl400",
"type": 9
},
{
"id": "8:3604066859564985297",
"name": "previewUrl200",
"type": 9
},
{
"id": "9:5199668204417835840",
"name": "authorName",
"type": 9
},
{
"id": "10:6789887940458929079",
"name": "authorHeader",
"type": 9
},
{
"id": "11:4529032126561459832",
"name": "authorHtml",
"type": 9
},
{
"id": "12:7188729127610796873",
"name": "isLike",
"type": 1
},
{
"id": "13:8659570369183987252",
"name": "isDownload",
"type": 1
}
],
"relations": []
}
],
"lastEntityId": "1:8642070015452780183",
"lastIndexId": "0:0",
"lastRelationId": "0:0",
"lastSequenceId": "0:0",
"modelVersion": 5,
"modelVersionParserMinimum": 5,
"retiredEntityUids": [],
"retiredIndexUids": [],
"retiredPropertyUids": [],
"retiredRelationUids": [],
"version": 1
}

21
app/proguard-rules.pro vendored Normal file
View 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

View File

@ -0,0 +1,24 @@
package com.apps.chillscreen
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.apps.chillscreen", appContext.packageName)
}
}

View File

@ -0,0 +1,47 @@
<?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.SET_WALLPAPER" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<application
android:name=".BaseApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/login_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/login_icon_round"
android:supportsRtl="true"
android:theme="@style/Theme.ChillScreen"
tools:targetApi="31">
<activity
android:name=".uiView.ExploreActivity"
android:exported="false" />
<activity
android:name=".uiView.ExtendedInfoActivity"
android:exported="false"
android:theme="@style/Theme.TransparentStatusBar" />
<activity
android:name=".uiView.GeneraActivity"
android:exported="false" />
<activity
android:name=".uiView.BaseActivity"
android:exported="true" />
<activity
android:name=".uiView.LaunchActivity"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

20703
app/src/main/assets/Film.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,63 @@
package com.apps.chillscreen;
import android.app.Application;
import android.content.Context;
import android.util.Log;
import com.apps.chillscreen.tool.PictureManager;
import com.apps.chillscreen.tool.JsonConvert;
import com.apps.chillscreen.tool.OpenUtil;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class BaseApplication extends Application {
private Context context;
private String animaLs = "Animals.json";
private String experiment = "Experimental.json";
private String film = "Film.json";
private String nature = "Nature.json";
private String patterns = "Patterns.json";
private String street = "Street.json";
private String travel = "Travel.json";
private String wallpaper = "Featured.json";
private static List<String> categoryList = new ArrayList<>();
private ExecutorService executorService;
@Override
public void onCreate() {
super.onCreate();
context = this;
PictureManager.init(this);
executorService = Executors.newFixedThreadPool(8);//开启8个线程的线程池
String[] names = {animaLs, experiment, film, nature, patterns, street, travel, wallpaper};
try {
for (String name : names) {
InputStream inputStream = getAssets().open(name);
String convert = OpenUtil.getConvert(inputStream);
Log.d("YYYYYY", convert);
if (!convert.isEmpty()) {
String substring = name.substring(0, name.indexOf("."));
categoryList.add(substring);
executorService.execute(() -> {
JsonConvert.INSTANCE.getData(convert, substring);
});
}
}
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
executorService.shutdown(); // 平滑关闭等待任务完成
}
}
public static List<String> getCategoryList(){
return categoryList;
}
}

View File

@ -0,0 +1,116 @@
package com.apps.chillscreen.adapter;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.apps.chillscreen.R;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.ItemBookmarkBinding;
import com.apps.chillscreen.listener.BookmarkClickListener;
import com.apps.chillscreen.tool.PictureManager;
import com.apps.chillscreen.tool.OpenUtil;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.MultiTransformation;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import java.util.ArrayList;
import java.util.List;
public class BookMarkAdapter extends RecyclerView.Adapter<BookMarkAdapter.CollectViewHolder> {
private Context context;
private List<Picture> pictures = new ArrayList<>();
private BookmarkClickListener listener;
@Override
public void onBindViewHolder(@NonNull BookMarkAdapter.CollectViewHolder holder, int position) {
Picture picture = pictures.get(position);
MultiTransformation<Bitmap> multiTransformation = new MultiTransformation<>(
new CenterCrop(),
new RoundedCorners(OpenUtil.dpToPx(context, 12))
);
Glide.with(context)
.load(picture.getPreviewUrl1080())
.placeholder(R.mipmap.img_placeholder)
.transform(multiTransformation)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.thumbnail(
Glide.with(context)
.asDrawable()
.load(picture.getPreviewUrl200())
.apply(new RequestOptions()
.format(DecodeFormat.PREFER_RGB_565)
.transform(multiTransformation)
)
.placeholder(R.mipmap.img_placeholder)
)
.into(holder.binding.wallpaper);
holder.binding.rlSet.setOnClickListener(v -> {
listener.onSetClick(picture, position);
});
holder.binding.imgCollect.setClipToOutline(true);
holder.binding.rlDown.setOnClickListener(v -> {
listener.onDownloadClick(picture, position);
});
holder.binding.imgCollect.setSelected(true);
holder.binding.imgCollect.setOnClickListener(v -> {
if (position >= 0 && position < pictures.size()) {
boolean selected = holder.binding.imgCollect.isSelected();
holder.binding.imgCollect.setSelected(!selected);
boolean selectedNew = holder.binding.imgCollect.isSelected();
picture.setLike(selectedNew);
PictureManager.updateCollect(picture);
listener.onRemoveClick(position);
}
});
holder.binding.tvName.setText(picture.getDescription());
}
@Override
public int getItemCount() {
return pictures.size();
}
public void setPicture(List<Picture> pictureList) {
this.pictures = pictureList;
notifyDataSetChanged();
}
public Picture getPictureAt(int position) {
if (position >= 0 && position < pictures.size()) {
return pictures.get(position);
}
return null;
}
public void setClickListener(BookmarkClickListener listener) {
this.listener = listener;
}
@NonNull
@Override
public CollectViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
context = parent.getContext();
ItemBookmarkBinding inflate = ItemBookmarkBinding.inflate(LayoutInflater.from(context), parent, false);
return new CollectViewHolder(inflate);
}
static class CollectViewHolder extends RecyclerView.ViewHolder {
private ItemBookmarkBinding binding;
public CollectViewHolder(ItemBookmarkBinding itemView) {
super(itemView.getRoot());
binding = itemView;
}
}
}

View File

@ -0,0 +1,89 @@
package com.apps.chillscreen.adapter;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.apps.chillscreen.R;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.ItemDiscoverBinding;
import com.apps.chillscreen.tool.PictureManager;
import com.apps.chillscreen.listener.CardClickListener;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.request.RequestOptions;
import java.util.ArrayList;
import java.util.List;
public class DiscoverAdapter extends RecyclerView.Adapter<DiscoverAdapter.HomeParentHolder> {
private Context context;
private CardClickListener listener;
private List<String> pictureNames = new ArrayList<>();
@Override
public void onBindViewHolder(@NonNull HomeParentHolder holder, int position) {
String name = pictureNames.get(position);
Log.d("YYYYYY", "pictureNames.size is" + getItemCount());
holder.itemBing.tvClassName.setText(name);
List<Picture> pictures = PictureManager.queryCover(name);
String cover = pictures.get(0).getPreviewUrl1080();
String thumb = pictures.get(0).getPreviewUrl200();
Glide.with(context).load(cover).placeholder(R.mipmap.img_placeholder).error(R.mipmap.img_placeholder).thumbnail(
Glide.with(context)
.asDrawable()
.load(thumb)
.apply(new RequestOptions()
.format(DecodeFormat.PREFER_RGB_565))
.placeholder(R.mipmap.img_placeholder)
.centerCrop()
).into(holder.itemBing.preview);
if (position >= getItemCount() - 2) {
holder.itemBing.bottomView.setVisibility(View.VISIBLE);
} else if (position <= 1) {
holder.itemBing.topView.setVisibility(View.VISIBLE);
} else {
holder.itemBing.bottomView.setVisibility(View.GONE);
holder.itemBing.topView.setVisibility(View.GONE);
}
holder.itemBing.preview.setOnClickListener(v -> listener.onHomeClick(name));
}
@Override
public int getItemCount() {
return pictureNames.size();
}
@NonNull
@Override
public HomeParentHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
context = parent.getContext();
ItemDiscoverBinding inflate = ItemDiscoverBinding.inflate(LayoutInflater.from(context), parent, false);
return new HomeParentHolder(inflate);
}
static class HomeParentHolder extends RecyclerView.ViewHolder {
private ItemDiscoverBinding itemBing;
public HomeParentHolder(@NonNull ItemDiscoverBinding itemView) {
super(itemView.getRoot());
itemBing = itemView;
}
}
public void setPictures(List<String> pictureList) {
this.pictureNames = pictureList;
notifyDataSetChanged();
}
public void setClickListener(CardClickListener listener) {
this.listener = listener;
}
}

View File

@ -0,0 +1,73 @@
package com.apps.chillscreen.adapter;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.apps.chillscreen.R;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.ItemGirdBinding;
import com.apps.chillscreen.listener.CardClickListener;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import java.util.List;
public class GirdAdapter extends RecyclerView.Adapter<GirdAdapter.GirdViewHolder> {
private Context context;
private List<Picture> pictureList;
private CardClickListener cardClickListener;
@NonNull
@Override
public GirdViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
context = parent.getContext();
ItemGirdBinding inflate = ItemGirdBinding.inflate(LayoutInflater.from(context), parent, false);
return new GirdViewHolder(inflate);
}
@Override
public void onBindViewHolder(@NonNull GirdViewHolder holder, int position) {
Picture picture = pictureList.get(position);
String preViewUrl400 = picture.getPreviewUrl400();
Glide.with(context).asDrawable()
.skipMemoryCache(true)
.apply(new RequestOptions().format(DecodeFormat.PREFER_RGB_565))
.diskCacheStrategy(DiskCacheStrategy.ALL)
.load(preViewUrl400)
.error(R.mipmap.img_placeholder)
.placeholder(R.mipmap.img_placeholder)
.into(holder.binding.img);
holder.binding.layout.setOnClickListener(v -> cardClickListener.onDetailClick(picture) );
}
@Override
public int getItemCount() {
Log.d("YYYYYY","pictureList.size is"+pictureList.size());
return pictureList.size();
}
public void setPictureList(List<Picture> pictures) {
this.pictureList = pictures;
notifyDataSetChanged();
}
public void setClickListener(CardClickListener listener){
this.cardClickListener=listener;
}
static class GirdViewHolder extends RecyclerView.ViewHolder {
ItemGirdBinding binding;
public GirdViewHolder(@NonNull ItemGirdBinding itemView) {
super(itemView.getRoot());
binding = itemView;
}
}
}

View File

@ -0,0 +1,139 @@
package com.apps.chillscreen.bean;
import java.io.Serializable;
import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;
@Entity
public class Picture implements Serializable {
@Id
private long id;
private String categoryName;
private String imId;
private String description;
private String fullUrl;
private String previewUrl1080;
private String previewUrl400;
private String previewUrl200;
private String authorName;
private String authorHeader;
private String authorHtml;
private boolean isLike;
private boolean isDownload;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getImId() {
return imId;
}
public void setImId(String imId) {
this.imId = imId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getFullUrl() {
return fullUrl;
}
public void setFullUrl(String fullUrl) {
this.fullUrl = fullUrl;
}
public String getPreviewUrl1080() {
return previewUrl1080;
}
public void setPreviewUrl1080(String previewUrl1080) {
this.previewUrl1080 = previewUrl1080;
}
public String getPreviewUrl400() {
return previewUrl400;
}
public void setPreviewUrl400(String previewUrl400) {
this.previewUrl400 = previewUrl400;
}
public String getPreviewUrl200() {
return previewUrl200;
}
public void setPreviewUrl200(String previewUrl200) {
this.previewUrl200 = previewUrl200;
}
public String getAuthorName() {
return authorName;
}
public void setAuthorName(String authorName) {
this.authorName = authorName;
}
public String getAuthorHeader() {
return authorHeader;
}
public void setAuthorHeader(String authorHeader) {
this.authorHeader = authorHeader;
}
public String getAuthorHtml() {
return authorHtml;
}
public void setAuthorHtml(String authorHtml) {
this.authorHtml = authorHtml;
}
public boolean isLike() {
return isLike;
}
public void setLike(boolean like) {
isLike = like;
}
public boolean isDownload() {
return isDownload;
}
public void setDownload(boolean download) {
isDownload = download;
}
}

View File

@ -0,0 +1,9 @@
package com.apps.chillscreen.listener;
import com.apps.chillscreen.bean.Picture;
public interface BookmarkClickListener {
void onSetClick(Picture picture, int position);
void onDownloadClick(Picture picture, int position);
void onRemoveClick(int position);
}

View File

@ -0,0 +1,9 @@
package com.apps.chillscreen.listener;
import com.apps.chillscreen.bean.Picture;
import java.util.List;
public interface BookmarkListener {
void onCollectList(List<Picture> picture);
}

View File

@ -0,0 +1,8 @@
package com.apps.chillscreen.listener;
import com.apps.chillscreen.bean.Picture;
public interface CardClickListener {
void onDetailClick(Picture picture);
default void onHomeClick(String name){}
}

View File

@ -0,0 +1,5 @@
package com.apps.chillscreen.listener;
public interface ShowFragmentListener {
void onSelectType(int type);
}

View File

@ -0,0 +1,75 @@
package com.apps.chillscreen.tool;
import androidx.annotation.NonNull;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Logger;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
public class DownloadUtils {
private static final Logger LOGGER=Logger.getLogger(DownloadUtils.class.getName());
public interface DownloadCallback{
void onResult(boolean success, InputStream inputStream);
}
public static Call downloadFile(String url, String savePath, DownloadCallback callback){
OkHttpClient client=new OkHttpClient();
Request request=new Request.Builder().url(url).build();
Call call=client.newCall(request);
call.enqueue(new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
LOGGER.severe("Download failed: " + e.getMessage());
callback.onResult(false,null);
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {
try(ResponseBody responseBody=response.body()){
if(responseBody!=null){
InputStream inputStream=responseBody.byteStream();
boolean writeSuccess=writeFile(inputStream,savePath);
callback.onResult(writeSuccess,inputStream);
}else{
LOGGER.warning("Empty response body");
callback.onResult(false,null);
}
}catch (Exception e){
LOGGER.severe("Error processing response: " + e.getMessage());
callback.onResult(false,null);
}
}
});
return call;
}
private static boolean writeFile(InputStream inputStream,String filePath){
File file=new File(filePath);
try {
File parent=file.getParentFile();
if(parent!=null&&!parent.exists()){
parent.mkdirs();
}
try(FileOutputStream fos=new FileOutputStream(file)) {
byte[] buffer=new byte[4096];
int byteRead;
while ((byteRead=inputStream.read(buffer))!=-1){
fos.write(buffer,0,byteRead);
}
return true;
}
}catch (Exception e){
LOGGER.severe("File write error: " + e.getMessage());
return false;
}
}
}

View File

@ -0,0 +1,70 @@
package com.apps.chillscreen.tool
import android.content.Context
import com.apps.chillscreen.bean.Picture
import org.json.JSONArray
import org.json.JSONObject
object JsonConvert {
fun getData(dataResource: String, category: String): MutableList<Picture> {
val jsonArray = JSONArray(dataResource)
var pictures = mutableListOf<Picture>()
var eachItem: JSONObject
var _description: String
var links: JSONObject
var download: String
var urls: JSONObject
var regular: String
var small: String
var thumb: String
var user: JSONObject
var name: String
var headerLarge: String
var userHtml: String
val host = "https://unsplash.com/photos/"
var picture: Picture
var mid: String
for (i in 0 until jsonArray.length()) {
eachItem = jsonArray.getJSONObject(i)
_description = eachItem.getString("alt_description")
links = eachItem.getJSONObject("links")
download = links.getString("download")
urls = eachItem.getJSONObject("urls")
regular = urls.getString("regular")
small = urls.getString("small")
thumb = urls.getString("thumb")
user = eachItem.getJSONObject("user")
name = user.getString("name")
headerLarge = user.getString("header_large")
userHtml = user.getString("authorHtml")
mid = download.substring(host.length, download.indexOf("/download"))
picture = Picture().apply {
imId = mid
categoryName = category
description = _description
fullUrl = download
previewUrl1080 = regular
previewUrl400 = small
previewUrl200 = thumb
authorName = name
authorHeader = headerLarge
authorHtml = userHtml
}
PictureManager.addPicture(picture)
pictures.add(picture)
}
return pictures
}
fun getSaveFilePath(context: Context, imId: String): String {
return "${context.cacheDir}/${imId}.jpg"
}
}

View File

@ -0,0 +1,151 @@
package com.apps.chillscreen.tool;
import android.Manifest;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import androidx.core.app.ActivityCompat;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.Reader;
import java.nio.Buffer;
import java.nio.charset.StandardCharsets;
import io.objectbox.flatbuffers.Utf8;
public class OpenUtil {
public static String getConvert(InputStream inputStream){
String covertStr="";
try {
StringBuilder stringBuilder=new StringBuilder();
char [] buffer=new char[8192];
Reader reader=new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
int a=0;
while ((a=reader.read(buffer))!=-1){
stringBuilder.append(buffer,0,a);
}
covertStr=stringBuilder.toString();
} catch (IOException e) {
return covertStr;
}
return covertStr;
}
public static void initFull(Activity activity) {
Window window = activity.getWindow();
View decorView = window.getDecorView();
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
public static int dpToPx(Context context, float dp) {
float density = context.getResources().getDisplayMetrics().density;
return (int) (dp * density);
}
public static boolean requestPermission(Activity context, int requestCode) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
return true;
}
if (context.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(
context,
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
requestCode
);
return false;
} else {
return true;
}
}
public static Uri saveToGallery(Context context, File file){
String name=System.currentTimeMillis()+".jpg";
ContentValues contentValues=new ContentValues();
contentValues.put(MediaStore.Images.Media.DISPLAY_NAME,name);
contentValues.put(MediaStore.Images.Media.MIME_TYPE,"image/jpeg");
if(Build.VERSION.SDK_INT>Build.VERSION_CODES.Q){
contentValues.put(MediaStore.Images.Media.IS_PENDING,1);
}
Uri uri;
if(Build.VERSION.SDK_INT>Build.VERSION_CODES.Q){
uri=MediaStore.Images.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY);
}else{
uri=MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
}
ContentResolver contentResolver=context.getContentResolver();
Uri imgUri=contentResolver.insert(uri,contentValues);
if(imgUri==null){
Log.d("MediaSaver", "Failed to create media entry");
return null;
}
try(OutputStream outputStream=contentResolver.openOutputStream(imgUri);
InputStream inputStream=new FileInputStream(file)
){
if (outputStream == null) {
Log.d("MediaSaver", "Failed to open output stream");
return null;
}
byte[] buffer=new byte[4096];
int bytesRead;
while ((bytesRead=inputStream.read(buffer))!=-1){
outputStream.write(buffer,0,bytesRead);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
contentValues.clear();
contentValues.put(MediaStore.Images.Media.IS_PENDING, 0);
contentResolver.update(imgUri, contentValues, null, null);
}
return imgUri;
} catch (IOException e) {
Log.e("MediaSaver", "Error saving image to gallery", e);
// 发生错误时删除创建的文件记录
try {
contentResolver.delete(imgUri, null, null);
} catch (Exception deleteEx) {
Log.e("MediaSaver", "Failed to delete failed media entry", deleteEx);
}
return null;
}
}
}

View File

@ -0,0 +1,108 @@
package com.apps.chillscreen.tool;
import android.content.Context;
import android.util.Log;
import com.apps.chillscreen.bean.MyObjectBox;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.bean.Picture_;
import com.apps.chillscreen.listener.BookmarkListener;
import java.util.List;
import io.objectbox.Box;
import io.objectbox.BoxStore;
import io.objectbox.query.Query;
import io.objectbox.query.QueryBuilder;
import io.objectbox.reactive.DataSubscription;
import io.objectbox.reactive.DataSubscriptionList;
public class PictureManager {
private static BoxStore boxStore;
private static Box<Picture> boxPicture;
public static void init(Context context) {
boxStore = MyObjectBox.builder().androidContext(context).build();
}
private static Box<Picture> getBoxPicture() {
if (boxPicture == null) {
boxPicture = boxStore.boxFor(Picture.class);
}
return boxPicture;
}
public static void addPicture(Picture picture) {
Box<Picture> boxPictureNow = getBoxPicture();
String imId = picture.getImId();
Picture first = boxPictureNow.query().equal(Picture_.imId, imId, QueryBuilder.StringOrder.CASE_SENSITIVE).build().findFirst();
if (first == null) {
Log.d("YYYYYY", "add picture id:" + imId);
boxPictureNow.put(picture);
} else {
Log.d("YYYYYY", "picture exist");
}
}
public static List<Picture> queryCover(String name) {
Box<Picture> box = getBoxPicture();
List<Picture> cover = box.query().equal(Picture_.categoryName, name, QueryBuilder.StringOrder.CASE_SENSITIVE).build().find(13, 1);
Log.d("YYYYYY", "name is" + name + "cover is" + cover.get(0).getFullUrl());
return cover;
}
public static DataSubscription setCollectListener(BookmarkListener listener) {
Query<Picture> build = getBoxPicture().query()
.equal(Picture_.isLike, true).build();
//当调用 subscribe() ObjectBox 会立即执行一次基础查询
return build.subscribe(new DataSubscriptionList()).observer(data -> {
Log.d("YYYYYY", "data size:" + data.size());
listener.onCollectList(data);
});
}
public static List<Picture> queryEachGenera(String name) {
Box<Picture> box = getBoxPicture();
List<Picture> pictures = box.query().equal(Picture_.categoryName, name, QueryBuilder.StringOrder.CASE_SENSITIVE).build().find();
return pictures;
}
public static void updateCollect(Picture picture) {
Box<Picture> box = getBoxPicture();
box.put(picture);
}
public static boolean queryIsLike(String imId) {
Box<Picture> box = getBoxPicture();
Picture first = box.query()
.equal(Picture_.imId, imId, QueryBuilder.StringOrder.CASE_SENSITIVE)
.build()
.findFirst();
if (first != null && first.isLike()) {
return true;
} else {
return false;
}
}
public static List<Picture> search(String name) {
Box<Picture> box = getBoxPicture();
List<Picture> picture = box.query().contains(Picture_.description, name, QueryBuilder.StringOrder.CASE_SENSITIVE).build().find();
return picture;
}
public static void insertOrUpdateDownload(Picture picture){
Box<Picture> box=getBoxPicture();
Picture first = box.query().equal(Picture_.imId, picture.getImId(), QueryBuilder.StringOrder.CASE_SENSITIVE).build().findFirst();
if(first==null){
picture.setDownload(true);
box.put(picture);
Log.d("download","insert a picture");
} else if (!first.isDownload()) {
first.setDownload(true);
box.put(first);
Log.d("download","update a picture");
}
}
}

View File

@ -0,0 +1,140 @@
package com.apps.chillscreen.uiView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import com.apps.chillscreen.R;
import com.apps.chillscreen.databinding.ActivityBaseBinding;
public class BaseActivity extends AppCompatActivity {
ActivityBaseBinding binding;
private boolean isFragmentTransitionRunning = false;
private long lastClickTime = 0;
private static final long CLICK_THROTTLE = 300; // 300毫秒内不处理重复点击
// 缓存Fragment实例
private Fragment homeFragment;
private Fragment collectFragment;
private Fragment currentFragment;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityBaseBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
initFragments();
init();
if (savedInstanceState == null) {
showInitialFragment();
}
}
private void showInitialFragment() {
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(binding.fragmentIn.getId(), homeFragment);
currentFragment = homeFragment;
transaction.commit();
// 更新UI状态
updateTab(0);
}
private void initFragments() {
homeFragment = new DiscoverFragment();
collectFragment = new BookmarkShowFragment();
currentFragment = homeFragment;
}
private void init() {
// 初始加载HomeFragment
switchFragment(0);
binding.llHome.setOnClickListener(v -> {
if (System.currentTimeMillis() - lastClickTime > CLICK_THROTTLE) {
switchFragment(0);
lastClickTime = System.currentTimeMillis();
}
});
binding.llLike.setOnClickListener(v -> {
if (System.currentTimeMillis() - lastClickTime > CLICK_THROTTLE) {
switchFragment(1);
lastClickTime = System.currentTimeMillis();
}
});
binding.llBottom.setOnClickListener(v -> {});
binding.imgSearch.setOnClickListener(v -> {
Intent intent=new Intent(this,ExploreActivity.class);
startActivity(intent);
});
}
private void switchFragment(int position) {
if (isFragmentTransitionRunning) {
return;
}
Fragment targetFragment = null;
switch (position) {
case 0:
if (currentFragment instanceof DiscoverFragment) return;
targetFragment = homeFragment;
break;
case 1:
if (currentFragment instanceof BookmarkShowFragment) return;
targetFragment = collectFragment;
break;
}
if (targetFragment == null || binding.fragmentIn.getId() == View.NO_ID) {
return;
}
updateTab(position);
isFragmentTransitionRunning = true;
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.setCustomAnimations(
android.R.anim.fade_in,
android.R.anim.fade_out
);
// 检查Fragment是否已经添加
if (targetFragment.isAdded()) {
transaction.show(targetFragment);
} else {
transaction.add(binding.fragmentIn.getId(), targetFragment);
}
// 隐藏当前Fragment
if (currentFragment != null && currentFragment.isAdded()) {
transaction.hide(currentFragment);
}
currentFragment = targetFragment;
transaction.runOnCommit(() -> isFragmentTransitionRunning = false);
transaction.commit();
}
private void updateTab(int position) {
binding.imgHome.setSelected(false);
binding.imgLike.setSelected(false);
binding.tvStart.setTextColor(getResources().getColor(R.color.no_select, getTheme()));
binding.tvEnd.setTextColor(getResources().getColor(R.color.no_select, getTheme()));
switch (position) {
case 0:
binding.imgHome.setSelected(true);
binding.tvStart.setTextColor(getResources().getColor(R.color.title, getTheme()));
break;
case 1:
binding.imgLike.setSelected(true);
binding.tvEnd.setTextColor(getResources().getColor(R.color.title, getTheme()));
break;
}
}
}

View File

@ -0,0 +1,304 @@
package com.apps.chillscreen.uiView;
import android.app.WallpaperManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import com.apps.chillscreen.R;
import com.apps.chillscreen.adapter.BookMarkAdapter;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.FragmentBookmarkBinding;
import com.apps.chillscreen.listener.BookmarkClickListener;
import com.apps.chillscreen.listener.ShowFragmentListener;
import com.apps.chillscreen.tool.PictureManager;
import com.apps.chillscreen.tool.DownloadUtils;
import com.apps.chillscreen.tool.JsonConvert;
import com.apps.chillscreen.tool.OpenUtil;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.objectbox.reactive.DataSubscription;
import okhttp3.Call;
public class BookmarkShowFragment extends Fragment implements BookmarkClickListener, ShowFragmentListener {
FragmentBookmarkBinding binding;
private BookMarkAdapter bookMarkAdapter;
private DataSubscription dataSubscription;
private Map<String, File> downloadMap = new HashMap<>();
private String fullUrl;
private boolean isDown = false;
private String savePath;
private Call call;
private Picture currentPicture;
private boolean isSetting;
private SetPaperFragment setPaperFragment;
private WallpaperManager wallpaperManager;
private volatile boolean isUpdating = false;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
binding = FragmentBookmarkBinding.inflate(getLayoutInflater(), container, false);
init();
return binding.getRoot();
}
@Override
public void onDestroyView() {
super.onDestroyView();
if (dataSubscription != null) {
dataSubscription.cancel();
}
if (call != null) {
call.cancel();
}
deleteCacheFiles();
}
private void init() {
bookMarkAdapter = new BookMarkAdapter();
wallpaperManager = WallpaperManager.getInstance(requireActivity());
setListener();
bookMarkAdapter.setClickListener(this);
binding.viewPager.setAdapter(bookMarkAdapter);
binding.viewPager.setOffscreenPageLimit(1);
setTransform();
binding.viewPager.setCurrentItem(0);
}
private void setListener() {
dataSubscription = PictureManager.setCollectListener(pictures -> {
if (isUpdating) return;
requireActivity().runOnUiThread(() -> {
isUpdating = true;
try {
updateUIState(pictures);
} finally {
isUpdating = false;
}
});
});
}
private void updateUIState(List<Picture> pictures) {
if (pictures.isEmpty()) {
binding.layoutNoData.setVisibility(View.VISIBLE);
binding.viewPager.setVisibility(View.GONE);
} else {
binding.layoutNoData.setVisibility(View.GONE);
binding.viewPager.setVisibility(View.VISIBLE);
// 安全更新数据
bookMarkAdapter.setPicture(new ArrayList<>(pictures));
bookMarkAdapter.notifyDataSetChanged();
// 确保当前项有效
int currentItem = binding.viewPager.getCurrentItem();
if (currentItem >= pictures.size()) {
binding.viewPager.setCurrentItem(Math.max(0, pictures.size() - 1), false);
}
}
}
private void setTransform() {
binding.viewPager.setPageTransformer(((page, position) -> {
if (page.getWidth() == 0) return;
float scaleNum = 0.8f;
float transX = page.getWidth() * -position * (1 - scaleNum);
if (position < -1) {
page.setScaleX(scaleNum);
page.setScaleY(scaleNum);
page.setTranslationX(transX);
} else if (position <= 1) {
float scale = 1 - (float) Math.pow(Math.abs(position), 2) * (1 - scaleNum);
page.setScaleX(scale);
page.setScaleY(scale);
page.setTranslationX(transX);
} else {
page.setScaleX(scaleNum);
page.setScaleY(scaleNum);
page.setTranslationX(transX);
}
}));
}
@Override
public void onSetClick(Picture picture, int position) {
if (isSetting) return;
currentPicture=picture;
fullUrl = picture.getFullUrl();
String id = picture.getImId();
savePath = JsonConvert.INSTANCE.getSaveFilePath(requireActivity(), id);
if (setPaperFragment == null) {
setPaperFragment = new SetPaperFragment();
setPaperFragment.setListener(this);
}
if (!setPaperFragment.isAdded()) {
setPaperFragment.show(requireActivity().getSupportFragmentManager(), "");
}
}
@Override
public void onDownloadClick(Picture picture, int position) {
int permissionCode = 1;
boolean permission = OpenUtil.requestPermission(requireActivity(), permissionCode);
if (!permission) return;
if (isDown) {
Toast.makeText(requireActivity(), "Downloading, please wait...", Toast.LENGTH_SHORT).show();
return;
}
isDown = true;
fullUrl = picture.getFullUrl();
String id = picture.getImId();
currentPicture = picture;
savePath = JsonConvert.INSTANCE.getSaveFilePath(requireActivity(), id);
binding.searchPb.setVisibility(View.VISIBLE);
if (downloadMap.get(id) != null) {
File file = downloadMap.get(id);
save(file);
return;
}
startDownload(picture);
}
private void save(File file) {
PictureManager.insertOrUpdateDownload(currentPicture);
Uri uri = OpenUtil.saveToGallery(requireActivity(), file);
requireActivity().runOnUiThread(() -> {
binding.searchPb.setVisibility(View.GONE);
isDown = false;
if (uri == null) {
Toast.makeText(requireActivity(), getString(R.string.save_fail), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(requireActivity(), getString(R.string.save_success), Toast.LENGTH_SHORT).show();
}
});
}
private void startDownload(Picture picture) {
call = DownloadUtils.downloadFile(fullUrl, savePath, (isSuccess, inputStream) -> {
File file = new File(savePath);
if (isSuccess) {
if (file.exists()) {
downloadMap.put(picture.getImId(), file);
save(file);
}
} else {
requireActivity().runOnUiThread(() -> {
binding.searchPb.setVisibility(View.GONE);
Toast.makeText(requireActivity(), getString(R.string.download_fail), Toast.LENGTH_SHORT).show();
});
}
});
}
@Override
public void onRemoveClick(int position) {
// 只操作数据库UI更新交给监听器
Picture pictureToRemove = bookMarkAdapter.getPictureAt(position);
if (pictureToRemove != null) {
PictureManager.updateCollect(pictureToRemove);
}
}
@Override
public void onSelectType(int type) {
binding.searchPb.setVisibility(View.VISIBLE);
isSetting=true;
File downloadFile = downloadMap.get(currentPicture.getImId());
if (downloadFile != null && downloadFile.exists()) {
new Thread(() -> {
Log.d("YYYYYY", "skip download and set");
setWallPaper(downloadFile, type);
}).start();
} else {
call = DownloadUtils.downloadFile(fullUrl, savePath, (isSuccess, inputStream) -> {
File file = new File(savePath);
if (file.exists() && isSuccess) {
downloadMap.put(currentPicture.getImId(), file);
setWallPaper(downloadFile, type);
} else {
requireActivity().runOnUiThread(() -> {
isSetting=false;
binding.searchPb.setVisibility(View.GONE);
Toast.makeText(requireActivity(), getString(R.string.set_fail), Toast.LENGTH_SHORT).show();
});
}
});
}
}
private void setWallPaper(File downloadFile, int type) {
try {
FileInputStream fileInputStream = new FileInputStream(downloadFile);
switch (type) {
case SetPaperFragment.type_home:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
wallpaperManager.setStream(fileInputStream);
} else {
wallpaperManager.setStream(fileInputStream, null, true, WallpaperManager.FLAG_SYSTEM);
}
break;
case SetPaperFragment.type_lock:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
wallpaperManager.setStream(fileInputStream);
} else {
wallpaperManager.setStream(fileInputStream, null, true, WallpaperManager.FLAG_LOCK);
}
break;
case SetPaperFragment.type_both:
wallpaperManager.setStream(fileInputStream);
break;
}
requireActivity().runOnUiThread(() -> {
isSetting=false;
binding.searchPb.setVisibility(View.GONE);
Toast.makeText(requireActivity(),
getString(R.string.set_success),
Toast.LENGTH_SHORT).show();
});
} catch (Exception e) {
requireActivity().runOnUiThread(() -> {
isSetting=false;
binding.searchPb.setVisibility(View.GONE);
Toast.makeText(requireActivity(),
getString(R.string.set_fail),
Toast.LENGTH_SHORT).show();
});
}
}
private void deleteCacheFiles() {
for (File file : downloadMap.values()) {
if (file != null && file.exists()) {
boolean deleted = file.delete();
if (!deleted) {
Log.d("YYYYYY", "Failed to delete: " + file.getAbsolutePath());
}
}
}
downloadMap.clear();
}
}

View File

@ -0,0 +1,61 @@
package com.apps.chillscreen.uiView;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.apps.chillscreen.BaseApplication;
import com.apps.chillscreen.adapter.DiscoverAdapter;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.FragmentDiscoverBinding;
import com.apps.chillscreen.listener.CardClickListener;
import java.util.List;
public class DiscoverFragment extends Fragment implements CardClickListener {
FragmentDiscoverBinding binding;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
binding = FragmentDiscoverBinding.inflate(getLayoutInflater(), container, false);
init();
return binding.getRoot();
}
private void init() {
List<String> categoryList = BaseApplication.getCategoryList();
DiscoverAdapter discoverAdapter =new DiscoverAdapter();
discoverAdapter.setPictures(categoryList);
discoverAdapter.setClickListener(this);
GridLayoutManager layoutManager=new GridLayoutManager(requireContext(),2);
binding.rlStart.setLayoutManager(layoutManager);
binding.rlStart.setAdapter(discoverAdapter);
}
@Override
public void onDetailClick(Picture picture) {
}
@Override
public void onHomeClick(String name) {
Intent intent=new Intent(requireActivity(), GeneraActivity.class);
intent.putExtra(GeneraActivity.name,name);
startActivity(intent);
}
}

View File

@ -0,0 +1,127 @@
package com.apps.chillscreen.uiView;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import com.apps.chillscreen.R;
import com.apps.chillscreen.adapter.GirdAdapter;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.ActivityExploreBinding;
import com.apps.chillscreen.listener.CardClickListener;
import com.apps.chillscreen.tool.PictureManager;
import java.util.ArrayList;
import java.util.List;
public class ExploreActivity extends AppCompatActivity implements CardClickListener {
ActivityExploreBinding binding;
GirdAdapter girdAdapter;
private String searchKey="";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding=ActivityExploreBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
init();
}
@Override
protected void onResume() {
super.onResume();
Log.d("YYYYYYY", "onResume is start");
startSearch(false);
}
private void init(){
girdAdapter=new GirdAdapter();
girdAdapter.setPictureList(new ArrayList<>());
girdAdapter.setClickListener(this);
GridLayoutManager gridLayoutManager=new GridLayoutManager(this,3);
binding.resultRecycler.setLayoutManager(gridLayoutManager);
binding.resultRecycler.setAdapter(girdAdapter);
binding.imgBack.setOnClickListener(v -> finish());
binding.btnSearch.setOnClickListener(v -> startSearch(true));
binding.et.setOnEditorActionListener((v, actionId, event) -> {
if (actionId == EditorInfo.IME_ACTION_SEARCH||actionId==EditorInfo.IME_ACTION_DONE) {
startSearch(true);
return true;
}
return false;
});
binding.et.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
searchKey=s.toString().trim();
binding.btnSearch.setSelected(!searchKey.isEmpty());
}
@Override
public void afterTextChanged(Editable s) {
}
});
}
private void startSearch(boolean afterClick){
closeKeyboard();
if (afterClick) {
binding.searchPb.setVisibility(View.VISIBLE);
}
String string = binding.et.getText().toString();
if (!string.isEmpty()) {
List<Picture> result = PictureManager.search(string);
if (!result.isEmpty()) {
showEmpty(false);
girdAdapter.setPictureList(result);
binding.searchPb.setVisibility(View.GONE);
} else {
binding.searchPb.setVisibility(View.GONE);
showEmpty(true);
}
Log.d("YYYYYY", "--------------size=" + result.size());
for (Picture data : result) {
Log.d("YYYYYY", "--------------data=" + data.getDescription());
}
} else {
if (afterClick) {
binding.searchPb.setVisibility(View.GONE);
Toast.makeText(ExploreActivity.this, getString(R.string.please_enter), Toast.LENGTH_SHORT).show();
}
}
}
private void closeKeyboard() {
InputMethodManager imm = (InputMethodManager) ExploreActivity.this.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(binding.et.getWindowToken(), 0);
}
private void showEmpty(boolean showEmpty) {
if (showEmpty) {
binding.emptyLayout.setVisibility(View.VISIBLE);
binding.resultRecycler.setVisibility(View.GONE);
} else {
binding.emptyLayout.setVisibility(View.GONE);
binding.resultRecycler.setVisibility(View.VISIBLE);
}
}
@Override
public void onDetailClick(Picture picture) {
Intent intent = new Intent(ExploreActivity.this, ExtendedInfoActivity.class);
intent.putExtra(ExtendedInfoActivity.pictureKey, picture);
startActivity(intent);
}
}

View File

@ -0,0 +1,240 @@
package com.apps.chillscreen.uiView;
import android.app.WallpaperManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.apps.chillscreen.R;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.ActivityExtendInfoBinding;
import com.apps.chillscreen.listener.ShowFragmentListener;
import com.apps.chillscreen.tool.PictureManager;
import com.apps.chillscreen.tool.DownloadUtils;
import com.apps.chillscreen.tool.JsonConvert;
import com.apps.chillscreen.tool.OpenUtil;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.request.RequestOptions;
import java.io.File;
import java.io.FileInputStream;
import okhttp3.Call;
public class ExtendedInfoActivity extends AppCompatActivity implements ShowFragmentListener {
ActivityExtendInfoBinding binding;
private final int permissionCode = 1;
public static final String pictureKey = "picture";
private Picture picture;
private File downloadFile;
private String fullUrl;
private String mSavePath;
private Call call;
private SetPaperFragment setPaperFragment;
private WallpaperManager wallpaperManager;
private boolean isSetting=false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityExtendInfoBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
init();
}
@Override
public void onDestroy() {
super.onDestroy();
if (call != null) {
call.cancel();
}
deleteCacheFile();
}
private void init() {
picture = (Picture) getIntent().getSerializableExtra(pictureKey);
if (picture == null) return;
fullUrl = picture.getFullUrl();
mSavePath = JsonConvert.INSTANCE.getSaveFilePath(this, picture.getImId());
wallpaperManager = WallpaperManager.getInstance(this);
Glide.with(this)
.load(picture.getPreviewUrl1080())
.apply(new RequestOptions()
.format(DecodeFormat.PREFER_RGB_565))
.skipMemoryCache(true)
.thumbnail(
Glide.with(this)
.load(picture.getPreviewUrl400())
.apply(new RequestOptions()
.format(DecodeFormat.PREFER_RGB_565)
.centerCrop()
)
)
.into(binding.imageviewPreview);
binding.imageBack.setOnClickListener(v -> finish());
binding.tvContent.setText(picture.getDescription());
binding.imageFavorite.setOnClickListener(v -> setCollectStatus());
binding.imageDownload.setOnClickListener(v -> startDownLoad());
binding.layoutSet.setOnClickListener(v -> showSetDialog());
boolean b = PictureManager.queryIsLike(picture.getImId());
binding.imageFavorite.setSelected(b);
}
private void setCollectStatus() {
boolean like = picture.isLike();
picture.setLike(!like);
PictureManager.updateCollect(picture);
binding.imageFavorite.setSelected(!like);
}
private void startDownLoad() {
boolean b = OpenUtil.requestPermission(this, permissionCode);
if (!b) return;
showDownloadLoading(true);
if (downloadFile != null && downloadFile.exists()) {
save(downloadFile);
return;
}
getFilePath();
}
private void save(File file) {
Uri uri = OpenUtil.saveToGallery(this, file);
PictureManager.insertOrUpdateDownload(picture);
runOnUiThread(() -> {
showDownloadLoading(false);
if (uri == null) {
Toast.makeText(ExtendedInfoActivity.this, getString(R.string.save_fail), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(ExtendedInfoActivity.this, getString(R.string.save_success), Toast.LENGTH_SHORT).show();
}
Log.d("YYYYYY", "--------path=" + file.getAbsolutePath() + "---uri=" + uri);
});
}
private void getFilePath() {
call = DownloadUtils.downloadFile(fullUrl, mSavePath, (isSuccess, inputStream) -> {
File file = new File(mSavePath);
if (file.exists() && isSuccess) {
downloadFile = file;
save(file);
} else {
runOnUiThread(() -> {
showDownloadLoading(false);
Toast.makeText(ExtendedInfoActivity.this, getString(R.string.download_fail), Toast.LENGTH_SHORT).show();
});
}
});
}
private void showSetDialog() {
if(isSetting) return;
if (setPaperFragment == null) {
setPaperFragment = new SetPaperFragment();
setPaperFragment.setListener(ExtendedInfoActivity.this);
}
if (!setPaperFragment.isAdded()) {
setPaperFragment.show(getSupportFragmentManager(), "");
}
}
private void showDownloadLoading(boolean show) {
if (show) {
binding.pbDownload.setVisibility(View.VISIBLE);
binding.imageDownload.setVisibility(View.GONE);
} else {
binding.pbDownload.setVisibility(View.GONE);
binding.imageDownload.setVisibility(View.VISIBLE);
}
}
private void showSetWallpaperLoading(boolean show) {
Log.d("YYYYYY", "-----------showSetWallpaperLoading" + show);
if (show) {
isSetting=true;
binding.pbSet.setVisibility(View.VISIBLE);
binding.txApply.setVisibility(View.GONE);
binding.buttonSet.setVisibility(View.GONE);
} else {
isSetting=false;
binding.pbSet.setVisibility(View.GONE);
binding.txApply.setVisibility(View.VISIBLE);
binding.buttonSet.setVisibility(View.VISIBLE);
}
}
@Override
public void onSelectType(int type) {
showSetWallpaperLoading(true);
if (downloadFile != null&&downloadFile.exists()) {
new Thread(() -> {
Log.d("YYYYYY", "skip download and set");
setWallPaper(downloadFile, type);
}).start();
} else {
call = DownloadUtils.downloadFile(fullUrl, mSavePath, (isSuccess, inputStream) -> {
File file = new File(mSavePath);
if (file.exists() && isSuccess) {
downloadFile = file;
setWallPaper(downloadFile, type);
} else {
runOnUiThread(() -> {
showSetWallpaperLoading(false);
Toast.makeText(ExtendedInfoActivity.this, getString(R.string.set_fail), Toast.LENGTH_SHORT).show();
});
}
});
}
}
private void setWallPaper(File file, int type) {
try {
FileInputStream fileInputStream = new FileInputStream(file);
switch (type) {
case SetPaperFragment.type_home:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
wallpaperManager.setStream(fileInputStream);
} else {
wallpaperManager.setStream(fileInputStream, null, true, WallpaperManager.FLAG_SYSTEM);
}
break;
case SetPaperFragment.type_lock:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
wallpaperManager.setStream(fileInputStream);
} else {
wallpaperManager.setStream(fileInputStream, null, true, WallpaperManager.FLAG_LOCK);
}
break;
case SetPaperFragment.type_both:
wallpaperManager.setStream(fileInputStream);
break;
}
runOnUiThread(() -> {
showSetWallpaperLoading(false);
Toast.makeText(ExtendedInfoActivity.this,
getString(R.string.set_success),
Toast.LENGTH_SHORT).show();
});
} catch(Exception e){
runOnUiThread(()->{
showSetWallpaperLoading(false);
Toast.makeText(ExtendedInfoActivity.this,
getString(R.string.set_fail),
Toast.LENGTH_SHORT).show();
});
}
}
private void deleteCacheFile() {
if (downloadFile != null && downloadFile.exists()) {
boolean delete = downloadFile.delete();
Log.d("YYYYYY", "--------delete=" + delete);
}
}
}

View File

@ -0,0 +1,47 @@
package com.apps.chillscreen.uiView;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import com.apps.chillscreen.adapter.GirdAdapter;
import com.apps.chillscreen.bean.Picture;
import com.apps.chillscreen.databinding.ActivityGenerBinding;
import com.apps.chillscreen.listener.CardClickListener;
import com.apps.chillscreen.tool.PictureManager;
import java.util.List;
public class GeneraActivity extends AppCompatActivity implements CardClickListener {
ActivityGenerBinding binding;
static String name="name";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding=ActivityGenerBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
init();
}
private void init(){
name = getIntent().getStringExtra(name);
List<Picture> pictures = PictureManager.queryEachGenera(name);
GirdAdapter adapter=new GirdAdapter();
adapter.setPictureList(pictures);
adapter.setClickListener(this);
GridLayoutManager gridLayoutManager=new GridLayoutManager(this,3);
binding.list.setLayoutManager(gridLayoutManager);
binding.list.setAdapter(adapter);
binding.name.setText(name);
binding.imageBack.setOnClickListener(v -> finish());
}
@Override
public void onDetailClick(Picture picture) {
Intent intent=new Intent(this, ExtendedInfoActivity.class);
intent.putExtra(ExtendedInfoActivity.pictureKey,picture);
startActivity(intent);
}
}

View File

@ -0,0 +1,49 @@
package com.apps.chillscreen.uiView;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import androidx.appcompat.app.AppCompatActivity;
import com.apps.chillscreen.databinding.ActivityLaunchBinding;
public class LaunchActivity extends AppCompatActivity {
ActivityLaunchBinding binding;
Handler handler=new Handler();
CountDownTimer countDownTimer;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding=ActivityLaunchBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
handler.postDelayed(() -> {
Intent intent = new Intent(LaunchActivity.this, BaseActivity.class);
startActivity(intent);
finish();
}, 4000);
countDownTimer=new CountDownTimer(4000, 100) {
public void onTick(long millisUntilFinished) {
int progress = (int) ((4000 - millisUntilFinished) / 4000f * 100);
binding.progressbar.setProgress(progress);
}
public void onFinish() {
binding.progressbar.setProgress(100);
}
}.start();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
if (countDownTimer != null) {
countDownTimer.cancel();
}
}
}

View File

@ -0,0 +1,100 @@
package com.apps.chillscreen.uiView;
import android.app.Dialog;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import com.apps.chillscreen.R;
import com.apps.chillscreen.databinding.FragmentSetPaperBinding;
import com.apps.chillscreen.listener.ShowFragmentListener;
import java.util.Objects;
public class SetPaperFragment extends DialogFragment {
private FragmentSetPaperBinding vb;
private ShowFragmentListener listener;
public static final int type_home =0;
public static final int type_lock =1;
public static final int type_both =2;
public void setListener(ShowFragmentListener listener) {
this.listener = listener;
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
vb = FragmentSetPaperBinding.inflate(getLayoutInflater());
init();
return vb.getRoot();
}
@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
// 设置自定义样式
Objects.requireNonNull(dialog.getWindow()).requestFeature(android.view.Window.FEATURE_NO_TITLE);
dialog.getWindow().setWindowAnimations(R.style.BottomSheetDialogStyle);
// 调整对话框布局参数使其从底部弹起
dialog.getWindow().setLayout(
android.view.ViewGroup.LayoutParams.MATCH_PARENT,
android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
dialog.getWindow().setGravity(android.view.Gravity.BOTTOM);
return dialog;
}
@Override
public void onStart() {
super.onStart();
Dialog dialog = getDialog();
if (dialog != null) {
dialog.setCanceledOnTouchOutside(true);
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT);
}
}
}
private void init(){
vb.layoutHome.setOnClickListener(v -> {
if(listener!= null){
listener.onSelectType(type_home);
dismiss();
}
});
vb.layoutLock.setOnClickListener(v -> {
if(listener!= null){
listener.onSelectType(type_lock);
dismiss();
}
});
vb.layoutBoth.setOnClickListener(v -> {
if(listener!= null){
listener.onSelectType(type_both);
dismiss();
}
});
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="0%"
android:toYDelta="100%"
android:duration="300"/>
</set>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="100%"
android:toYDelta="0%"
android:duration="300"/>
</set>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#33808080"/>
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ffffff" />
<corners android:topLeftRadius="16dp" android:topRightRadius="16dp"/>
</shape>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#99FFFFFF"
android:endColor="#FFFFFFFF"
android:angle="270"
android:type="linear" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#FFC0CB"
android:endColor="#ffffff"
android:angle="0"
android:type="linear" />
<corners android:radius="25dp"/>
</shape>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M667.8,117.3C832.9,117.3 938.7,249.7 938.7,427.9c0,138.3 -125.1,290.5 -371.6,461.6a96.8,96.8 0,0 1,-110.2 0C210.4,718.4 85.3,566.1 85.3,427.9 85.3,249.7 191.1,117.3 356.2,117.3c59.6,0 100.1,20.8 155.8,68.1C567.7,138.2 608.2,117.3 667.8,117.3z"
android:fillColor="#C03B3B"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M704,128C833.6,128 938.7,234.7 938.7,384c0,298.7 -320,469.3 -426.7,533.3C405.3,853.3 85.3,682.7 85.3,384c0,-149.3 106.7,-256 234.7,-256C399.4,128 469.3,170.7 512,213.3c42.7,-42.7 112.6,-85.3 192,-85.3zM551.9,793.8a1141.4,1141.4 0,0 0,103.3 -72.6C782.3,620.1 853.3,509.6 853.3,384c0,-100.7 -65.6,-170.7 -149.3,-170.7 -45.9,0 -95.6,24.3 -131.7,60.3L512,334l-60.3,-60.3C415.6,237.7 365.9,213.3 320,213.3 237.2,213.3 170.7,284 170.7,384c0,125.6 71.1,236.1 198.2,337.2 31.8,25.3 65.7,48.9 103.3,72.5 12.8,8.1 25.4,15.8 39.9,24.4 14.5,-8.6 27.1,-16.3 39.9,-24.4z"
android:fillColor="@color/white"/>
</vector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M747.2,283.2L54.5,283.2v692.7h692.7v-692.7zM656.8,373.6v512h-512v-512h512z"
android:fillColor="@color/black"/>
<path
android:pathData="M993.3,12.4v692.7h-287.2v-90.4h196.8v-512h-512v224.4h-90.4V12.4z"
android:fillColor="@color/black"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M878.6,337.2a57.8,57.8 0,0 0,-81.7 0L574.6,559.5V173a57.8,57.8 0,0 0,-115.6 0v386.5L236.8,337.2a57.8,57.8 0,0 0,-81.7 0,57.8 57.8,0 0,0 0,81.8l318.7,318.7a57.6,57.6 0,0 0,40.9 16.9c0.7,0 1.5,-0.1 2.2,-0.1 0.7,0 1.5,0.1 2.2,0.1a57.6,57.6 0,0 0,40.9 -16.9L878.6,419a57.8,57.8 0,0 0,0 -81.8zM861,908.4H165.4a57.8,57.8 0,0 1,0 -115.6h695.6a57.8,57.8 0,0 1,0 115.6z"
android:fillColor="@color/white"/>
</vector>

View File

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="256dp"
android:height="256dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M219.8,71c-12.3,0 -21.8,-9.6 -21.8,-21.8S208.9,27.3 219.8,27.3c12.3,0 21.8,9.6 21.8,21.8 0,12.3 -9.6,21.8 -21.8,21.8zM219.8,34.1c-8.2,0 -15,6.8 -15,15s6.8,15 15,15c8.2,0 15,-6.8 15,-15 0,-8.2 -6.8,-15 -15,-15z"
android:strokeAlpha="0.3"
android:fillColor="#C9C7C7"
android:fillAlpha="0.3"/>
<path
android:pathData="M935.3,1009L112,1009c-4.1,0 -6.8,2.7 -6.8,6.8s2.7,6.8 6.8,6.8h823.3c4.1,0 6.8,-2.7 6.8,-6.8s-2.7,-6.8 -6.8,-6.8zM84.7,1009h-54.6c-4.1,0 -6.8,2.7 -6.8,6.8s2.7,6.8 6.8,6.8h54.6c4.1,0 6.8,-2.7 6.8,-6.8s-4.1,-6.8 -6.8,-6.8zM994,1009h-27.3c-4.1,0 -6.8,2.7 -6.8,6.8s2.7,6.8 6.8,6.8h27.3c4.1,0 6.8,-2.7 6.8,-6.8s-2.7,-6.8 -6.8,-6.8zM244.4,428.7c4.1,0 6.8,-2.7 6.8,-6.8L251.2,210.3h400v109.2L764.6,319.5l4.1,4.1v379.6c0,4.1 2.7,6.8 6.8,6.8s6.8,-2.7 6.8,-6.8L782.3,318.1l-8.2,-8.2c0,-1.4 -2.7,-4.1 -4.1,-4.1l-107.9,-107.9 -1.4,-1.4h-423.3v225.3c0,4.1 2.7,6.8 6.8,6.8zM663.6,305.8v-86l86,86h-86zM244.4,518.8c4.1,0 6.8,-2.7 6.8,-6.8v-64.2c0,-4.1 -2.7,-6.8 -6.8,-6.8s-6.8,2.7 -6.8,6.8v64.2c0,4.1 2.7,6.8 6.8,6.8zM244.4,558.4c4.1,0 6.8,-2.7 6.8,-6.8L251.2,532.5c0,-4.1 -2.7,-6.8 -6.8,-6.8s-6.8,2.7 -6.8,6.8v19.1c0,4.1 2.7,6.8 6.8,6.8zM782.3,740c0,-4.1 -2.7,-6.8 -6.8,-6.8s-6.8,2.7 -6.8,6.8v84.7L251.2,824.7L251.2,570.7c0,-4.1 -2.7,-6.8 -6.8,-6.8s-6.8,2.7 -6.8,6.8v267.6h544.8v-98.3z"
android:fillColor="#C9C7C7"/>
<path
android:pathData="M460.1,434.2c-4.1,-1.4 -6.8,1.4 -8.2,5.5 -2.7,15 -12.3,27.3 -24.6,32.8 -24.6,9.6 -58.7,-8.2 -58.7,-9.6 -2.7,-1.4 -6.8,-1.4 -9.6,2.7 -1.4,2.7 -1.4,6.8 2.7,9.6 15,8.2 31.4,13.7 49.2,13.7 6.8,0 15,-1.4 21.8,-4.1 17.7,-8.2 30,-23.2 32.8,-42.3 0,-4.1 -1.4,-8.2 -5.5,-8.2zM584.4,490.2c5.5,2.7 10.9,2.7 17.7,2.7 16.4,-1.4 31.4,-6.8 45.1,-16.4 2.7,-2.7 4.1,-6.8 1.4,-9.6 -2.7,-2.7 -5.5,-4.1 -9.6,-1.4 -19.1,12.3 -35.5,16.4 -49.2,10.9 -21.8,-8.2 -31.4,-39.6 -31.4,-39.6 -1.4,-4.1 -5.5,-5.5 -8.2,-4.1 -4.1,1.4 -5.5,4.1 -4.1,8.2 0,2.7 9.6,38.2 38.2,49.2zM462.8,617.1c1.4,-1.4 36.9,-34.1 81.9,4.1 1.4,1.4 2.7,1.4 4.1,1.4 4.1,0 6.8,-2.7 6.8,-6.8 0,-2.7 -1.4,-4.1 -2.7,-5.5 -56,-45.1 -99.7,-2.7 -101,-2.7 -2.7,2.7 -2.7,6.8 0,9.6s8.2,2.7 10.9,0zM909.3,148.8c12.3,0 21.8,-9.6 21.8,-21.8s-9.6,-21.8 -21.8,-21.8c-12.3,0 -21.8,9.6 -21.8,21.8 1.4,12.3 10.9,21.8 21.8,21.8zM909.3,113.3c8.2,0 15,6.8 15,15s-6.8,15 -15,15c-8.2,0 -15,-6.8 -15,-15 1.4,-8.2 8.2,-15 15,-15zM73.7,296.3l13.7,8.2 -6.8,13.7c-1.4,2.7 0,5.5 2.7,6.8 2.7,1.4 5.5,0 6.8,-2.7l5.5,-12.3 12.3,8.2c1.4,0 1.4,1.4 2.7,1.4 2.7,0 5.5,-2.7 5.5,-5.5 0,-1.4 -1.4,-4.1 -2.7,-4.1l-13.7,-8.2 6.8,-13.7c1.4,-2.7 0,-5.5 -2.7,-6.8 -2.7,-1.4 -5.5,0 -6.8,2.7l-6.8,12.3 -10.9,-9.6c-2.7,-1.4 -5.5,-1.4 -6.8,1.4 -2.7,2.7 -1.4,6.8 1.4,8.2zM957.1,475.1l-19.1,-10.9 8.2,-20.5c1.4,-4.1 0,-6.8 -4.1,-9.6s-6.8,0 -9.6,4.1l-8.2,19.1 -17.7,-9.6c-2.7,-1.4 -6.8,0 -9.6,2.7 -1.4,2.7 0,6.8 2.7,9.6l19.1,10.9 -8.2,20.5c-1.4,4.1 0,6.8 4.1,9.6s6.8,0 9.6,-4.1l8.2,-19.1 17.7,9.6c2.7,1.4 6.8,0 9.6,-2.7s0,-8.2 -2.7,-9.6z"
android:fillColor="#C9C7C7"/>
</vector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="256dp"
android:height="256dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M222.1,580.4a356.2,356.2 0,0 0,34.1 152.9,357.6 357.6,0 0,0 477.7,-477.7A357.6,357.6 0,0 0,222.1 580.4z"
android:fillColor="#00000000"/>
<path
android:pathData="M1009,936.6l-276.1,-276.1a409.5,409.5 0,1 0,-72.3 72.3l276.1,276.1a51.2,51.2 0,0 0,72.3 -72.3zM409.8,716.9a307.1,307.1 0,1 1,307.1 -307.1,307.1 307.1,0 0,1 -307.1,307.1z"
android:fillColor="#000000"/>
</vector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="256dp"
android:height="256dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M222.1,580.4a356.2,356.2 0,0 0,34.1 152.9,357.6 357.6,0 0,0 477.7,-477.7A357.6,357.6 0,0 0,222.1 580.4z"
android:fillColor="#00000000"/>
<path
android:pathData="M1009,936.6l-276.1,-276.1a409.5,409.5 0,1 0,-72.3 72.3l276.1,276.1a51.2,51.2 0,0 0,72.3 -72.3zM409.8,716.9a307.1,307.1 0,1 1,307.1 -307.1,307.1 307.1,0 0,1 -307.1,307.1z"
android:fillColor="#DCDCDC"/>
</vector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="256dp"
android:height="256dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M1009,936.6l-276.1,-276.1a409.5,409.5 0,1 0,-72.3 72.3l276.1,276.1a51.2,51.2 0,0 0,72.3 -72.3zM409.8,716.9a307.1,307.1 0,1 1,307.1 -307.1,307.1 307.1,0 0,1 -307.1,307.1z"
android:fillColor="#D3D3D3"/>
<path
android:pathData="M1009,936.6l-276.1,-276.1a409.5,409.5 0,1 0,-72.3 72.3l276.1,276.1a51.2,51.2 0,0 0,72.3 -72.3zM409.8,716.9a307.1,307.1 0,1 1,307.1 -307.1,307.1 307.1,0 0,1 -307.1,307.1z"
android:fillColor="#CD5C5C"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M154.5,469.3H981.3a42.7,42.7 0,1 1,0 85.3H154.5l300.7,266.9a42.7,42.7 0,1 1,-57.1 63.4l-384,-341.3a42.7,42.7 0,0 1,0 -63.4l384,-341.3a42.7,42.7 0,1 1,57.1 63.4L154.5,469.3z"
android:fillColor="@color/white"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="@color/black"
android:pathData="M426.9,683l170.8,0c25.6,0 42.7,-17.1 42.7,-42.7L640.3,512.3c0,-25.6 -17.1,-42.7 -42.7,-42.7l0,-42.7c0,-47 -38.4,-85.4 -85.4,-85.4s-85.4,38.4 -85.4,85.4l0,42.7c-25.6,0 -42.7,17.1 -42.7,42.7l0,128.1C384.2,666 401.3,683 426.9,683zM461,426.9c0,-29.9 21.3,-51.2 51.2,-51.2s51.2,21.3 51.2,51.2l0,42.7 -102.5,0L461,426.9 461,426.9zM725.7,42.7 L298.8,42.7c-47,0 -85.4,38.4 -85.4,85.4l0,768.4c0,47 38.4,85.4 85.4,85.4l426.9,0c47,0 85.4,-38.4 85.4,-85.4L811.1,128.1C811.1,81.1 772.7,42.7 725.7,42.7zM725.7,811.1 L298.8,811.1 298.8,213.4l426.9,0L725.7,811.1z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="@color/black"
android:pathData="M776.7,1010.1h-479.9c-28.3,0 -51.3,-23 -51.3,-51.3v-891.1c0,-28.3 23,-51.3 51.3,-51.3h479.9c28.3,0 51.3,23 51.3,51.3v891.1c0,28.3 -23,51.3 -51.3,51.3v0zM536.6,958.8c19.1,0 34.2,-15.4 34.2,-34.2s-15.4,-34.2 -34.2,-34.2 -34.2,15.4 -34.2,34.2 15.4,34.2 34.2,34.2v0zM776.7,119h-479.9v719.7h479.6v-719.7h0.3z"/>
</vector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M271.9,728.1v-412.2c0,-30.7 18.9,-53.8 39.9,-53.8h412.2c21,0 39.9,23.6 39.9,54.3v220.2c0,2 0.5,4.1 1,5.6l14.8,-5.6v-220.2c0,-38.9 -25.1,-70.1 -56.3,-70.1h-412.2c-31.2,0 -56.3,31.2 -56.3,70.1v418.3l16.9,-6.7zM271.9,728.1v-412.2c0,-30.7 18.9,-53.8 39.9,-53.8h412.2c21,0 39.9,23.6 39.9,54.3v220.2c0,2 0.5,4.1 1,5.6l14.8,-5.6v-220.2c0,-38.9 -25.1,-70.1 -56.3,-70.1h-412.2c-31.2,0 -56.3,31.2 -56.3,70.1v418.3l16.9,-6.7zM958.5,800.8c-21.5,-16.9 -45.6,-29.7 -71.7,-38.4 -4.1,-1 -8.7,1.5 -9.7,5.6 -1,4.1 1,8.2 4.6,9.7 24.1,8.2 46.6,20.5 67.1,35.8 3.6,2.6 8.7,1.5 11.3,-2 2,-3.1 1.5,-7.7 -1.5,-10.8zM517.6,817.2c-37.9,0 -75.3,10.2 -108,30.2 -45.6,-61.4 -117.2,-97.3 -194,-97.3 -54.3,0 -107.5,18.4 -150,52.2 -3.1,3.1 -3.6,8.2 -0.5,11.3 2.6,3.1 7.2,3.6 10.2,1 39.9,-31.7 89.1,-48.6 140.3,-48.6 74.8,0 143.4,36.4 185.3,96.8 2.6,3.6 7.2,4.6 11.3,2 31.2,-21 68.1,-31.7 105.5,-31.7 35.8,0 69.6,9.7 99.8,27.6 3.6,2 8.2,1 10.8,-2 13.3,-17.9 29.2,-34.3 47.1,-47.6 3.6,-3.1 4.1,-8.2 1,-11.3 -2.6,-3.1 -7.2,-3.6 -10.8,-1.5 -17.4,12.8 -32.8,28.2 -46.1,45.1 -31.7,-16.9 -66.6,-26.1 -101.9,-26.1zM855.6,846.8c-41,-27.6 -96.3,-16.9 -123.9,23.6l-3.1,4.6c-2,3.6 -1,8.7 3.1,11.3 3.6,2 8.7,1 11.3,-3.1 8.2,-14.3 21.5,-25.1 36.9,-31.2 22.5,-8.7 47.6,-5.6 67.6,7.7 3.6,2.6 8.7,1.5 11.3,-2 1.5,-3.1 0.5,-8.2 -3.1,-10.8zM185.3,248.8c2,1.5 2,4.6 0.5,6.1m-45.1,205.3l-18.9,21c-1,1 -2.6,1 -3.6,0 -1,-1 -1,-2.6 0,-3.6l18.9,-21c1,-1 2.6,-1 3.6,0 1,1 1,2.6 0,3.6zM165.4,460.3l-18.9,21c-1,1 -2.6,1 -3.6,0 -1,-1 -1,-2.6 0,-3.6l18.9,-21c1,-1 2.6,-1 3.6,0 0.5,1 1,2.6 0,3.6zM813.1,146.4l-38.4,43c-2,2.6 -6.1,2.6 -8.2,0.5 -2.6,-2 -2.6,-6.1 -0.5,-8.2l38.4,-43c2,-2.6 6.1,-2.6 8.2,-0.5 2.6,2 2.6,5.6 0.5,8.2zM863.7,146.4l-38.4,43c-2,2.6 -6.1,2.6 -8.2,0.5 -2.6,-2 -2.6,-6.1 -0.5,-8.2l38.4,-43c2,-2.6 6.1,-2.6 8.2,-0.5 2.6,2 3.1,5.6 0.5,8.2z"
android:fillColor="#C9C7C7"/>
<path
android:pathData="M390.1,451.6c-17.9,0.5 -32.8,-13.8 -33.3,-31.2 -0.5,-17.9 13.8,-32.8 31.2,-33.3h1.5c17.9,0.5 31.7,15.4 31.2,33.3 0.5,16.9 -13.3,30.7 -30.7,31.2zM382.5,419.3c6.1,0 10.8,-4.6 10.8,-10.8 0,-6.1 -4.6,-10.8 -10.8,-10.8 -6.1,0 -10.8,4.6 -10.8,10.8 0,6.1 4.6,10.8 10.8,10.8zM656.4,451.6c-17.9,0.5 -32.8,-13.8 -33.3,-31.2 -0.5,-17.9 13.8,-32.8 31.2,-33.3h1.5c17.9,0.5 31.7,15.4 31.2,33.3 0.5,16.9 -13.3,30.7 -30.7,31.2zM648.2,419.3c6.1,0 10.8,-4.6 10.8,-10.8 0,-6.1 -4.6,-10.8 -10.8,-10.8s-10.8,4.6 -10.8,10.8c0,6.1 5.1,10.8 10.8,10.8zM596,515.1c-2,0 -4.1,-1 -5.6,-2.6 -11.8,-12.3 -23.6,-17.9 -35.3,-17.4 -11.3,0.5 -21,7.7 -26.1,14.3 -2.6,3.6 -7.7,4.1 -11.3,1.5 -0.5,-0.5 -1,-0.5 -1,-1 -14.3,-16.4 -26.6,-15.9 -36.4,-13.8 -8.2,2 -16.4,6.7 -24.6,14.3 -3.1,3.1 -8.2,2.6 -11.3,-0.5 -3.1,-3.1 -2.6,-8.2 0.5,-11.3 10.2,-9.2 21,-15.4 31.7,-17.9 17.4,-4.6 32.8,-0.5 46.6,12.3 6.7,-6.1 17.4,-12.8 31.7,-13.8 16.4,-1 32.3,6.7 47.6,22.5 3.1,3.1 3.1,8.2 0,11.3 -2.6,1 -4.6,2 -6.7,2zM765.4,798.2c-64.5,0 -116.7,-52.2 -116.7,-116.7 0,-64.5 52.2,-116.7 116.7,-116.7 64.5,0 116.7,52.2 116.7,116.7 0,64.5 -52.2,116.7 -116.7,116.7zM707.6,666.6c-8.7,0 -16.4,7.2 -15.9,16.4 0,8.7 7.2,15.9 15.9,15.9h118.3c8.7,0 16.4,-7.2 15.9,-16.4 0,-8.7 -7.2,-15.9 -15.9,-15.9h-118.3z"
android:fillColor="#C9C7C7"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M667.8,117.3C832.9,117.3 938.7,249.7 938.7,427.9c0,138.3 -125.1,290.5 -371.6,461.6a96.8,96.8 0,0 1,-110.2 0C210.4,718.4 85.3,566.1 85.3,427.9 85.3,249.7 191.1,117.3 356.2,117.3c59.6,0 100.1,20.8 155.8,68.1C567.7,138.2 608.2,117.3 667.8,117.3zM667.8,180.5c-41.4,0 -70.3,15.2 -117,55 -2.2,1.8 -14.4,12.4 -17.9,15.4a32.3,32.3 0,0 1,-41.8 0c-3.5,-3 -15.8,-13.5 -17.9,-15.4 -46.7,-39.9 -75.5,-55 -117,-55C230.2,180.5 149.3,281.3 149.3,426.7 149.3,537.6 262.9,675.2 493.6,834.8a32.4,32.4 0,0 0,36.7 0C761.1,675.3 874.7,537.6 874.7,426.7c0,-145.4 -80.9,-246.2 -206.9,-246.2z"
android:fillColor="@color/white"/>
</vector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="256dp"
android:height="256dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="@color/white"
android:pathData="M261.9,492.9c20.6,11.9 46,11.9 66.6,0 20.6,-11.9 33.3,-33.9 33.3,-57.6 0,-36.8 -29.8,-66.5 -66.6,-66.5s-66.5,29.8 -66.5,66.5c0,23.8 12.7,45.7 33.2,57.6z"/>
<path
android:fillColor="@color/white"
android:pathData="M804,153.4L221.4,153.4c-78.3,0 -142,63.7 -142,142v436.9c0,78.3 63.7,142 142,142L804,874.3c78.3,0 142,-63.7 142,-142L946,295.4c-0.1,-78.3 -63.7,-142 -142,-142zM144.9,295.4c0,-42.2 34.3,-76.5 76.4,-76.5L804,218.9c42.1,0 76.4,34.3 76.4,76.5v331.1l-95.3,-86.2 -13.6,-9.7c-71.9,-46.1 -164.2,-45.1 -233.9,1.3l-385,232.6c-4.7,-9.9 -7.7,-20.6 -7.7,-32.2L144.9,295.4zM804,808.8L221.4,808.8c-4.1,0 -7.6,-1.7 -11.4,-2.3l362.8,-219.2c49.5,-32.9 113.6,-33.4 162.8,-1.9l143.7,128.5 1.2,-1.3v19.8c-0.1,42.1 -34.4,76.4 -76.5,76.4z"/>
</vector>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="10dp" />
<solid android:color="#F2E8EA" />
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="10dp" />
<gradient
android:angle="0"
android:endColor="#ff617b"
android:centerColor="#FFB6C1"
android:startColor="#FFB6C1" />
</shape>
</clip>
</item>
</layer-list>

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#2bC0C0C0" />
<corners android:radius="25dp"/>
</shape>

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/tab_explore_select" android:state_selected="true" />
<item android:drawable="@drawable/tab_explore_gray" />
</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/ic_explore_red" android:state_selected="true" />
<item android:drawable="@drawable/ic_explore_gray" />
</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/ic_bookmark_red" android:state_selected="true" />
<item android:drawable="@drawable/ic_bookmark_white" />
</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/tab_like_select" android:state_selected="true" />
<item android:drawable="@drawable/tab_love_gray" />
</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/ic_bookmark_red" android:state_selected="true" />
<item android:drawable="@drawable/ic_stoke_love_white" />
</selector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M555.5,118l312.9,224.6A117.3,117.3 0,0 1,917.3 437.9V800c0,64.8 -52.5,117.3 -117.3,117.3H640V746.7c0,-70.7 -57.3,-128 -128,-128s-128,57.3 -128,128v170.7H224c-64.8,0 -117.3,-52.5 -117.3,-117.3V437.9a117.3,117.3 0,0 1,48.9 -95.3l312.9,-224.6a74.7,74.7 0,0 1,87.1 0z"
android:fillColor="#808080"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M555.5,118l312.9,224.6A117.3,117.3 0,0 1,917.3 437.9V800c0,64.8 -52.5,117.3 -117.3,117.3H640V746.7c0,-70.7 -57.3,-128 -128,-128s-128,57.3 -128,128v170.7H224c-64.8,0 -117.3,-52.5 -117.3,-117.3V437.9a117.3,117.3 0,0 1,48.9 -95.3l312.9,-224.6a74.7,74.7 0,0 1,87.1 0z"
android:fillColor="#ff617b"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M667.8,117.3C832.9,117.3 938.7,249.7 938.7,427.9c0,138.3 -125.1,290.5 -371.6,461.6a96.8,96.8 0,0 1,-110.2 0C210.4,718.4 85.3,566.1 85.3,427.9 85.3,249.7 191.1,117.3 356.2,117.3c59.6,0 100.1,20.8 155.8,68.1C567.7,138.2 608.2,117.3 667.8,117.3z"
android:fillColor="#ff617b"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M667.8,117.3C832.9,117.3 938.7,249.7 938.7,427.9c0,138.3 -125.1,290.5 -371.6,461.6a96.8,96.8 0,0 1,-110.2 0C210.4,718.4 85.3,566.1 85.3,427.9 85.3,249.7 191.1,117.3 356.2,117.3c59.6,0 100.1,20.8 155.8,68.1C567.7,138.2 608.2,117.3 667.8,117.3z"
android:fillColor="#808080"/>
</vector>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#FFFFFFFF"
android:endColor="#80FFFFFF"
android:angle="270"
android:type="linear" />
</shape>

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".uiView.BaseActivity">
<FrameLayout
android:id="@+id/fragmentIn"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent"
android:layout_height="0dp"/>
<LinearLayout
android:id="@+id/llTop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/top_main_tab"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/title"
android:text="@string/app_name"
android:textStyle="bold"
android:layout_margin="20dp"
android:textSize="19sp"
/>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"/>
<ImageView
android:id="@+id/imgSearch"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/ic_explore_black"
android:padding="10dp"
android:layout_marginEnd="10dp"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<LinearLayout
android:id="@+id/llBottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:paddingVertical="10dp"
android:background="@drawable/bottom_main_tab"
app:layout_constraintBottom_toBottomOf="parent"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/llHome"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:layout_weight="1"
>
<ImageView
android:id="@+id/imgHome"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/selector_bookmark" />
<TextView
android:id="@+id/tvStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/no_select"
android:text="@string/home"/>
</LinearLayout>
<LinearLayout
android:id="@+id/llLike"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:layout_weight="1"
>
<ImageView
android:id="@+id/imgLike"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/selector_love" />
<TextView
android:id="@+id/tvEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/no_select"
android:text="@string/collect"/>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/llTop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/imgBack"
android:layout_width="55dp"
android:layout_height="50dp"
android:src="@drawable/ic_go_back_white"
android:paddingStart="20dp"
android:paddingEnd="15dp"
app:tint="@color/black" />
<RelativeLayout
android:id="@+id/et_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:layout_weight="1"
android:background="@drawable/search_back_grey">
<EditText
android:id="@+id/et"
android:layout_width="match_parent"
android:layout_height="46dp"
android:background="@null"
android:hint="@string/start_searching"
android:imeOptions="actionSearch"
android:inputType="text"
android:maxLines="1"
android:paddingStart="10dp"
android:paddingEnd="40dp"
android:textColorHint="#D3D3D3"
android:textSize="14sp" />
<ImageView
android:id="@+id/btn_search"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:paddingHorizontal="20dp"
android:src="@drawable/selector_explore" />
</RelativeLayout>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/llTop"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="7dp" />
<LinearLayout
android:id="@+id/empty_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/ic_empty_result_01" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/no_data_found"
android:textColor="#000000" />
</LinearLayout>
<ProgressBar
android:id="@+id/search_pb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminateTint="#FFB6C1"
android:visibility="gone" />
</RelativeLayout>

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".uiView.ExtendedInfoActivity">
<ImageView
android:id="@+id/imageview_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="40dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageBack"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_marginStart="15dp"
android:padding="13dp"
android:background="@drawable/back_transparent_grey_oval"
android:src="@drawable/ic_go_back_white"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageFavorite"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_marginHorizontal="10dp"
android:background="@drawable/back_transparent_grey_oval"
android:padding="13dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:src="@drawable/selector_like_white" />
<RelativeLayout
android:id="@+id/layout_download"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:background="@drawable/back_transparent_grey_oval">
<ImageView
android:id="@+id/imageDownload"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_centerInParent="true"
android:padding="13dp"
android:src="@drawable/ic_download_pic" />
<ProgressBar
android:id="@+id/pb_download"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_centerInParent="true"
android:indeterminateTint="@color/white"
android:padding="13dp"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tvContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="40dp"
android:padding="10dp"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="13sp"
android:layout_marginBottom="130dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<RelativeLayout
android:id="@+id/layoutSet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_button_apply"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@id/tvContent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<ImageView
android:id="@+id/buttonSet"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerVertical="true"
android:layout_marginStart="15dp"
android:paddingTop="3dp"
android:src="@drawable/ic_to_set_wall"/>
<TextView
android:id="@+id/txApply"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/apply"
android:textColor="#CD5C5C"
android:layout_centerVertical="true"
android:textSize="16sp"
android:textStyle="bold"
android:layout_marginVertical="10dp"
android:layout_marginStart="38dp"
android:layout_marginEnd="20dp"/>
<ProgressBar
android:id="@+id/pbSet"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_centerInParent="true"
android:indeterminateTint="@color/white"
android:padding="13dp"
android:visibility="gone" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".uiView.GeneraActivity">
<ImageView
android:id="@+id/imageBack"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:padding="13dp"
android:src="@drawable/ic_go_back_white"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/black" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/imageBack"
android:layout_alignBottom="@id/imageBack"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="@string/app_name"
android:textColor="#ff617b"
android:textSize="17sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginHorizontal="16dp"
android:layout_below="@id/imageBack" />
</RelativeLayout>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".uiView.LaunchActivity">
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/imageview_logo"
android:layout_width="94dp"
android:layout_height="94dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="260dp"
android:src="@mipmap/login_icon"
app:roundPercent="0.2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/imageview_logo"
android:layout_centerHorizontal="true"
android:layout_marginTop="19dp"
android:text="@string/app_name"
android:textColor="#ff617b"
android:textStyle="bold"
android:textSize="22sp"/>
<ProgressBar
android:id="@+id/progressbar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="10dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginHorizontal="20dp"
android:layout_marginBottom="140dp"
android:max="100"
android:progress="80"
android:indeterminateTint="#FFB6C1"
android:progressDrawable="@drawable/launch_pb" />
</RelativeLayout>

View File

@ -0,0 +1,47 @@
<?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"
android:background="@color/white"
tools:context=".uiView.DiscoverFragment">
<androidx.viewpager2.widget.ViewPager2
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="10dp"
android:layout_marginVertical="55dp"
android:id="@+id/viewPager"/>
<LinearLayout
android:id="@+id/layout_no_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_show_none" />
<TextView
android:id="@+id/tvNoData"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:lineSpacingExtra="4dp"
android:text="@string/empty"
android:textColor="#000000"
android:layout_marginBottom="50dp"
android:textSize="14sp" />
</LinearLayout>
<ProgressBar
android:id="@+id/searchPb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminateTint="#FEA7F5"
android:visibility="gone" />
</RelativeLayout>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
tools:context=".uiView.DiscoverFragment">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/rlStart"
android:layout_marginHorizontal="15dp"
/>
</FrameLayout>

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
tools:context=".uiView.SetPaperFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bottom_action_dialog"
android:paddingVertical="20dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/layout_home"
android:layout_width="match_parent"
android:layout_height="54dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_main_pic_set" />
<TextView
android:id="@+id/home"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="21dp"
android:text="@string/type_home"
android:textColor="#ff617b"
android:textSize="18sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginHorizontal="10dp"
android:background=" #F5F5F5" />
<LinearLayout
android:id="@+id/layout_lock"
android:layout_width="match_parent"
android:layout_height="54dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_lock_pic_set" />
<TextView
android:id="@+id/lock"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="22dp"
android:text="@string/type_lock"
android:textColor="#ff617b"
android:textSize="18sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginHorizontal="10dp"
android:background=" #F5F5F5" />
<LinearLayout
android:id="@+id/layout_both"
android:layout_width="match_parent"
android:layout_height="54dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_both_set" />
<TextView
android:id="@+id/both"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="22dp"
android:text="@string/type_both"
android:textColor="#ff617b"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

View File

@ -0,0 +1,84 @@
<?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">
<ImageView
android:id="@+id/wallpaper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="20dp"
android:paddingHorizontal="10dp"
android:paddingTop="10dp"
android:layout_above="@id/tvName"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_marginBottom="100dp"
android:paddingHorizontal="60dp"
>
<RelativeLayout
android:id="@+id/rlSet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/back_transparent_grey_oval">
<ImageView
android:id="@+id/imgSet"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_centerInParent="true"
android:padding="13dp"
android:src="@drawable/ic_to_set_wall" />
</RelativeLayout>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"/>
<RelativeLayout
android:id="@+id/rlDown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/back_transparent_grey_oval">
<ImageView
android:id="@+id/imgDown"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_centerInParent="true"
android:padding="13dp"
android:src="@drawable/ic_download_pic" />
</RelativeLayout>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"/>
<ImageView
android:id="@+id/imgCollect"
android:layout_width="46dp"
android:layout_height="46dp"
android:background="@drawable/back_transparent_grey_oval"
android:padding="13dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:src="@drawable/selector_like_white" />
</LinearLayout>
<TextView
android:id="@+id/tvName"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:textColor="#808080"
android:textSize="16sp"
android:layout_marginHorizontal="40dp"
android:textAlignment="center"
android:textStyle="bold"
android:layout_marginBottom="20dp"
android:layout_marginTop="10dp"
android:ellipsize="end"
android:maxLines="2" />
</RelativeLayout>

View File

@ -0,0 +1,76 @@
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:id="@+id/topView"
android:layout_width="match_parent"
android:layout_height="60dp"
android:visibility="gone"
/>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="260dp"
android:layout_margin="5dp"
app:cardCornerRadius="20dp"
app:cardElevation="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/preview"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<View
android:id="@+id/llBlur"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#9f696969"
/>
<TextView
android:id="@+id/tv_class_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
android:layout_marginStart="20dp"
android:layout_marginVertical="10dp"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="13sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginEnd="20dp"
android:text="@string/right"
android:textStyle="bold"
android:textSize="18sp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<View
android:id="@+id/bottomView"
app:layout_constraintTop_toBottomOf="@id/tv_class_name"
android:layout_width="match_parent"
android:layout_height="65dp"
android:visibility="gone"
/>
</LinearLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/img"
android:layout_width="match_parent"
android:scaleType="centerCrop"
android:layout_margin="2dp"
android:layout_height="220dp" />
</RelativeLayout>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/login_icon_background"/>
<foreground android:drawable="@mipmap/login_icon_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/login_icon_background"/>
<foreground android:drawable="@mipmap/login_icon_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Some files were not shown because too many files have changed in this diff Show More