Optimized language, themes, colors.

Added splashscreen, SplashActivity.
This commit is contained in:
2022-03-28 23:38:43 +08:00
parent ef0760ef16
commit ef235a86aa
41 changed files with 351 additions and 124 deletions

View File

@@ -12,6 +12,27 @@
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-03-21T07:15:31.638451100Z" />
<timeTargetWasSelectedWithDropDown value="2022-03-28T14:20:01.898865100Z" />
<multipleDevicesSelectedInDropDown value="true" />
<runningDeviceTargetsSelectedWithDialog>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="G:\Android\Avd\Pixel_4_API_31.avd" />
</Key>
</deviceKey>
</Target>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="G:\Android\Avd\Pixel_4_API_30.avd" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetsSelectedWithDialog>
</component>
</project>

7
.idea/misc.xml generated
View File

@@ -13,10 +13,16 @@
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/bottom_radius_background.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/button_radius_shape.xml" value="0.15520833333333334" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/down_to_right_arrow.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_launcher.xml" value="0.1335" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_launcher_background.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_about.xml" value="0.1335" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_camera.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_exit.xml" value="0.3525" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_gallery.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_home.xml" value="0.3525" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_setting.xml" value="0.3525" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_slideshow.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_menu_theme.xml" value="0.3525" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/item_bg.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/item_divider.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/right_to_down_arrow.xml" value="0.11944444444444445" />
@@ -25,6 +31,7 @@
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/top_bottom_radius_background.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/top_radius_background.xml" value="0.11944444444444445" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/activity_main.xml" value="0.1" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/activity_splash.xml" value="0.1693840579710145" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/activity_time_screen.xml" value="0.34739583333333335" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/app_bar_main.xml" value="0.1" />
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/basic_tool_list.xml" value="0.1390625" />

View File

@@ -44,7 +44,7 @@ dependencies {
implementation 'androidx.navigation:navigation-ui-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
implementation 'androidx.core:core-splashscreen:1.0.0-beta02'
implementation 'com.google.code.gson:gson:2.9.0'
// 请务必使用@aar结尾以中断依赖传递

View File

@@ -8,35 +8,37 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.OxygenToolbox">
<!--<activity
android:theme="@style/Theme.OxygenToolbox.Starting">
<activity
android:name=".SplashActivity"
android:exported="true"
android:theme="@style/Theme.OxygenToolbox.Full">
android:theme="@style/Theme.OxygenToolbox.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>-->
</activity>
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.OxygenToolbox.NoActionBar">
android:theme="@style/Theme.OxygenToolbox">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!--
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
-->
</activity>
<activity
android:name=".tools.TimeScreenActivity"
android:exported="false">
android:exported="false"
android:theme="@style/Theme.OxygenToolbox">
<intent-filter>
<action android:name="activity.timescreen" />

View File

@@ -9,19 +9,16 @@
"icon": "\uE6AE",
"title": {
"cn": "\u57fa\u7840\u5de5\u5177",
"tc": "\u57fa\u790e\u5de5\u5177",
"en": "Basic Tools"
},
"desc": {
"cn": "\u4e00\u4e9b\u57fa\u7840\u7684\u5de5\u5177\uff0c\u0041\u0050\u0050\u4e3b\u4f53\u81ea\u5e26",
"tc": "\u4e00\u4e9b\u57fa\u790e\u7684\u5de5\u5177\uff0c\u0041\u0050\u0050\u4e3b\u9ad4\u81ea\u5e36",
"en": "Some basic tools, the main body of the APP comes with it"
},
"buttons": [
{
"text": {
"cn": "\u65f6\u95f4\u5c4f\u5e55",
"tc": "\u6642\u9593\u5c4f\u5e55",
"en": "Time Screen"
},
"activity": 0
@@ -29,7 +26,6 @@
{
"text": {
"cn": "\u7ffb\u8bd1",
"tc": "\u7ffb\u8b6f",
"en": "Translation"
},
"activity": 1

View File

@@ -7,14 +7,13 @@ import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.view.View;
import android.view.Menu;
import android.widget.Toast;
import com.fatapp.oxygentoolbox.util.ToolsList;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.navigation.NavigationView;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.fragment.NavHostFragment;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import androidx.drawerlayout.widget.DrawerLayout;
@@ -22,21 +21,24 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import java.util.Collections;
import java.util.Objects;
public class MainActivity extends AppCompatActivity {
public static AppCompatActivity mainActivity;
private AppBarConfiguration mAppBarConfiguration;
private Toolbar toolbar;
private FloatingActionButton fab;
private DrawerLayout drawer;
private NavigationView navigationView;
private void initView() {
toolbar = findViewById(R.id.toolbar);
fab = findViewById(R.id.fab);
drawer = findViewById(R.id.drawer_layout);
navigationView = findViewById(R.id.nav_view);
mainActivity = this;
}
@Override
@@ -48,7 +50,7 @@ public class MainActivity extends AppCompatActivity {
initView();
initLayout();
shortCutCreateTest();
// shortCutCreateTest();
}
private void initLayout() {
@@ -73,17 +75,18 @@ public class MainActivity extends AppCompatActivity {
mAppBarConfiguration = new AppBarConfiguration.Builder(R.id.nav_home)
.setOpenableLayout(drawer)
.build();
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
NavController navController = ((NavHostFragment) Objects.requireNonNull(getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment))).getNavController();
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);
}
/*
private void shortCutCreateTest() {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N_MR1) {
return;
}
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.setAction("android.intent.action.MAIN");
intent.setClassName("com.fatapp.oxygentoolbox",
"com.fatapp.oxygentoolbox.MainActivity");
ShortcutInfo.Builder builder;
@@ -97,6 +100,7 @@ public class MainActivity extends AppCompatActivity {
ShortcutManager shortcutManager = getSystemService(ShortcutManager.class);
shortcutManager.addDynamicShortcuts(Collections.singletonList(builder.build()));
}
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {

View File

@@ -1,14 +1,24 @@
package com.fatapp.oxygentoolbox;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.splashscreen.SplashScreen;
@SuppressLint("CustomSplashScreen")
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// Handle the splash screen transition.
SplashScreen splashScreen = SplashScreen.installSplashScreen(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
startActivity(new Intent(getApplicationContext(), MainActivity.class));
finish();
}
}

View File

@@ -22,7 +22,6 @@ import com.fatapp.oxygentoolbox.util.ToolsList;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class HomeFragment extends Fragment {
@@ -57,7 +56,7 @@ public class HomeFragment extends Fragment {
ToolsList.init(getResources().getAssets().open("json/BasicTools.json"));
} catch (IOException e) {
e.printStackTrace();
Toast.makeText(getContext(), "初始化工具集失败", Toast.LENGTH_LONG).show();
Toast.makeText(getContext(), R.string.init_tools_failed, Toast.LENGTH_LONG).show();
return;
}
@@ -70,9 +69,7 @@ public class HomeFragment extends Fragment {
Button toolButton = toolButtonLayout.findViewById(R.id.tool_button);
toolButton.setText(button.getText());
toolButton.setOnClickListener(v -> {
BasicToolsLauncher.launch(button.getActivity(), getContext());
});
toolButton.setOnClickListener(v -> BasicToolsLauncher.launch(button.getActivity(), getContext()));
autoLinefeedLayout.addView(toolButtonLayout);
}
@@ -84,7 +81,7 @@ public class HomeFragment extends Fragment {
((TextView) foldLayout.findViewById(R.id.fold_layout_text_view)).setText(tool.getFoldLayoutTitle());
TextView foldLayoutIcon = foldLayout.findViewById(R.id.fold_layout_icon);
foldLayoutIcon.setTypeface(Typeface.createFromAsset(Objects.requireNonNull(getContext()).getAssets(), tool.getFont()));
foldLayoutIcon.setTypeface(Typeface.createFromAsset(requireContext().getAssets(), tool.getFont()));
foldLayoutIcon.setText(tool.getIcon());
foldLayout.addItemView(viewList);

View File

@@ -0,0 +1,11 @@
package com.fatapp.oxygentoolbox.util;
public interface Locales {
String getCn();
void setCn(String cn);
String getEn();
void setEn(String en);
}

View File

@@ -108,67 +108,55 @@ public class ToolsJson {
this.buttons = buttons;
}
public static class Title {
public static class Title implements Locales {
@SerializedName("cn")
private String cn;
@SerializedName("tc")
private String tc;
@SerializedName("en")
private String en;
@Override
public String getCn() {
return cn;
}
@Override
public void setCn(String cn) {
this.cn = cn;
}
public String getTc() {
return tc;
}
public void setTc(String tc) {
this.tc = tc;
}
@Override
public String getEn() {
return en;
}
@Override
public void setEn(String en) {
this.en = en;
}
}
public static class Desc {
public static class Desc implements Locales {
@SerializedName("cn")
private String cn;
@SerializedName("tc")
private String tc;
@SerializedName("en")
private String en;
@Override
public String getCn() {
return cn;
}
@Override
public void setCn(String cn) {
this.cn = cn;
}
public String getTc() {
return tc;
}
public void setTc(String tc) {
this.tc = tc;
}
@Override
public String getEn() {
return en;
}
@Override
public void setEn(String en) {
this.en = en;
}
@@ -196,34 +184,28 @@ public class ToolsJson {
this.activity = activity;
}
public static class Text {
public static class Text implements Locales {
@SerializedName("cn")
private String cn;
@SerializedName("tc")
private String tc;
@SerializedName("en")
private String en;
@Override
public String getCn() {
return cn;
}
@Override
public void setCn(String cn) {
this.cn = cn;
}
public String getTc() {
return tc;
}
public void setTc(String tc) {
this.tc = tc;
}
@Override
public String getEn() {
return en;
}
@Override
public void setEn(String en) {
this.en = en;
}

View File

@@ -1,5 +1,10 @@
package com.fatapp.oxygentoolbox.util;
import android.os.Build;
import android.widget.Toast;
import com.fatapp.oxygentoolbox.MainActivity;
import com.fatapp.oxygentoolbox.ui.home.HomeFragment;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
@@ -7,6 +12,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
public class ToolsList {
private static List<Tool> toolList = new ArrayList<>();
@@ -19,16 +25,17 @@ public class ToolsList {
jsonStringBuilder.append((char) i);
}
file.close();
List<ToolsJson> toolsJsonList = new Gson().fromJson(jsonStringBuilder.toString(), new TypeToken<List<ToolsJson>>(){}.getType());
List<ToolsJson> toolsJsonList = new Gson().fromJson(jsonStringBuilder.toString(), new TypeToken<List<ToolsJson>>() {
}.getType());
for (ToolsJson toolsJson : toolsJsonList) {
Tool tool = new Tool();
tool.setFont(toolsJson.getContent().getFont());
tool.setIcon(toolsJson.getContent().getIcon());
tool.setFoldLayoutTitle(toolsJson.getContent().getTitle().getCn());
tool.setFoldLayoutTitle(getLocale(toolsJson.getContent().getTitle()));
for (ToolsJson.Content.Buttons cButton : toolsJson.getContent().getButtons()) {
Button button = new Button();
button.setText(cButton.getText().getCn());
button.setText(getLocale(cButton.getText()));
button.setActivity(cButton.getActivity());
tool.buttonList.add(button);
}
@@ -36,6 +43,19 @@ public class ToolsList {
}
}
private static String getLocale(Locales strings) {
String language;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
language = MainActivity.mainActivity.getResources().getConfiguration().getLocales().get(0).getLanguage();
} else {
language = MainActivity.mainActivity.getResources().getConfiguration().locale.getLanguage();
}
if (language.equals("zh")) {
return strings.getCn();
}
return strings.getEn();
}
public static List<Tool> getToolList() {
return toolList;
}

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="@color/app_theme"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1024dp"
android:height="1024dp"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1024dp"
android:height="1024dp"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1036dp"
android:height="1024dp"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1036"
android:viewportHeight="1024">

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1024dp"
android:height="1024dp"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1024dp"
android:height="1024dp"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">

View File

@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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=".SplashActivity">
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -29,6 +29,6 @@
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email"
android:contentDescription="TODO" />
android:contentDescription="@string/fab" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -7,7 +7,7 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/app_bar_main">
<fragment
<androidx.fragment.app.FragmentContainerView
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"

View File

@@ -15,6 +15,7 @@
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight="1"
android:gravity="center"
android:textAlignment="center"
android:textSize="20sp"
android:textColor="@color/app_theme" />
@@ -25,7 +26,7 @@
android:layout_height="40dp"
android:layout_weight="6"
android:gravity="center_vertical"
android:textColor="@color/black"
android:textColor="@color/app_text_theme"
android:textSize="18sp" />
<ImageView
@@ -33,5 +34,6 @@
android:layout_width="0dp"
android:layout_height="15dp"
android:layout_weight="1"
app:srcCompat="@drawable/right_to_down_arrow" />
app:srcCompat="@drawable/right_to_down_arrow"
android:contentDescription="@string/arrow_icon" />
</LinearLayout>

View File

@@ -12,6 +12,7 @@
android:id="@+id/fold_layouts_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:orientation="vertical">
</LinearLayout>

View File

@@ -7,11 +7,15 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="app_theme">#FFBB86FC</color>
<color name="app_on_theme">@color/white</color>
<color name="app_text_theme">@color/white</color>
<color name="app_background">#FF202020</color>
<color name="fold_layout_background">#FF303030</color>
<color name="tools_button_text">#FFFAFAFA</color>
<color name="tools_button_background">#FFF5F5F5</color>
<color name="tools_arrow">#FF666666</color>
<color name="tools_button_background">@color/app_background</color>
<color name="tools_button_text">#FFFAFAFA</color>
<color name="tools_button_ripple">#88cccccc</color>
</resources>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="ToolsButton" parent="Widget.AppCompat.Button">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">35dp</item>
<item name="android:layout_marginStart">5dp</item>
<item name="android:layout_marginEnd">5dp</item>
<item name="android:layout_marginTop">5dp</item>
<item name="android:layout_marginBottom">5dp</item>
<item name="android:background">@drawable/button_radius_shape</item>
<item name="android:foreground">@drawable/ripple_foreground</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:textColor">@color/tools_button_text</item>
</style>
</resources>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.OxygenToolbox" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/app_theme</item>
<item name="colorPrimaryVariant">@color/app_theme</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_subtitle">All in One</string>
<string name="nav_header_desc">氧工具</string>
<string name="action_settings">设置</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="fab">浮动按钮</string>
<string name="init_tools_failed">初始化工具集失败</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_subtitle">All in One</string>
<string name="nav_header_desc">氧工具</string>
<string name="action_settings">设置</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="fab">浮动按钮</string>
<string name="init_tools_failed">初始化工具集失败</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_desc">氧工具</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_subtitle">All in One</string>
<string name="action_settings">设置</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="fab">浮动按钮</string>
<string name="init_tools_failed">初始化工具集失败</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_subtitle">All in One</string>
<string name="nav_header_desc">氧工具</string>
<string name="action_settings">设置</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="fab">浮动按钮</string>
<string name="init_tools_failed">初始化工具集失败</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_subtitle">All in One</string>
<string name="nav_header_desc">氧工具</string>
<string name="action_settings">设置</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="fab">浮动按钮</string>
<string name="init_tools_failed">初始化工具集失败</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_subtitle">All in One</string>
<string name="nav_header_desc">氧工具</string>
<string name="action_settings">设置</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="fab">浮动按钮</string>
<string name="init_tools_failed">初始化工具集失败</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_subtitle">All in One</string>
<string name="nav_header_desc">氧工具</string>
<string name="action_settings">设置</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="fab">浮动按钮</string>
<string name="init_tools_failed">初始化工具集失败</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">氧工具</string>
<string name="navigation_drawer_open">打开导航抽屉</string>
<string name="navigation_drawer_close">关闭导航抽屉</string>
<string name="nav_header_title">氧工具</string>
<string name="nav_header_subtitle">All in One</string>
<string name="nav_header_desc">氧工具</string>
<string name="action_settings">设置</string>
<string name="menu_home">主页</string>
<string name="menu_theme">主题</string>
<string name="menu_setting">设置</string>
<string name="menu_about">关于</string>
<string name="menu_exit">退出</string>
<string name="shortcutDisabledMessage">禁用</string>
<string name="shortcutShortLabel">氧工具</string>
<string name="shortcutLongLabel">氧工具</string>
<string name="init_tools_failed">初始化工具集失败</string>
<string name="fab">浮动按钮</string>
</resources>

View File

@@ -7,11 +7,15 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="app_theme">#FF6200EE</color>
<color name="app_on_theme">@color/white</color>
<color name="app_text_theme">#FF444444</color>
<color name="app_background">#FFF5F5F5</color>
<color name="fold_layout_background">#FFFFFFFF</color>
<color name="tools_button_text">#FF434343</color>
<color name="tools_button_background">#FFF5F5F5</color>
<color name="tools_arrow">#FF666666</color>
<color name="tools_button_background">@color/app_background</color>
<color name="tools_button_text">#FF434343</color>
<color name="tools_button_ripple">#88cccccc</color>
</resources>

View File

@@ -17,4 +17,8 @@
<string name="shortcutDisabledMessage">Disable</string>
<string name="shortcutLongLabel">Oxygen Toolbox</string>
<string name="shortcutShortLabel">Oxygen Toolbox</string>
<string name="fab">Fab</string>
<string name="arrow_icon" translatable="false"><![CDATA[>]]></string>
<string name="init_tools_failed">Failed to initialize tools</string>
</resources>

View File

@@ -8,8 +8,8 @@
<item name="android:layout_marginEnd">5dp</item>
<item name="android:layout_marginTop">5dp</item>
<item name="android:layout_marginBottom">5dp</item>
<item name="android:paddingLeft">10dp</item>
<item name="android:paddingRight">10dp</item>
<item name="android:paddingStart">15dp</item>
<item name="android:paddingEnd">15dp</item>
<item name="android:background">@drawable/button_radius_shape</item>
<item name="android:foreground">@drawable/ripple_foreground</item>
<item name="android:stateListAnimator">@null</item>

View File

@@ -13,14 +13,18 @@
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="Theme.OxygenToolbox.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.OxygenToolbox.Full" parent="Theme.OxygenToolbox.NoActionBar">
<style name="Theme.OxygenToolbox.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/app_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher</item>
<item name="windowSplashScreenAnimationDuration">0</item>
<item name="postSplashScreenTheme">@style/Theme.OxygenToolbox</item>
</style>
<style name="Theme.OxygenToolbox.Full" parent="Theme.OxygenToolbox">
<item name="android:windowFullscreen">true</item>
</style>

View File

@@ -10,7 +10,7 @@
<intent
android:action="android.intent.action.VIEW"
android:targetClass="com.fatapp.oxygentoolbox.MainActivity"
android:targetPackage="com.oxygenfatapp.toolbox" />
android:targetPackage="com.fatapp.oxygentoolbox" />
<categories android:name="android.shortcut.conversation" />
</shortcut>
</shortcuts>

View File

@@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip