[app] New icon (#819)

This commit is contained in:
vvb2060 2021-07-18 21:02:44 +08:00 committed by GitHub
parent dbce1ff67d
commit e39a6d10bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 63 additions and 534 deletions

View File

@ -201,9 +201,7 @@ dependencies {
implementation("androidx.recyclerview:recyclerview:1.2.1")
implementation("androidx.slidingpanelayout:slidingpanelayout:1.2.0-alpha03")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation("com.caverock:androidsvg-aar:1.4")
implementation("com.github.bumptech.glide:glide:$glideVersion")
implementation("com.github.bumptech.glide:okhttp3-integration:$glideVersion")
implementation("com.google.android.material:material:1.4.0")
implementation("com.google.code.gson:gson:2.8.7")
implementation("com.takisoft.preferencex:preferencex:1.1.0")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -19,6 +19,8 @@
package org.lsposed.manager.ui.fragment;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.os.Build;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
@ -42,7 +44,6 @@ import org.lsposed.manager.databinding.FragmentMainBinding;
import org.lsposed.manager.ui.activity.base.BaseActivity;
import org.lsposed.manager.ui.dialog.BlurBehindDialogBuilder;
import org.lsposed.manager.ui.dialog.InfoDialogBuilder;
import org.lsposed.manager.util.GlideHelper;
import org.lsposed.manager.util.ModuleUtil;
import org.lsposed.manager.util.NavUtil;
import org.lsposed.manager.util.chrome.LinkTransformationMethod;
@ -56,6 +57,16 @@ public class HomeFragment extends BaseFragment {
private FragmentHomeBinding binding;
private View snackbar;
private static PackageInfo wrap(ApplicationInfo applicationInfo, int longVersionCode) {
PackageInfo packageInfo = new PackageInfo();
packageInfo.applicationInfo = applicationInfo;
packageInfo.versionCode = longVersionCode;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
packageInfo.setLongVersionCode(System.currentTimeMillis());
}
return packageInfo;
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
FragmentMainBinding mainBinding = FragmentMainBinding.inflate(inflater, container, false);
@ -93,13 +104,13 @@ public class HomeFragment extends BaseFragment {
binding.translators.setMovementMethod(LinkMovementMethod.getInstance());
binding.translators.setTransformationMethod(new LinkTransformationMethod(activity));
binding.translators.setText(HtmlCompat.fromHtml(getString(R.string.about_translators, getString(R.string.translators)), HtmlCompat.FROM_HTML_MODE_LEGACY));
binding.version.setText(String.format(Locale.US, "%s (%s)", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
binding.version.setText(String.format(Locale.US, "LSPosed %s (%s)", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
new BlurBehindDialogBuilder(activity)
.setView(binding.getRoot())
.show();
});
Glide.with(binding.appIcon)
.load(GlideHelper.wrapApplicationInfoForIconLoader(activity.getApplicationInfo()))
.load(wrap(activity.getApplicationInfo(), getResources().getConfiguration().hashCode()))
.into(binding.appIcon);
String installXposedVersion = ConfigManager.getXposedVersionName();
int cardBackgroundColor;

View File

@ -23,41 +23,29 @@ package org.lsposed.manager.util;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.graphics.Bitmap;
import android.graphics.drawable.AdaptiveIconDrawable;
import android.graphics.drawable.Drawable;
import androidx.annotation.NonNull;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Registry;
import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.module.AppGlideModule;
import com.caverock.androidsvg.SVG;
import org.lsposed.manager.App;
import org.lsposed.manager.R;
import org.lsposed.manager.util.svg.ExternalFileResolver;
import org.lsposed.manager.util.svg.SvgDecoder;
import org.lsposed.manager.util.svg.SvgDrawableTranscoder;
import java.io.InputStream;
import me.zhanghai.android.appiconloader.glide.AppIconModelLoader;
@GlideModule
public class AppModule extends AppGlideModule {
@Override
public boolean isManifestParsingEnabled() {
return false;
}
@Override
public void registerComponents(Context context, @NonNull Glide glide, Registry registry) {
int iconSize = context.getResources().getDimensionPixelSize(R.dimen.app_icon_size);
registry.prepend(PackageInfo.class, Bitmap.class, new AppIconModelLoader.Factory(iconSize,
context.getApplicationInfo().loadIcon(context.getPackageManager()) instanceof AdaptiveIconDrawable, context));
OkHttpUrlLoader.Factory factory = new OkHttpUrlLoader.Factory(App.getOkHttpClient());
registry.replace(GlideUrl.class, InputStream.class, factory);
SVG.registerExternalFileResolver(new ExternalFileResolver());
registry.register(SVG.class, Drawable.class, new SvgDrawableTranscoder(context))
.append(InputStream.class, SVG.class, new SvgDecoder());
var factory = new AppIconModelLoader.Factory(iconSize, true, context);
registry.prepend(PackageInfo.class, Bitmap.class, factory);
}
}

View File

@ -1,32 +0,0 @@
/*
* This file is part of LSPosed.
*
* LSPosed is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LSPosed is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2020 EdXposed Contributors
* Copyright (C) 2021 LSPosed Contributors
*/
package org.lsposed.manager.util;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
public class GlideHelper {
public static PackageInfo wrapApplicationInfoForIconLoader(ApplicationInfo applicationInfo) {
PackageInfo packageInfo = new PackageInfo();
packageInfo.applicationInfo = applicationInfo;
return packageInfo;
}
}

View File

@ -1,58 +0,0 @@
/*
* This file is part of LSPosed.
*
* LSPosed is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LSPosed is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2021 LSPosed Contributors
*/
package org.lsposed.manager.util.svg;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Picture;
import android.util.Base64;
import com.caverock.androidsvg.SVG;
import com.caverock.androidsvg.SVGExternalFileResolver;
public class ExternalFileResolver extends SVGExternalFileResolver {
@Override
public Bitmap resolveImage(String filename) {
if (filename.startsWith("data:image/svg+xml;base64,")) {
// com.shatyuka.zhiliao
try {
String base64 = filename.substring(filename.indexOf(","));
SVG svg = SVG.getFromString(new String(Base64.decode(base64, Base64.DEFAULT)));
float width = svg.getDocumentWidth();
float height = svg.getDocumentHeight();
Bitmap bitmap;
if (width > 0 && height > 0) {
bitmap = Bitmap.createBitmap(Math.round(width), Math.round(width), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
svg.renderToCanvas(canvas);
} else {
Picture picture = svg.renderToPicture();
bitmap = Bitmap.createBitmap(picture.getWidth(), picture.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
canvas.drawPicture(picture);
}
return bitmap;
} catch (Exception e) {
e.printStackTrace();
}
}
return super.resolveImage(filename);
}
}

View File

@ -1,63 +0,0 @@
/*
* This file is part of LSPosed.
*
* LSPosed is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LSPosed is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2021 LSPosed Contributors
*/
package org.lsposed.manager.util.svg;
import static com.bumptech.glide.request.target.Target.SIZE_ORIGINAL;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.ResourceDecoder;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.resource.SimpleResource;
import com.caverock.androidsvg.SVG;
import com.caverock.androidsvg.SVGParseException;
import java.io.IOException;
import java.io.InputStream;
/**
* Decodes an SVG internal representation from an {@link InputStream}.
*/
public class SvgDecoder implements ResourceDecoder<InputStream, SVG> {
@Override
public boolean handles(@NonNull InputStream source, @NonNull Options options) {
// TODO: Can we tell?
return true;
}
public Resource<SVG> decode(
@NonNull InputStream source, int width, int height, @NonNull Options options)
throws IOException {
try {
SVG svg = SVG.getFromInputStream(source);
if (width != SIZE_ORIGINAL) {
svg.setDocumentWidth(width);
}
if (height != SIZE_ORIGINAL) {
svg.setDocumentHeight(height);
}
return new SimpleResource<>(svg);
} catch (SVGParseException ex) {
throw new IOException("Cannot load SVG from stream", ex);
}
}
}

View File

@ -1,72 +0,0 @@
/*
* This file is part of LSPosed.
*
* LSPosed is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LSPosed is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
*
* Copyright (C) 2021 LSPosed Contributors
*/
package org.lsposed.manager.util.svg;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Picture;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.PictureDrawable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.resource.SimpleResource;
import com.bumptech.glide.load.resource.transcode.ResourceTranscoder;
import com.caverock.androidsvg.SVG;
/**
* Convert the {@link SVG}'s internal representation to an Android-compatible one ({@link Picture}).
*/
public class SvgDrawableTranscoder implements ResourceTranscoder<SVG, Drawable> {
private final Resources resources;
public SvgDrawableTranscoder(Context context) {
resources = context.getResources();
}
@Nullable
@Override
public Resource<Drawable> transcode(
@NonNull Resource<SVG> toTranscode, @NonNull Options options) {
SVG svg = toTranscode.get();
float width = svg.getDocumentWidth();
float height = svg.getDocumentHeight();
Drawable drawable;
if (width > 0 && height > 0) {
float density = resources.getDisplayMetrics().density;
Bitmap bitmap = Bitmap.createBitmap(Math.round(width * density), Math.round(height * density), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
canvas.scale(density, density);
svg.renderToCanvas(canvas);
drawable = new BitmapDrawable(resources, bitmap);
} else {
Picture picture = svg.renderToPicture();
drawable = new PictureDrawable(picture);
}
return new SimpleResource<>(drawable);
}
}

View File

@ -1,189 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ LSPosed is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<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="#fcd1d7"
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

@ -14,7 +14,6 @@
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
@ -22,23 +21,14 @@
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108"
android:tint="#562135">
android:viewportHeight="108">
<group
android:scaleX="0.29136494"
android:scaleY="0.29136494"
android:translateX="29.233978"
android:translateY="29.16">
<group android:translateY="141.67969">
<path
android:pathData="M44,-0L9,-0L9,-110L19,-110L19,-9L44,-9L44,-0Z"
android:fillColor="#562135" />
<path
android:pathData="M101,-8.15625Q101,-4.5625,98.734375,-2.28125Q96.484375,0,92.84375,0L65.15625,0Q61.59375,0,59.296875,-2.28125Q57,-4.5625,57,-8.15625L57,-35L67,-35L67,-9L91,-9L91,-34.5L60.203125,-71.765625Q57,-75.625,57,-80.265625L57,-101.84375Q57,-105.4375,59.296875,-107.71875Q61.59375,-110,65.15625,-110L92.84375,-110Q96.484375,-110,98.734375,-107.71875Q101,-105.4375,101,-101.84375L101,-77L91,-77L91,-101L67,-101L67,-78.5L97.9375,-41.234375Q101,-37.53125,101,-32.890625L101,-8.15625Z"
android:fillColor="#562135" />
<path
android:pathData="M163,-52.15625Q163,-48.59375,160.70312,-46.296875Q158.40625,-44,154.84375,-44L129,-44L129,0L119,0L119,-110L154.84375,-110Q158.40625,-110,160.70312,-107.71875Q163,-105.4375,163,-101.84375L163,-52.15625ZM153,-53L153,-101L129,-101L129,-53L153,-53Z"
android:fillColor="#562135" />
</group>
android:scaleX="2"
android:scaleY="2"
android:translateX="30"
android:translateY="30">
<path
android:fillColor="@color/ic_launcher_foreground"
android:pathData="M17.73,12.02l3.98,-3.98c0.39,-0.39 0.39,-1.02 0,-1.41l-4.34,-4.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-3.98,3.98L8,2.29C7.8,2.1 7.55,2 7.29,2c-0.25,0 -0.51,0.1 -0.7,0.29L2.25,6.63c-0.39,0.39 -0.39,1.02 0,1.41l3.98,3.98L2.25,16c-0.39,0.39 -0.39,1.02 0,1.41l4.34,4.34c0.39,0.39 1.02,0.39 1.41,0l3.98,-3.98 3.98,3.98c0.2,0.2 0.45,0.29 0.71,0.29 0.26,0 0.51,-0.1 0.71,-0.29l4.34,-4.34c0.39,-0.39 0.39,-1.02 0,-1.41l-3.99,-3.98zM12,9c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM7.29,10.96L3.66,7.34l3.63,-3.63 3.62,3.62 -3.62,3.63zM10,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM12,15c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM14,11c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM16.66,20.34l-3.63,-3.62 3.63,-3.63 3.62,3.62 -3.62,3.63z" />
</group>
</vector>

View File

@ -77,8 +77,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="Copy logs"
android:text="@android:string/copy"
android:theme="@style/Widget.AppCompat.Button.Colored" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -20,85 +20,35 @@
<LinearLayout 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="?android:dialogPreferredPadding"
android:paddingVertical="?android:dialogPreferredPadding">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="#000"
app:cardCornerRadius="0dp"
app:cardElevation="4dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:padding="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#fff"
android:textSize="48sp"
android:paddingHorizontal="10dp"
android:textStyle="bold"
android:text="LS"
tools:ignore="HardcodedText" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="5dp"
android:background="@drawable/ph_drawable"
android:paddingVertical="7dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000"
android:textSize="48sp"
android:textStyle="bold"
android:text="Posed"
tools:ignore="HardcodedText" />
</FrameLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<LinearLayout
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="?android:dialogPreferredPadding"
android:paddingTop="16dp"
android:paddingBottom="?android:dialogPreferredPadding">
android:textSize="14sp"
tools:text="@tools:sample/lorem" />
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
<TextView
android:id="@+id/source_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
tools:text="@string/about_view_source_code" />
<TextView
android:id="@+id/source_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
tools:text="@string/about_view_source_code" />
<TextView
android:id="@+id/translators"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="?android:textColorSecondary"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/translators"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
tools:text="@string/about_translators" />
</LinearLayout>

View File

@ -19,6 +19,6 @@
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -19,4 +19,7 @@
<resources>
<color name="color_primary">@color/color_primary_dark</color>
<color name="ic_launcher_foreground">@color/material_pink_300</color>
<color name="ic_launcher_background">@color/material_light_blue_50</color>
</resources>

View File

@ -22,4 +22,7 @@
<color name="color_primary_light">@color/google_blue_600</color>
<color name="color_primary_dark">@color/google_blue_300</color>
<color name="color_primary">@color/color_primary_light</color>
<color name="ic_launcher_foreground">@android:color/white</color>
<color name="ic_launcher_background">@color/material_pink_200</color>
</resources>