2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-25 11:19:59 +01:00

android: add adaptive icons for 26. Fix references to icons.

This commit is contained in:
Alibek Omarov 2019-12-01 01:27:21 +03:00
parent e72b89a88b
commit c22c227108
21 changed files with 19 additions and 9 deletions

View File

@ -9,7 +9,8 @@
android:installLocation="auto"> android:installLocation="auto">
<application android:label="@string/app_name" <application android:label="@string/app_name"
android:icon="@drawable/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="true" android:allowBackup="true"
android:debuggable="false" android:debuggable="false"
android:hardwareAccelerated="true"> android:hardwareAccelerated="true">

View File

@ -14,7 +14,7 @@
android:layout_height="89dp" android:layout_height="89dp"
android:id="@+id/aboutIcon" android:id="@+id/aboutIcon"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:src="@drawable/ic_launcher" /> android:src="@mipmap/ic_launcher" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -17,7 +17,7 @@
android:text="@string/launcher_name" android:text="@string/launcher_name"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="25sp" android:textSize="25sp"
android:drawableLeft="@drawable/ic_launcher" android:drawableLeft="@mipmap/ic_launcher"
android:drawablePadding="10dp" android:drawablePadding="10dp"
android:singleLine="true" android:singleLine="true"
android:gravity="center_vertical" /> android:gravity="center_vertical" />

View File

@ -5,7 +5,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:id="@+id/status_image" android:id="@+id/status_image"
android:src="@drawable/ic_launcher" android:src="@mipmap/ic_launcher"
android:layout_weight="0" android:layout_weight="0"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_width="48dp" android:layout_width="48dp"

View File

@ -6,7 +6,7 @@
android:background="#FFFFFF"> android:background="#FFFFFF">
<ImageView <ImageView
android:id="@+id/status_image_21" android:id="@+id/status_image_21"
android:src="@drawable/ic_launcher" android:src="@mipmap/ic_launcher"
android:layout_weight="0" android:layout_weight="0"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_width="48dp" android:layout_width="48dp"

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="@color/sunset_orange" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="sunset_orange">#f74843</color>
</resources>

View File

@ -114,7 +114,7 @@ public class FPicker extends Activity {
} }
String num_item = getResources().getQuantityString(R.plurals.item_plurals, buf, buf); String num_item = getResources().getQuantityString(R.plurals.item_plurals, buf, buf);
dir.add(new Item(ff.getName(), num_item, date_modify, ff.getAbsolutePath(), isXashDir ? R.drawable.ic_launcher : R.drawable.folder )); dir.add(new Item(ff.getName(), num_item, date_modify, ff.getAbsolutePath(), isXashDir ? R.mipmap.ic_launcher : R.drawable.folder ));
} }
} }

View File

@ -108,7 +108,7 @@ public class ShortcutActivity extends Activity
catch(Exception e) catch(Exception e)
{ {
// Android may not support ico loading, so fallback if something going wrong // Android may not support ico loading, so fallback if something going wrong
icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); icon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
} }
wrapIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, icon); wrapIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, icon);
if(getIntent().getAction() == "android.intent.action.CREATE_SHORTCUT" ) // Called from launcher if(getIntent().getAction() == "android.intent.action.CREATE_SHORTCUT" ) // Called from launcher

View File

@ -1072,7 +1072,7 @@ class EngineSurface extends SurfaceView implements SurfaceHolder.Callback, View.
// Android may force only-landscape app to portait during lock // Android may force only-landscape app to portait during lock
// Just don't notify engine in that case // Just don't notify engine in that case
if( width > height || mEngThread == null ) if( width > height )
XashActivity.onNativeResize( width, height ); XashActivity.onNativeResize( width, height );
XashActivity.nativeSetSurface( holder.getSurface() ); XashActivity.nativeSetSurface( holder.getSurface() );

View File

@ -134,7 +134,6 @@ public class XashTutorialActivity extends Activity implements View.OnClickListen
prev.setOnClickListener(this); prev.setOnClickListener(this);
} }
public void notifyIndicator() { public void notifyIndicator() {
if (indicatorLayout.getChildCount() > 0) if (indicatorLayout.getChildCount() > 0)
indicatorLayout.removeAllViews(); indicatorLayout.removeAllViews();