mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 07:31:27 +08:00
Optimized code and resources.
This commit is contained in:
17
.idea/deploymentTargetDropDown.xml
generated
17
.idea/deploymentTargetDropDown.xml
generated
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetDropDown">
|
|
||||||
<runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<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>
|
|
||||||
</runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<timeTargetWasSelectedWithDropDown value="2022-08-13T18:22:40.992150800Z" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
16
.idea/misc.xml
generated
16
.idea/misc.xml
generated
@@ -12,8 +12,9 @@
|
|||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable-v21/ripple_foreground.xml" value="0.15520833333333334" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable-v21/ripple_foreground.xml" value="0.15520833333333334" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable-v24/avd_anim.xml" value="0.2915" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable-v24/avd_anim.xml" value="0.2915" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.11944444444444445" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.11944444444444445" />
|
||||||
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/a.xml" value="0.192" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_dark_to_light_mode.xml" value="0.2915" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_dark_to_light_mode.xml" value="0.2915" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_down_to_right_arrow.xml" value="0.2915" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_down_to_right_arrow.xml" value="0.22" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_light_to_dark_mode.xml" value="0.2915" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_light_to_dark_mode.xml" value="0.2915" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_right_to_down_arrow.xml" value="0.164" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_right_to_down_arrow.xml" value="0.164" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_swap_horizon.xml" value="0.181" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/animation_swap_horizon.xml" value="0.181" />
|
||||||
@@ -35,6 +36,8 @@
|
|||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_baseline_circle_24.xml" value="0.2655" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_baseline_circle_24.xml" value="0.2655" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_check.xml" value="0.165" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_check.xml" value="0.165" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_dark_mode.xml" value="0.2915" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_dark_mode.xml" value="0.2915" />
|
||||||
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_favorite.xml" value="0.193" />
|
||||||
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_home.xml" value="0.193" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_language.xml" value="0.184" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_language.xml" value="0.184" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_launch.xml" value="0.182" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_launch.xml" value="0.182" />
|
||||||
<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.xml" value="0.1335" />
|
||||||
@@ -52,6 +55,7 @@
|
|||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_setting_language.xml" value="0.193" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_setting_language.xml" value="0.193" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_setting_theme_mode.xml" value="0.2" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_setting_theme_mode.xml" value="0.2" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_swap_horizon.xml" value="0.203" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_swap_horizon.xml" value="0.203" />
|
||||||
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_tool_translation_translate.xml" value="0.2655" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_translate.xml" value="0.2655" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/drawable/ic_translate.xml" value="0.2655" />
|
||||||
<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_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/item_divider.xml" value="0.11944444444444445" />
|
||||||
@@ -69,17 +73,17 @@
|
|||||||
<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_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_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/activity_time_screen.xml" value="0.34739583333333335" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/activity_tool_time_screen.xml" value="0.30615735461801596" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/activity_tool_time_screen.xml" value="0.1" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/activity_tool_translation.xml" value="0.5" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/activity_tool_translation.xml" value="0.1" />
|
||||||
<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/app_bar_main.xml" value="0.1" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/app_content_main.xml" value="0.21932449764856776" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/app_content_main.xml" value="0.21932449764856776" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/app_nav_header_main.xml" value="0.21932449764856776" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/app_nav_header_main.xml" value="0.21932449764856776" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/basic_tool_list.xml" value="0.25" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/basic_tool_list.xml" value="0.25" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/content_main.xml" value="0.14990942028985507" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/content_main.xml" value="0.14990942028985507" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout.xml" value="0.67" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout.xml" value="0.67" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout_body.xml" value="0.21932449764856776" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout_body.xml" value="0.1" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout_button.xml" value="0.29713552800342025" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout_button.xml" value="0.29713552800342025" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout_head.xml" value="0.33" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fold_layout_head.xml" value="0.1" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_about.xml" value="0.25" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_about.xml" value="0.25" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_gallery.xml" value="0.1" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_gallery.xml" value="0.1" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_home.xml" value="0.1" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_home.xml" value="0.1" />
|
||||||
@@ -91,7 +95,7 @@
|
|||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_theme.xml" value="0.33" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_theme.xml" value="0.33" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_tools.xml" value="0.33" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/fragment_tools.xml" value="0.33" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_fold_layout.xml" value="0.2756119673617407" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_fold_layout.xml" value="0.2756119673617407" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_libraries.xml" value="0.5" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_libraries.xml" value="0.33" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_licenses.xml" value="0.33" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_licenses.xml" value="0.33" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_themes.xml" value="0.33" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_themes.xml" value="0.33" />
|
||||||
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_tools.xml" value="0.1483539974348012" />
|
<entry key="..\:/.workspace-android/Project-ToolBox/OxygenToolbox/app/src/main/res/layout/item_tools.xml" value="0.1483539974348012" />
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class App extends Application {
|
|||||||
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {
|
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {
|
||||||
ResourceUtil.init(App.this);
|
ResourceUtil.init(App.this);
|
||||||
SharedPreferencesUtils.init(App.this);
|
SharedPreferencesUtils.init(App.this);
|
||||||
|
|
||||||
ResourceUtil.setAppLocale(SharedPreferencesUtils.getPreferenceLocale());
|
ResourceUtil.setAppLocale(SharedPreferencesUtils.getPreferenceLocale());
|
||||||
ResourceUtil.loadAppTheme(activity);
|
ResourceUtil.loadAppTheme(activity);
|
||||||
loadAppUiMode();
|
loadAppUiMode();
|
||||||
|
|||||||
@@ -25,30 +25,26 @@ import java.util.Objects;
|
|||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
public static AppCompatActivity mainActivity;
|
|
||||||
|
|
||||||
private AppBarConfiguration mAppBarConfiguration;
|
private AppBarConfiguration mAppBarConfiguration;
|
||||||
|
|
||||||
private DrawerLayout drawer;
|
private DrawerLayout drawerLayout;
|
||||||
|
private NavigationView navView;
|
||||||
private CoordinatorLayout mainPage;
|
private CoordinatorLayout mainPage;
|
||||||
private Toolbar toolbar;
|
private Toolbar toolbar;
|
||||||
private NavigationView navigationView;
|
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
drawer = findViewById(R.id.drawer_layout);
|
drawerLayout = findViewById(R.id.drawer_layout);
|
||||||
|
navView = findViewById(R.id.nav_view);
|
||||||
mainPage = findViewById(R.id.main_page);
|
mainPage = findViewById(R.id.main_page);
|
||||||
toolbar = findViewById(R.id.toolbar);
|
toolbar = findViewById(R.id.toolbar);
|
||||||
navigationView = findViewById(R.id.nav_view);
|
|
||||||
mainActivity = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
SplashScreen splashScreen = SplashScreen.installSplashScreen(this);
|
SplashScreen.installSplashScreen(this);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
//init
|
|
||||||
initView();
|
initView();
|
||||||
initLayout();
|
initLayout();
|
||||||
VibratorController.init();
|
VibratorController.init();
|
||||||
@@ -60,23 +56,23 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
mainPage.setPadding(0, ResourceUtil.getStatusBarHeight(getWindow(), getApplicationContext()), 0, 0);
|
mainPage.setPadding(0, ResourceUtil.getStatusBarHeight(getWindow(), getApplicationContext()), 0, 0);
|
||||||
|
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
navigationView.inflateHeaderView(R.layout.app_nav_header_main);
|
|
||||||
navigationView.inflateMenu(R.menu.activity_main_drawer);
|
navView.inflateHeaderView(R.layout.app_nav_header_main);
|
||||||
navigationView.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> drawer.setDrawerLockMode(navigationView.getMenu().getItem(0).isChecked()
|
navView.inflateMenu(R.menu.activity_main_drawer);
|
||||||
|
navView.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> drawerLayout.setDrawerLockMode(navView.getMenu().getItem(0).isChecked()
|
||||||
? DrawerLayout.LOCK_MODE_UNLOCKED
|
? DrawerLayout.LOCK_MODE_UNLOCKED
|
||||||
: DrawerLayout.LOCK_MODE_LOCKED_CLOSED));
|
: DrawerLayout.LOCK_MODE_LOCKED_CLOSED));
|
||||||
navigationView.getMenu().getItem(4).setOnMenuItemClickListener(item -> {
|
navView.getMenu().getItem(4).setOnMenuItemClickListener(item -> {
|
||||||
finish();
|
finish();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
// Passing each menu ID as a set of Ids because each
|
|
||||||
// menu should be considered as top level destinations.
|
|
||||||
mAppBarConfiguration = new AppBarConfiguration.Builder(R.id.nav_home)
|
mAppBarConfiguration = new AppBarConfiguration.Builder(R.id.nav_home)
|
||||||
.setOpenableLayout(drawer)
|
.setOpenableLayout(drawerLayout)
|
||||||
.build();
|
.build();
|
||||||
NavController navController = ((NavHostFragment) Objects.requireNonNull(getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment))).getNavController();
|
NavController navController = ((NavHostFragment) Objects.requireNonNull(getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment))).getNavController();
|
||||||
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
|
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
|
||||||
NavigationUI.setupWithNavController(navigationView, navController);
|
NavigationUI.setupWithNavController(navView, navController);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -103,7 +99,6 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
|
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
|
||||||
getMenuInflater().inflate(R.menu.main, menu);
|
getMenuInflater().inflate(R.menu.main, menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
// Handle the splash screen transition.
|
// Handle the splash screen transition.
|
||||||
SplashScreen splashScreen = SplashScreen.installSplashScreen(this);
|
SplashScreen.installSplashScreen(this);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_splash);
|
setContentView(R.layout.activity_splash);
|
||||||
new Thread() {
|
new Thread() {
|
||||||
|
|||||||
@@ -95,9 +95,9 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
|
|||||||
int contentHeight = content.getMeasuredHeight();
|
int contentHeight = content.getMeasuredHeight();
|
||||||
LayoutParams layoutParams = (LayoutParams) content.getLayoutParams();
|
LayoutParams layoutParams = (LayoutParams) content.getLayoutParams();
|
||||||
layoutParams.height = contentHeight;
|
layoutParams.height = contentHeight;
|
||||||
LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_head_layout);
|
LinearLayout linearLayout = defaultView.findViewById(R.id.linear_layout_head);
|
||||||
linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_radius));
|
linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_radius));
|
||||||
ImageView imageView = defaultView.findViewById(R.id.fold_layout_arrow_icon);
|
ImageView imageView = defaultView.findViewById(R.id.image_view_arrow);
|
||||||
imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_down_to_right_arrow));
|
imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_down_to_right_arrow));
|
||||||
content.setLayoutParams(layoutParams);
|
content.setLayoutParams(layoutParams);
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
|
|||||||
public void onAnimationStart(Animator animation) {
|
public void onAnimationStart(Animator animation) {
|
||||||
super.onAnimationStart(animation);
|
super.onAnimationStart(animation);
|
||||||
if (isShow) {
|
if (isShow) {
|
||||||
LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_head_layout);
|
LinearLayout linearLayout = defaultView.findViewById(R.id.linear_layout_head);
|
||||||
linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_radius));
|
linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_radius));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
|
|||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
super.onAnimationEnd(animation);
|
super.onAnimationEnd(animation);
|
||||||
if (!isShow) {
|
if (!isShow) {
|
||||||
LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_head_layout);
|
LinearLayout linearLayout = defaultView.findViewById(R.id.linear_layout_head);
|
||||||
linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_bottom_radius));
|
linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_bottom_radius));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,7 +156,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
|
|||||||
public void showItem() {
|
public void showItem() {
|
||||||
isShow = true;
|
isShow = true;
|
||||||
showAnimator.start();
|
showAnimator.start();
|
||||||
ImageView imageView = defaultView.findViewById(R.id.fold_layout_arrow_icon);
|
ImageView imageView = defaultView.findViewById(R.id.image_view_arrow);
|
||||||
imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_right_to_down_arrow));
|
imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_right_to_down_arrow));
|
||||||
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
|
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
|
||||||
animatedVectorDrawable.start();
|
animatedVectorDrawable.start();
|
||||||
@@ -165,7 +165,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
|
|||||||
public void hideItem() {
|
public void hideItem() {
|
||||||
isShow = false;
|
isShow = false;
|
||||||
hideAnimator.start();
|
hideAnimator.start();
|
||||||
ImageView imageView = defaultView.findViewById(R.id.fold_layout_arrow_icon);
|
ImageView imageView = defaultView.findViewById(R.id.image_view_arrow);
|
||||||
imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_down_to_right_arrow));
|
imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_down_to_right_arrow));
|
||||||
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
|
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
|
||||||
animatedVectorDrawable.start();
|
animatedVectorDrawable.start();
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
private VariableChangeSupport<Boolean> dateVisibilityChangeSupport;
|
private VariableChangeSupport<Boolean> dateVisibilityChangeSupport;
|
||||||
private VariableChangeSupport<Boolean> uiVisibilityChangeSupport;
|
private VariableChangeSupport<Boolean> uiVisibilityChangeSupport;
|
||||||
|
|
||||||
private ConstraintLayout constraintLayoutTimeScreen;
|
private ConstraintLayout constraintLayoutRoot;
|
||||||
private ImageView imageViewMode;
|
private ImageView imageViewMode;
|
||||||
private TextSwitcher textSwitcherHourTen;
|
private TextSwitcher textSwitcherHourTen;
|
||||||
private TextSwitcher textSwitcherHourOne;
|
private TextSwitcher textSwitcherHourOne;
|
||||||
@@ -55,7 +55,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
private TextView textViewDate;
|
private TextView textViewDate;
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
constraintLayoutTimeScreen = findViewById(R.id.constraint_layout_time_screen);
|
constraintLayoutRoot = findViewById(R.id.constraint_layout_root);
|
||||||
imageViewMode = findViewById(R.id.image_view_mode);
|
imageViewMode = findViewById(R.id.image_view_mode);
|
||||||
textSwitcherHourTen = findViewById(R.id.text_switcher_hour_ten);
|
textSwitcherHourTen = findViewById(R.id.text_switcher_hour_ten);
|
||||||
textSwitcherHourOne = findViewById(R.id.text_switcher_hour_one);
|
textSwitcherHourOne = findViewById(R.id.text_switcher_hour_one);
|
||||||
@@ -77,43 +77,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
initView();
|
initView();
|
||||||
initTextSwitcher();
|
initTextSwitcher();
|
||||||
|
initUiVisibility();
|
||||||
|
initUiMode();
|
||||||
|
initDateVisibility();
|
||||||
|
|
||||||
constraintLayoutTimeScreen.setOnClickListener(view -> uiVisibilityChangeSupport.setValue(!uiVisibilityChangeSupport.getValue()));
|
initTimer();
|
||||||
uiVisibilityChangeSupport = new VariableChangeSupport<>(true, new VariableChangeListener() {
|
|
||||||
@Override
|
|
||||||
public <T> void onChange(T newValue, T oldValue) {
|
|
||||||
ObjectAnimator.ofFloat(imageViewMode, View.ALPHA, (boolean) newValue ? 0.0f : 1.0f, (boolean) newValue ? 1.0f : 0.0f).start();
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
if (uiMode >= Configuration.UI_MODE_NIGHT_YES) {
|
|
||||||
imageViewMode.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.animation_dark_to_light_mode));
|
|
||||||
}
|
|
||||||
imageViewMode.setOnClickListener(view -> {
|
|
||||||
if (uiMode < Configuration.UI_MODE_NIGHT_YES) {
|
|
||||||
uiMode = ResourceUtil.UI_MODE_DARK;
|
|
||||||
setColors(ResourceUtil.getColor(R.color.app_show_dark_background), ResourceUtil.getColor(R.color.app_show_dark_primary_text));
|
|
||||||
imageViewMode.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.animation_light_to_dark_mode));
|
|
||||||
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageViewMode.getDrawable();
|
|
||||||
animatedVectorDrawable.start();
|
|
||||||
} else {
|
|
||||||
uiMode = ResourceUtil.UI_MODE_LIGHT;
|
|
||||||
setColors(ResourceUtil.getColor(R.color.app_show_light_background), ResourceUtil.getColor(R.color.app_show_light_primary_text));
|
|
||||||
imageViewMode.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.animation_dark_to_light_mode));
|
|
||||||
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageViewMode.getDrawable();
|
|
||||||
animatedVectorDrawable.start();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dateVisibilityChangeSupport = new VariableChangeSupport<>(true, new VariableChangeListener() {
|
|
||||||
@Override
|
|
||||||
public <T> void onChange(T newValue, T oldValue) {
|
|
||||||
ObjectAnimator.ofFloat(textViewDate, View.ALPHA, (boolean) newValue ? 0.0f : 1.0f, (boolean) newValue ? 1.0f : 0.0f).start();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
textViewDate.setOnClickListener(view -> dateVisibilityChangeSupport.setValue(!dateVisibilityChangeSupport.getValue()));
|
|
||||||
|
|
||||||
|
private void initTimer() {
|
||||||
TimerTask timerTask = new TimerTask() {
|
TimerTask timerTask = new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -132,10 +103,51 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
new Timer().schedule(timerTask, 0, 100L);
|
new Timer().schedule(timerTask, 0, 100L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initDateVisibility() {
|
||||||
|
dateVisibilityChangeSupport = new VariableChangeSupport<>(true, new VariableChangeListener() {
|
||||||
|
@Override
|
||||||
|
public <T> void onChange(T newValue, T oldValue) {
|
||||||
|
ObjectAnimator.ofFloat(textViewDate, View.ALPHA, (boolean) newValue ? 0.0f : 1.0f, (boolean) newValue ? 1.0f : 0.0f).start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
textViewDate.setOnClickListener(view -> dateVisibilityChangeSupport.setValue(!dateVisibilityChangeSupport.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initUiMode() {
|
||||||
|
if (uiMode >= Configuration.UI_MODE_NIGHT_YES) {
|
||||||
|
imageViewMode.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.animation_dark_to_light_mode));
|
||||||
|
}
|
||||||
|
|
||||||
|
imageViewMode.setOnClickListener(view -> {
|
||||||
|
if (uiMode < Configuration.UI_MODE_NIGHT_YES) {
|
||||||
|
uiMode = ResourceUtil.UI_MODE_DARK;
|
||||||
|
setColors(ResourceUtil.getColor(R.color.app_show_dark_background), ResourceUtil.getColor(R.color.app_show_dark_primary_text));
|
||||||
|
imageViewMode.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.animation_light_to_dark_mode));
|
||||||
|
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageViewMode.getDrawable();
|
||||||
|
animatedVectorDrawable.start();
|
||||||
|
} else {
|
||||||
|
uiMode = ResourceUtil.UI_MODE_LIGHT;
|
||||||
|
setColors(ResourceUtil.getColor(R.color.app_show_light_background), ResourceUtil.getColor(R.color.app_show_light_primary_text));
|
||||||
|
imageViewMode.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.animation_dark_to_light_mode));
|
||||||
|
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageViewMode.getDrawable();
|
||||||
|
animatedVectorDrawable.start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initUiVisibility() {
|
||||||
|
uiVisibilityChangeSupport = new VariableChangeSupport<>(true, new VariableChangeListener() {
|
||||||
|
@Override
|
||||||
|
public <T> void onChange(T newValue, T oldValue) {
|
||||||
|
ObjectAnimator.ofFloat(imageViewMode, View.ALPHA, (boolean) newValue ? 0.0f : 1.0f, (boolean) newValue ? 1.0f : 0.0f).start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
constraintLayoutRoot.setOnClickListener(view -> uiVisibilityChangeSupport.setValue(!uiVisibilityChangeSupport.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
private void initTextSwitcher() {
|
private void initTextSwitcher() {
|
||||||
ViewSwitcher.ViewFactory viewFactory = () -> {
|
ViewSwitcher.ViewFactory viewFactory = () -> {
|
||||||
TextView textView = new TextView(getApplicationContext());
|
TextView textView = new TextView(getApplicationContext());
|
||||||
@@ -208,7 +220,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setColors(@ColorInt int backgroundColor, @ColorInt int primaryTextColor) {
|
private void setColors(@ColorInt int backgroundColor, @ColorInt int primaryTextColor) {
|
||||||
ObjectAnimator backgroundColorAnimator = ObjectAnimator.ofArgb(constraintLayoutTimeScreen, "backgroundColor", ((ColorDrawable) constraintLayoutTimeScreen.getBackground()).getColor(), backgroundColor);
|
ObjectAnimator backgroundColorAnimator = ObjectAnimator.ofArgb(constraintLayoutRoot, "backgroundColor", ((ColorDrawable) constraintLayoutRoot.getBackground()).getColor(), backgroundColor);
|
||||||
backgroundColorAnimator.setDuration(500L);
|
backgroundColorAnimator.setDuration(500L);
|
||||||
backgroundColorAnimator.start();
|
backgroundColorAnimator.start();
|
||||||
((TextView) textSwitcherHourTen.getChildAt(0)).setTextColor(primaryTextColor);
|
((TextView) textSwitcherHourTen.getChildAt(0)).setTextColor(primaryTextColor);
|
||||||
|
|||||||
@@ -87,7 +87,33 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
initView();
|
initView();
|
||||||
initLayout();
|
initLayout();
|
||||||
|
initLanguageChoose();
|
||||||
|
initTranslation();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initTranslation() {
|
||||||
|
editTextFrom.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
imageViewTranslate.setEnabled(charSequence.length() != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable editable) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
textViewTo.setOnFocusChangeListener((view, b) -> ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(editTextFrom.getWindowToken(), 0));
|
||||||
|
|
||||||
|
imageViewTranslate.setEnabled(false);
|
||||||
|
imageViewTranslate.setOnClickListener(view -> translate());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initLanguageChoose() {
|
||||||
textViewLanguageFrom.setOnClickListener(view -> new MaterialAlertDialogBuilder(this)
|
textViewLanguageFrom.setOnClickListener(view -> new MaterialAlertDialogBuilder(this)
|
||||||
.setTitle(ResourceUtil.getString(R.string.tool_translation_choose_language))
|
.setTitle(ResourceUtil.getString(R.string.tool_translation_choose_language))
|
||||||
.setItems(languageTo.equals(LANGUAGE_CHINESE) ? CHINESE_ITEMS : OTHER_ITEMS, (dialogInterface, i) -> {
|
.setItems(languageTo.equals(LANGUAGE_CHINESE) ? CHINESE_ITEMS : OTHER_ITEMS, (dialogInterface, i) -> {
|
||||||
@@ -114,26 +140,6 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
textViewLanguageFrom.setText(textViewLanguageTo.getText());
|
textViewLanguageFrom.setText(textViewLanguageTo.getText());
|
||||||
textViewLanguageTo.setText(temp);
|
textViewLanguageTo.setText(temp);
|
||||||
});
|
});
|
||||||
|
|
||||||
editTextFrom.addTextChangedListener(new TextWatcher() {
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
|
||||||
imageViewTranslate.setEnabled(charSequence.length() != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable editable) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
textViewTo.setOnFocusChangeListener((view, b) -> ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(editTextFrom.getWindowToken(), 0));
|
|
||||||
|
|
||||||
imageViewTranslate.setEnabled(false);
|
|
||||||
imageViewTranslate.setOnClickListener(view -> translate());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initLayout() {
|
private void initLayout() {
|
||||||
|
|||||||
@@ -14,23 +14,34 @@ import com.fatapp.oxygentoolbox.R;
|
|||||||
import com.fatapp.oxygentoolbox.util.ResourceUtil;
|
import com.fatapp.oxygentoolbox.util.ResourceUtil;
|
||||||
|
|
||||||
public class AboutFragment extends Fragment {
|
public class AboutFragment extends Fragment {
|
||||||
|
private TextView textViewAppVersion;
|
||||||
|
private TextView textViewOpenSource;
|
||||||
|
|
||||||
private AboutViewModel aboutViewModel;
|
private void initView(View root) {
|
||||||
|
textViewAppVersion = root.findViewById(R.id.text_view_app_version);
|
||||||
|
textViewOpenSource = root.findViewById(R.id.text_view_open_source);
|
||||||
|
}
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
ViewGroup container, Bundle savedInstanceState) {
|
ViewGroup container, Bundle savedInstanceState) {
|
||||||
View root = inflater.inflate(R.layout.fragment_about, container, false);
|
View root = inflater.inflate(R.layout.fragment_about, container, false);
|
||||||
|
|
||||||
TextView appVersion = root.findViewById(R.id.app_version);
|
initView(root);
|
||||||
appVersion.setText(String.format(ResourceUtil.getAppLocale(), "%s(%d)", ResourceUtil.getAppVersionName(), ResourceUtil.getAppVersionCode()));
|
initAppVersion();
|
||||||
|
initOpenSource();
|
||||||
|
|
||||||
TextView openSource = root.findViewById(R.id.open_source);
|
return root;
|
||||||
openSource.setOnClickListener(view -> {
|
}
|
||||||
|
|
||||||
|
private void initOpenSource() {
|
||||||
|
textViewOpenSource.setOnClickListener(view -> {
|
||||||
Intent intent = new Intent(getActivity(), LibrariesActivity.class);
|
Intent intent = new Intent(getActivity(), LibrariesActivity.class);
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return root;
|
private void initAppVersion() {
|
||||||
|
textViewAppVersion.setText(String.format(ResourceUtil.getAppLocale(), "%s(%d)", ResourceUtil.getAppVersionName(), ResourceUtil.getAppVersionCode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.fatapp.oxygentoolbox.ui.about;
|
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
|
||||||
import androidx.lifecycle.MutableLiveData;
|
|
||||||
import androidx.lifecycle.ViewModel;
|
|
||||||
|
|
||||||
public class AboutViewModel extends ViewModel {
|
|
||||||
|
|
||||||
private MutableLiveData<String> mText;
|
|
||||||
|
|
||||||
public AboutViewModel() {
|
|
||||||
mText = new MutableLiveData<>();
|
|
||||||
mText.setValue("This is about fragment");
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveData<String> getText() {
|
|
||||||
return mText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -30,12 +30,18 @@ import java.io.InputStreamReader;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class LibrariesActivity extends AppCompatActivity {
|
public class LibrariesActivity extends AppCompatActivity {
|
||||||
|
private LibrariesAdapter librariesAdapter;
|
||||||
|
|
||||||
|
private ConstraintLayout constraintLayoutRoot;
|
||||||
private Toolbar toolbar;
|
private Toolbar toolbar;
|
||||||
private ConstraintLayout librariesPage;
|
private RecyclerView recyclerViewLibraries;
|
||||||
private RecyclerView librariesRecyclerView;
|
|
||||||
private SearchView searchView;
|
private SearchView searchView;
|
||||||
|
|
||||||
private LibrariesAdapter librariesAdapter;
|
private void initView() {
|
||||||
|
constraintLayoutRoot = findViewById(R.id.constraint_layout_root);
|
||||||
|
toolbar = findViewById(R.id.toolbar);
|
||||||
|
recyclerViewLibraries = findViewById(R.id.recycler_view_libraries);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -44,23 +50,17 @@ public class LibrariesActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
initView();
|
initView();
|
||||||
initLayout();
|
initLayout();
|
||||||
loadLibraries();
|
initLibraries();
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
toolbar = findViewById(R.id.toolbar);
|
|
||||||
librariesPage = findViewById(R.id.libraries_page);
|
|
||||||
librariesRecyclerView = findViewById(R.id.libraries_recycler_view);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initLayout() {
|
private void initLayout() {
|
||||||
librariesPage.setPadding(0, ResourceUtil.getStatusBarHeight(getWindow(), getApplicationContext()), 0, 0);
|
constraintLayoutRoot.setPadding(0, ResourceUtil.getStatusBarHeight(getWindow(), getApplicationContext()), 0, 0);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
Objects.requireNonNull(getSupportActionBar()).setTitle(R.string.setting_open_source);
|
Objects.requireNonNull(getSupportActionBar()).setTitle(R.string.setting_open_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadLibraries() {
|
private void initLibraries() {
|
||||||
StringBuilder dependenciesJson = new StringBuilder();
|
StringBuilder dependenciesJson = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
InputStream inputStream = ResourceUtil.getResources().openRawResource(R.raw.dependencies);
|
InputStream inputStream = ResourceUtil.getResources().openRawResource(R.raw.dependencies);
|
||||||
@@ -72,10 +72,10 @@ public class LibrariesActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
DependenciesJson dependencies = new Gson().fromJson(dependenciesJson.toString(), new TypeToken<DependenciesJson>() {
|
DependenciesJson dependencies = new Gson().fromJson(dependenciesJson.toString(), new TypeToken<DependenciesJson>() {
|
||||||
}.getType());
|
}.getType());
|
||||||
librariesRecyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
recyclerViewLibraries.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||||
librariesAdapter = new LibrariesAdapter(this, dependencies);
|
librariesAdapter = new LibrariesAdapter(this, dependencies);
|
||||||
librariesRecyclerView.addItemDecoration(new LibrariesAdapter.LibrariesItemDecoration());
|
recyclerViewLibraries.addItemDecoration(new LibrariesAdapter.LibrariesItemDecoration());
|
||||||
librariesRecyclerView.setAdapter(librariesAdapter);
|
recyclerViewLibraries.setAdapter(librariesAdapter);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.d("TAG", e.toString());
|
Log.d("TAG", e.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ public class LibrariesAdapter extends RecyclerView.Adapter<LibrariesAdapter.View
|
|||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
cardView = (MaterialCardView) itemView;
|
cardView = (MaterialCardView) itemView;
|
||||||
libraryName = itemView.findViewById(R.id.library_name);
|
libraryName = itemView.findViewById(R.id.text_view_library_name);
|
||||||
libraryCreator = itemView.findViewById(R.id.library_creator);
|
libraryCreator = itemView.findViewById(R.id.text_view_library_creator);
|
||||||
libraryVersion = itemView.findViewById(R.id.library_version);
|
libraryVersion = itemView.findViewById(R.id.text_view_library_version);
|
||||||
libraryDescription = itemView.findViewById(R.id.library_description);
|
libraryDescription = itemView.findViewById(R.id.text_view_library_description);
|
||||||
libraryLicense = itemView.findViewById(R.id.library_license);
|
libraryLicense = itemView.findViewById(R.id.text_view_library_license);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextView getLibraryName() {
|
public TextView getLibraryName() {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import android.view.ViewGroup;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
@@ -19,29 +18,30 @@ import com.fatapp.oxygentoolbox.util.SharedPreferencesUtils;
|
|||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
public class HomeFragment extends Fragment {
|
public class HomeFragment extends Fragment {
|
||||||
|
private ViewPager2 viewPagerBottomNav;
|
||||||
|
private BottomNavigationView navigationViewBottomNav;
|
||||||
|
|
||||||
private View root;
|
private void initView(View root) {
|
||||||
|
viewPagerBottomNav = root.findViewById(R.id.view_pager_bottom_nav);
|
||||||
private HomeViewModel homeViewModel;
|
navigationViewBottomNav = root.findViewById(R.id.navigation_view_bottom_nav);
|
||||||
|
}
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
homeViewModel = new ViewModelProvider(this).get(HomeViewModel.class);
|
View root = inflater.inflate(R.layout.fragment_home, container, false);
|
||||||
root = inflater.inflate(R.layout.fragment_home, container, false);
|
|
||||||
|
|
||||||
ViewPager2 bottomNavViewPager = root.findViewById(R.id.bottom_nav_view_pager);
|
initView(root);
|
||||||
BottomNavigationView bottomNavigationView = root.findViewById(R.id.bottom_navigation_view);
|
initBottomNav();
|
||||||
|
|
||||||
bottomNavViewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
return root;
|
||||||
@Override
|
|
||||||
public void onPageSelected(int position) {
|
|
||||||
bottomNavigationView.getMenu().getItem(position).setChecked(true);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
bottomNavigationView.setOnItemSelectedListener(item -> {
|
private void initBottomNav() {
|
||||||
bottomNavViewPager.setCurrentItem(item.getOrder());
|
navigationViewBottomNav.setOnItemSelectedListener(item -> {
|
||||||
|
viewPagerBottomNav.setCurrentItem(item.getOrder());
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
bottomNavViewPager.setAdapter(new FragmentStateAdapter(this) {
|
|
||||||
|
viewPagerBottomNav.setAdapter(new FragmentStateAdapter(this) {
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Fragment createFragment(int position) {
|
public Fragment createFragment(int position) {
|
||||||
@@ -56,10 +56,13 @@ public class HomeFragment extends Fragment {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
viewPagerBottomNav.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||||
bottomNavViewPager.setCurrentItem(SharedPreferencesUtils.getPreferenceLaunchPage() == ResourceUtil.LaunchPage.TOOLS ? 0 : 1, false);
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
return root;
|
navigationViewBottomNav.getMenu().getItem(position).setChecked(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
viewPagerBottomNav.setCurrentItem(SharedPreferencesUtils.getPreferenceLaunchPage() == ResourceUtil.LaunchPage.TOOLS ? 0 : 1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.fatapp.oxygentoolbox.ui.home;
|
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
|
||||||
import androidx.lifecycle.MutableLiveData;
|
|
||||||
import androidx.lifecycle.ViewModel;
|
|
||||||
|
|
||||||
public class HomeViewModel extends ViewModel {
|
|
||||||
|
|
||||||
private MutableLiveData<String> mText;
|
|
||||||
|
|
||||||
public HomeViewModel() {
|
|
||||||
mText = new MutableLiveData<>();
|
|
||||||
mText.setValue("This is home fragment");
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveData<String> getText() {
|
|
||||||
return mText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,6 @@ import android.view.ViewGroup;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
@@ -16,29 +15,23 @@ import com.fatapp.oxygentoolbox.ui.home.util.ToolsAdapter;
|
|||||||
|
|
||||||
public class ToolsFragment extends Fragment {
|
public class ToolsFragment extends Fragment {
|
||||||
|
|
||||||
private View root;
|
private RecyclerView recyclerViewTools;
|
||||||
|
|
||||||
private ToolsViewModel toolsViewModel;
|
private void initView(View root) {
|
||||||
|
recyclerViewTools = root.findViewById(R.id.recycler_view_tools);
|
||||||
private RecyclerView toolsRecyclerView;
|
}
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
toolsViewModel = new ViewModelProvider(this).get(ToolsViewModel.class);
|
View root = inflater.inflate(R.layout.fragment_home_tools, container, false);
|
||||||
root = inflater.inflate(R.layout.fragment_home_tools, container, false);
|
|
||||||
|
|
||||||
//init
|
initView(root);
|
||||||
initView();
|
initTools();
|
||||||
initLayout();
|
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initTools() {
|
||||||
toolsRecyclerView = root.findViewById(R.id.tools_recycler_view);
|
recyclerViewTools.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
}
|
recyclerViewTools.setAdapter(new ToolsAdapter(getActivity()));
|
||||||
|
|
||||||
private void initLayout() {
|
|
||||||
toolsRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
|
||||||
toolsRecyclerView.setAdapter(new ToolsAdapter(getActivity()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.fatapp.oxygentoolbox.ui.home.tools;
|
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
|
||||||
import androidx.lifecycle.MutableLiveData;
|
|
||||||
import androidx.lifecycle.ViewModel;
|
|
||||||
|
|
||||||
public class ToolsViewModel extends ViewModel {
|
|
||||||
|
|
||||||
private MutableLiveData<String> mText;
|
|
||||||
|
|
||||||
public ToolsViewModel() {
|
|
||||||
mText = new MutableLiveData<>();
|
|
||||||
mText.setValue("This is home fragment");
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveData<String> getText() {
|
|
||||||
return mText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -46,7 +46,7 @@ public class ToolsAdapter extends RecyclerView.Adapter<ToolsAdapter.ViewHolder>
|
|||||||
ToolsList.Tool tool = ToolsList.getToolList().get(position);
|
ToolsList.Tool tool = ToolsList.getToolList().get(position);
|
||||||
for (ToolsList.Button button : tool.getButtonList()) {
|
for (ToolsList.Button button : tool.getButtonList()) {
|
||||||
View toolButtonLayout = LayoutInflater.from(parent.getContext()).inflate(R.layout.fold_layout_button, parent, false);
|
View toolButtonLayout = LayoutInflater.from(parent.getContext()).inflate(R.layout.fold_layout_button, parent, false);
|
||||||
Button toolButton = toolButtonLayout.findViewById(R.id.tool_button);
|
Button toolButton = toolButtonLayout.findViewById(R.id.button_tool);
|
||||||
toolButton.setText(button.getText());
|
toolButton.setText(button.getText());
|
||||||
toolButton.setOnClickListener(view -> ToolsLauncher.launch(activity, parent.getContext(), button.getActivity()));
|
toolButton.setOnClickListener(view -> ToolsLauncher.launch(activity, parent.getContext(), button.getActivity()));
|
||||||
toolButton.setOnTouchListener((view, motionEvent) -> {
|
toolButton.setOnTouchListener((view, motionEvent) -> {
|
||||||
@@ -66,10 +66,10 @@ public class ToolsAdapter extends RecyclerView.Adapter<ToolsAdapter.ViewHolder>
|
|||||||
autoLinefeedLayout.addView(toolButtonLayout);
|
autoLinefeedLayout.addView(toolButtonLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextView foldLayoutIcon = holder.getFoldLayout().findViewById(R.id.fold_layout_icon);
|
TextView foldLayoutIcon = holder.getFoldLayout().findViewById(R.id.text_view_icon);
|
||||||
foldLayoutIcon.setTypeface(Typeface.createFromAsset(parent.getContext().getAssets(), tool.getFont()));
|
foldLayoutIcon.setTypeface(Typeface.createFromAsset(parent.getContext().getAssets(), tool.getFont()));
|
||||||
foldLayoutIcon.setText(tool.getIcon());
|
foldLayoutIcon.setText(tool.getIcon());
|
||||||
((TextView) holder.getFoldLayout().findViewById(R.id.fold_layout_text_view)).setText(tool.getFoldLayoutTitle());
|
((TextView) holder.getFoldLayout().findViewById(R.id.text_view_title)).setText(tool.getFoldLayoutTitle());
|
||||||
holder.getFoldLayout().addItemView(Collections.singletonList(foldLayoutBodyLayout));
|
holder.getFoldLayout().addItemView(Collections.singletonList(foldLayoutBodyLayout));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class SettingFragment extends PreferenceFragmentCompat {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable String rootKey) {
|
public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable String rootKey) {
|
||||||
setPreferencesFromResource(R.xml.fragment_setting, rootKey);
|
setPreferencesFromResource(R.xml.fragment_setting, rootKey);
|
||||||
|
|
||||||
ListPreference appLanguagePreference = findPreference(ResourceUtil.getString(R.string.setting_language_key));
|
ListPreference appLanguagePreference = findPreference(ResourceUtil.getString(R.string.setting_language_key));
|
||||||
if (appLanguagePreference != null) {
|
if (appLanguagePreference != null) {
|
||||||
appLanguagePreference.setOnPreferenceChangeListener((preference, newValue) -> {
|
appLanguagePreference.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.fatapp.oxygentoolbox.ui.setting;
|
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
|
||||||
import androidx.lifecycle.MutableLiveData;
|
|
||||||
import androidx.lifecycle.ViewModel;
|
|
||||||
|
|
||||||
public class SettingViewModel extends ViewModel {
|
|
||||||
|
|
||||||
private MutableLiveData<String> mText;
|
|
||||||
|
|
||||||
public SettingViewModel() {
|
|
||||||
mText = new MutableLiveData<>();
|
|
||||||
mText.setValue("This is setting fragment");
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveData<String> getText() {
|
|
||||||
return mText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,6 @@ import android.view.ViewGroup;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
@@ -15,17 +14,23 @@ import com.fatapp.oxygentoolbox.R;
|
|||||||
import com.fatapp.oxygentoolbox.ui.theme.util.ThemesAdapter;
|
import com.fatapp.oxygentoolbox.ui.theme.util.ThemesAdapter;
|
||||||
|
|
||||||
public class ThemeFragment extends Fragment {
|
public class ThemeFragment extends Fragment {
|
||||||
|
private RecyclerView recyclerViewThemes;
|
||||||
|
|
||||||
private ThemeViewModel themeViewModel;
|
private void initView(View root) {
|
||||||
|
recyclerViewThemes = root.findViewById(R.id.recycler_view_themes);
|
||||||
|
}
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
themeViewModel = new ViewModelProvider(this).get(ThemeViewModel.class);
|
|
||||||
View root = inflater.inflate(R.layout.fragment_theme, container, false);
|
View root = inflater.inflate(R.layout.fragment_theme, container, false);
|
||||||
|
|
||||||
RecyclerView themeRecyclerView = root.findViewById(R.id.theme_recycler_view);
|
initView(root);
|
||||||
themeRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
initThemes();
|
||||||
themeRecyclerView.setAdapter(new ThemesAdapter(getActivity()));
|
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initThemes() {
|
||||||
|
recyclerViewThemes.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
recyclerViewThemes.setAdapter(new ThemesAdapter(getActivity()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.fatapp.oxygentoolbox.ui.theme;
|
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
|
||||||
import androidx.lifecycle.MutableLiveData;
|
|
||||||
import androidx.lifecycle.ViewModel;
|
|
||||||
|
|
||||||
public class ThemeViewModel extends ViewModel {
|
|
||||||
|
|
||||||
private MutableLiveData<String> mText;
|
|
||||||
|
|
||||||
public ThemeViewModel() {
|
|
||||||
mText = new MutableLiveData<>();
|
|
||||||
mText.setValue("This is theme fragment");
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveData<String> getText() {
|
|
||||||
return mText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -116,13 +116,13 @@ public class ThemesAdapter extends RecyclerView.Adapter<ThemesAdapter.ViewHolder
|
|||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
themeLayout = itemView.findViewById(R.id.theme_layout);
|
themeLayout = itemView.findViewById(R.id.linear_layout_root);
|
||||||
colorName = itemView.findViewById(R.id.color_name);
|
colorName = itemView.findViewById(R.id.text_view_color_name);
|
||||||
check = itemView.findViewById(R.id.check);
|
check = itemView.findViewById(R.id.view_check);
|
||||||
primaryColor = itemView.findViewById(R.id.primary_color);
|
primaryColor = itemView.findViewById(R.id.linear_layout_primary_color);
|
||||||
primaryDarkColor = itemView.findViewById(R.id.primary_dark_color);
|
primaryDarkColor = itemView.findViewById(R.id.view_primary_dark_color);
|
||||||
primaryLightColor = itemView.findViewById(R.id.primary_light_color);
|
primaryLightColor = itemView.findViewById(R.id.view_primary_light_color);
|
||||||
accentColor = itemView.findViewById(R.id.accent_color);
|
accentColor = itemView.findViewById(R.id.view_accent_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LinearLayout getThemeLayout() {
|
public LinearLayout getThemeLayout() {
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
<aapt:attr name="android:drawable">
|
<aapt:attr name="android:drawable">
|
||||||
<vector
|
<vector
|
||||||
android:name="vector"
|
android:name="vector"
|
||||||
android:width="1026dp"
|
android:width="24dp"
|
||||||
android:height="1024dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="1026"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="1024">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:name="path"
|
android:name="path"
|
||||||
android:fillColor="?attr/tools_arrow"
|
android:fillColor="?attr/tools_arrow"
|
||||||
android:pathData="M 1008.02 276.637 C 983.509 254.352 945.634 256.617 923.35 278.864 L 513.35 720.056 L 103.351 278.826 C 81.067 254.315 43.18 254.315 18.668 276.599 C -5.843 298.883 -5.843 336.758 16.441 361.269 L 468.782 849.245 C 479.918 860.393 495.52 869.264 513.35 869.264 C 528.941 869.264 546.77 862.583 557.906 849.245 L 1010.247 361.269 C 1032.531 336.758 1032.531 298.883 1008.02 276.599 Z M 1008.02 276.637"
|
android:pathData="M23.58,6.48C23.01,5.96 22.12,6.01 21.6,6.54L12.01,16.88L2.42,6.54C1.9,5.96 1.01,5.96 0.44,6.48C-0.14,7.01 -0.14,7.89 0.38,8.47L10.97,19.9C11.23,20.17 11.59,20.37 12.01,20.37C12.37,20.37 12.79,20.22 13.05,19.9L23.63,8.47C24.15,7.89 24.15,7.01 23.58,6.48Z"
|
||||||
android:strokeWidth="1" />
|
android:strokeWidth="1" />
|
||||||
</vector>
|
</vector>
|
||||||
</aapt:attr>
|
</aapt:attr>
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
android:duration="300"
|
android:duration="300"
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
android:interpolator="@android:interpolator/fast_out_slow_in"
|
||||||
android:propertyName="pathData"
|
android:propertyName="pathData"
|
||||||
android:valueFrom="M 1008.02 276.637 C 983.509 254.352 945.634 256.617 923.35 278.864 L 513.35 720.056 L 103.351 278.826 C 81.067 254.315 43.18 254.315 18.668 276.599 C -5.843 298.883 -5.843 336.758 16.441 361.269 L 468.782 849.245 C 479.918 860.393 495.52 869.264 513.35 869.264 C 528.941 869.264 546.77 862.583 557.906 849.245 L 1010.247 361.269 C 1032.531 336.758 1032.531 298.883 1008.02 276.599 Z M 1008.02 276.637"
|
android:valueFrom="M23.58,6.48C23.01,5.96 22.12,6.01 21.6,6.54L12.01,16.88L2.42,6.54C1.9,5.96 1.01,5.96 0.44,6.48C-0.14,7.01 -0.14,7.89 0.38,8.47L10.97,19.9C11.23,20.17 11.59,20.37 12.01,20.37C12.37,20.37 12.79,20.22 13.05,19.9L23.63,8.47C24.15,7.89 24.15,7.01 23.58,6.48Z"
|
||||||
android:valueTo="M 13.25 15.29 C -4.56 34.88 -2.78 65.15 15 83 L 367.64 410.64 L 15 738.32 C -4.56 756.14 -4.56 786.41 13.25 806 C 31.06 825.59 61.33 825.59 80.92 807.78 L 470.92 446.26 C 479.83 437.36 486.92 424.89 486.92 410.64 C 486.92 398.18 481.58 383.93 470.92 375.03 L 80.92 13.51 C 61.33 -4.3 31.06 -4.3 13.25 15.29 Z M 13.25 15.29"
|
android:valueTo="M0.31,0.36C-0.11,0.82 -0.07,1.53 0.35,1.95L8.6,9.62L0.35,17.3C-0.11,17.72 -0.11,18.43 0.31,18.89C0.73,19.35 1.43,19.35 1.89,18.93L11.02,10.46C11.22,10.25 11.39,9.96 11.39,9.62C11.39,9.33 11.27,9 11.02,8.79L1.89,0.32C1.43,-0.1 0.73,-0.1 0.31,0.36Z"
|
||||||
android:valueType="pathType" />
|
android:valueType="pathType" />
|
||||||
</aapt:attr>
|
</aapt:attr>
|
||||||
</target>
|
</target>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<aapt:attr name="android:drawable">
|
<aapt:attr name="android:drawable">
|
||||||
<vector
|
<vector
|
||||||
android:name="vector"
|
android:name="vector"
|
||||||
android:width="1026dp"
|
android:width="24dp"
|
||||||
android:height="1024dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="1026"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="1024">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:name="path"
|
android:name="path"
|
||||||
android:pathData="M 13.25 15.29 C -4.56 34.88 -2.78 65.15 15 83 L 367.64 410.64 L 15 738.32 C -4.56 756.14 -4.56 786.41 13.25 806 C 31.06 825.59 61.33 825.59 80.92 807.78 L 470.92 446.26 C 479.83 437.36 486.92 424.89 486.92 410.64 C 486.92 398.18 481.58 383.93 470.92 375.03 L 80.92 13.51 C 61.33 -4.3 31.06 -4.3 13.25 15.29 Z M 13.25 15.29"
|
android:pathData="M0.31,0.36C-0.11,0.82 -0.07,1.53 0.35,1.95L8.6,9.62L0.35,17.3C-0.11,17.72 -0.11,18.43 0.31,18.89C0.73,19.35 1.43,19.35 1.89,18.93L11.02,10.46C11.22,10.25 11.39,9.96 11.39,9.62C11.39,9.33 11.27,9 11.02,8.79L1.89,0.32C1.43,-0.1 0.73,-0.1 0.31,0.36Z"
|
||||||
android:fillColor="?attr/tools_arrow"
|
android:fillColor="?attr/tools_arrow"
|
||||||
android:strokeWidth="1"/>
|
android:strokeWidth="1"/>
|
||||||
</vector>
|
</vector>
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
<objectAnimator
|
<objectAnimator
|
||||||
android:propertyName="pathData"
|
android:propertyName="pathData"
|
||||||
android:duration="300"
|
android:duration="300"
|
||||||
android:valueFrom="M 13.25 15.29 C -4.56 34.88 -2.78 65.15 15 83 L 367.64 410.64 L 15 738.32 C -4.56 756.14 -4.56 786.41 13.25 806 C 31.06 825.59 61.33 825.59 80.92 807.78 L 470.92 446.26 C 479.83 437.36 486.92 424.89 486.92 410.64 C 486.92 398.18 481.58 383.93 470.92 375.03 L 80.92 13.51 C 61.33 -4.3 31.06 -4.3 13.25 15.29 Z M 13.25 15.29"
|
android:valueFrom="M0.31,0.36C-0.11,0.82 -0.07,1.53 0.35,1.95L8.6,9.62L0.35,17.3C-0.11,17.72 -0.11,18.43 0.31,18.89C0.73,19.35 1.43,19.35 1.89,18.93L11.02,10.46C11.22,10.25 11.39,9.96 11.39,9.62C11.39,9.33 11.27,9 11.02,8.79L1.89,0.32C1.43,-0.1 0.73,-0.1 0.31,0.36Z"
|
||||||
android:valueTo="M 1008.02 276.637 C 983.509 254.352 945.634 256.617 923.35 278.864 L 513.35 720.056 L 103.351 278.826 C 81.067 254.315 43.18 254.315 18.668 276.599 C -5.843 298.883 -5.843 336.758 16.441 361.269 L 468.782 849.245 C 479.918 860.393 495.52 869.264 513.35 869.264 C 528.941 869.264 546.77 862.583 557.906 849.245 L 1010.247 361.269 C 1032.531 336.758 1032.531 298.883 1008.02 276.599 Z M 1008.02 276.637"
|
android:valueTo="M23.58,6.48C23.01,5.96 22.12,6.01 21.6,6.54L12.01,16.88L2.42,6.54C1.9,5.96 1.01,5.96 0.44,6.48C-0.14,7.01 -0.14,7.89 0.38,8.47L10.97,19.9C11.23,20.17 11.59,20.37 12.01,20.37C12.37,20.37 12.79,20.22 13.05,19.9L23.63,8.47C24.15,7.89 24.15,7.01 23.58,6.48Z"
|
||||||
android:valueType="pathType"
|
android:valueType="pathType"
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
||||||
</aapt:attr>
|
</aapt:attr>
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
<vector android:autoMirrored="true" android:height="24dp"
|
|
||||||
android:tint="#000000" android:viewportHeight="24"
|
|
||||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M12,3c-4.97,0 -9,4.03 -9,9s4.03,9 9,9s9,-4.03 9,-9c0,-0.46 -0.04,-0.92 -0.1,-1.36c-0.98,1.37 -2.58,2.26 -4.4,2.26c-2.98,0 -5.4,-2.42 -5.4,-5.4c0,-1.81 0.89,-3.42 2.26,-4.4C12.92,3.04 12.46,3 12,3L12,3z"/>
|
|
||||||
</vector>
|
|
||||||
10
app/src/main/res/drawable/ic_favorite.xml
Normal file
10
app/src/main/res/drawable/ic_favorite.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:autoMirrored="true"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?app_on_theme"
|
||||||
|
android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z" />
|
||||||
|
</vector>
|
||||||
10
app/src/main/res/drawable/ic_home.xml
Normal file
10
app/src/main/res/drawable/ic_home.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:autoMirrored="true"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/app_on_theme"
|
||||||
|
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
|
||||||
|
</vector>
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<vector android:autoMirrored="true" android:height="24dp"
|
|
||||||
android:tint="#000000" android:viewportHeight="24"
|
|
||||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M12,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5s5,-2.24 5,-5S14.76,7 12,7L12,7zM2,13l2,0c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1l-2,0c-0.55,0 -1,0.45 -1,1S1.45,13 2,13zM20,13l2,0c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1l-2,0c-0.55,0 -1,0.45 -1,1S19.45,13 20,13zM11,2v2c0,0.55 0.45,1 1,1s1,-0.45 1,-1V2c0,-0.55 -0.45,-1 -1,-1S11,1.45 11,2zM11,20v2c0,0.55 0.45,1 1,1s1,-0.45 1,-1v-2c0,-0.55 -0.45,-1 -1,-1C11.45,19 11,19.45 11,20zM5.99,4.58c-0.39,-0.39 -1.03,-0.39 -1.41,0c-0.39,0.39 -0.39,1.03 0,1.41l1.06,1.06c0.39,0.39 1.03,0.39 1.41,0s0.39,-1.03 0,-1.41L5.99,4.58zM18.36,16.95c-0.39,-0.39 -1.03,-0.39 -1.41,0c-0.39,0.39 -0.39,1.03 0,1.41l1.06,1.06c0.39,0.39 1.03,0.39 1.41,0c0.39,-0.39 0.39,-1.03 0,-1.41L18.36,16.95zM19.42,5.99c0.39,-0.39 0.39,-1.03 0,-1.41c-0.39,-0.39 -1.03,-0.39 -1.41,0l-1.06,1.06c-0.39,0.39 -0.39,1.03 0,1.41s1.03,0.39 1.41,0L19.42,5.99zM7.05,18.36c0.39,-0.39 0.39,-1.03 0,-1.41c-0.39,-0.39 -1.03,-0.39 -1.41,0l-1.06,1.06c-0.39,0.39 -0.39,1.03 0,1.41s1.03,0.39 1.41,0L7.05,18.36z"/>
|
|
||||||
</vector>
|
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="200dp"
|
android:width="24dp"
|
||||||
android:height="200dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="1024"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="1024">
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="?attr/app_theme"
|
android:fillColor="?attr/app_theme"
|
||||||
android:pathData="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0z m62.464 774.144c0 27.648-22.528 50.176-50.176 50.176h-25.088c-27.648 0-50.176-22.528-50.176-50.176V474.624c0-27.648 22.528-50.176 50.176-50.176h25.088c27.648 0 50.176 22.528 50.176 50.176v299.52zM512 349.696c-34.304 0-62.464-28.16-62.464-62.464 0-34.304 28.16-62.464 62.464-62.464s62.464 28.16 62.464 62.464c0 34.304-28.16 62.464-62.464 62.464z" />
|
android:pathData="M 12 0 C 5.376 0 0 5.376 0 12 s 5.376 12 12 12 12 -5.376 12 -12 S 18.624 0 12 0 z m 1.464 18.144 c 0 0.648 -0.528 1.176 -1.176 1.176 h -0.588 c -0.648 0 -1.176 -0.528 -1.176 -1.176 V 11.124 c 0 -0.648 0.528 -1.176 1.176 -1.176 h 0.588 c 0.648 0 1.176 0.528 1.176 1.176 v 7.02 z M 12 8.196 c -0.804 0 -1.464 -0.66 -1.464 -1.464 0 -0.804 0.66 -1.464 1.464 -1.464 s 1.464 0.66 1.464 1.464 c 0 0.804 -0.66 1.464 -1.464 1.464 z
|
||||||
|
" />
|
||||||
</vector>
|
</vector>
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="200dp"
|
android:width="24dp"
|
||||||
android:height="200dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="1024"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="1024">
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="?attr/app_theme"
|
android:fillColor="?attr/app_theme"
|
||||||
android:pathData="M952.7 492.1c-1.4-1.8-3.1-3.4-4.8-4.9l-179-178.9c-12.5-12.5-32.9-12.5-45.4 0s-12.5 32.9 0 45.4l126 126H421.3h-0.1c-18.2 0-32.9 14.8-32.9 33s14.7 33 32.9 33c0.3 0.1 0.5 0 0.7 0h427.8l-126 126c-12.3 12.3-12.3 32.4 0 44.7l0.7 0.7c12.3 12.3 32.4 12.3 44.7 0l182-182c11.7-11.7 12.3-30.6 1.6-43z" />
|
android:pathData="M 22.32890625 11.53359375 c -0.0328125 -0.0421875 -0.07265625 -0.0796875 -0.1125 -0.11484375 l -4.1953125 -4.19296875 c -0.29296875 -0.29296875 -0.77109375 -0.29296875 -1.0640625 0 s -0.29296875 0.77109375 0 1.0640625 l 2.953125 2.953125 H 9.87421875 h -0.00234375 c -0.4265625 0 -0.77109375 0.346875 -0.77109375 0.7734375 s 0.34453125 0.7734375 0.77109375 0.7734375 c 0.00703125 0.00234375 0.01171875 0 0.01640625 0 h 10.0265625 l -2.953125 2.953125 c -0.28828125 0.28828125 -0.28828125 0.759375 0 1.04765625 l 0.01640625 0.01640625 c 0.28828125 0.28828125 0.759375 0.28828125 1.04765625 0 l 4.265625 -4.265625 c 0.27421875 -0.27421875 0.28828125 -0.7171875 0.0375 -1.0078125 z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="?attr/app_theme"
|
android:fillColor="?attr/app_theme"
|
||||||
android:pathData="M562.3 799c-18 0-32.7 14.7-32.7 32.7v63.8H129.2V128.7h400.4v63.1c0 18 14.7 32.7 32.7 32.7s32.7-14.7 32.7-32.7V96.3c0-3.5-0.6-6.8-1.6-10-4.2-13.3-16.6-23-31.2-23H96.6c-18 0-32.7 14.7-32.7 32.7v831.9c0 14.2 9.2 26.3 21.8 30.8 3.6 1.4 7.5 2.1 11.5 2.1h463.2c0.6 0 1.3 0.1 1.9 0.1 18 0 32.7-14.7 32.7-32.7v-96.5c0-18-14.7-32.7-32.7-32.7z" />
|
android:pathData="M 13.17890625 18.7265625 c -0.421875 0 -0.76640625 0.34453125 -0.76640625 0.76640625 v 1.4953125 H 3.028125 V 3.01640625 h 9.384375 v 1.47890625 c 0 0.421875 0.34453125 0.76640625 0.76640625 0.76640625 s 0.76640625 -0.34453125 0.76640625 -0.76640625 V 2.25703125 c 0 -0.08203125 -0.0140625 -0.159375 -0.0375 -0.234375 -0.0984375 -0.31171875 -0.3890625 -0.5390625 -0.73125 -0.5390625 H 2.2640625 c -0.421875 0 -0.76640625 0.34453125 -0.76640625 0.76640625 v 19.49765625 c 0 0.3328125 0.215625 0.61640625 0.5109375 0.721875 0.084375 0.0328125 0.17578125 0.04921875 0.26953125 0.04921875 h 10.85625 c 0.0140625 0 0.03046875 0.00234375 0.04453125 0.00234375 0.421875 0 0.76640625 -0.34453125 0.76640625 -0.76640625 v -2.26171875 c 0 -0.421875 -0.34453125 -0.76640625 -0.76640625 -0.76640625 z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="?attr/app_theme"
|
android:fillColor="?attr/app_theme"
|
||||||
android:pathData="M256.8 512.7a32.9 33 0 1 0 65.8 0 32.9 33 0 1 0-65.8 0Z" />
|
android:pathData="M 6.01875 12.01640625 a 0.77109375 0.7734375 0 0.0234375 0 1.5421875 0 0.77109375 0.7734375 0 0.0234375 0 -1.5421875 0 Z" />
|
||||||
</vector>
|
</vector>
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="200dp"
|
android:width="24dp"
|
||||||
android:height="200dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="1036"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="1024">
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="?attr/app_theme"
|
android:fillColor="?attr/app_theme"
|
||||||
android:pathData="M1014.628571 504L543.885714 33.6a36.491429 36.491429 0 0 0-51.657143 0L21.485714 504c-13.714286 13.714286-21.485714 32.342857-21.485714 51.771429 0 40.342857 32.8 73.142857 73.142857 73.142857h49.6V964.571429c0 20.228571 16.342857 36.571429 36.571429 36.571428H444.914286V745.142857h128v256h303.885714c20.228571 0 36.571429-16.342857 36.571429-36.571428V628.914286h49.6c19.428571 0 38.057143-7.657143 51.771428-21.485715 28.457143-28.571429 28.457143-74.857143-0.114286-103.428571z" />
|
android:pathData="M 23.7803571328125 11.8125 L 12.747321421875 0.7875 a 0.8552678671875 0.8552678671875 0 0 0 -1.2107142890625 0 L 0.503571421875 11.8125 c -0.321428578125 0.321428578125 -0.503571421875 0.7580357109375 -0.503571421875 1.2133928671875 0 0.9455357109375 0.76875 1.7142857109375 1.7142857109375 1.7142857109375 h 1.1625 V 22.6071428671875 c 0 0.4741071328125 0.3830357109375 0.8571428671875 0.8571428671875 0.85714284375 H 10.427678578125 V 17.4642857109375 h 3 v 6 h 7.122321421875 c 0.4741071328125 0 0.8571428671875 -0.3830357109375 0.8571428671875 -0.85714284375 V 14.740178578125 h 1.1625 c 0.4553571328125 0 0.8919642890625 -0.1794642890625 1.21339284375 -0.5035714453125 0.6669642890625 -0.6696428671875 0.6669642890625 -1.7544642890625 -0.002678578125 -2.4241071328125 z" />
|
||||||
</vector>
|
</vector>
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="200dp"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:height="200dp"
|
android:width="24dp"
|
||||||
android:viewportWidth="1024"
|
android:height="24dp"
|
||||||
android:viewportHeight="1024">
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="?attr/app_theme"
|
android:fillColor="?attr/app_theme"
|
||||||
android:pathData="M542.464 85.333333c23.466667-0.426667 45.696 8.106667 62.293333 24.32 16.682667 15.786667 25.6 37.546667 25.6 60.586667 0 46.933333 38.826667 84.949333 87.082667 84.949333 14.933333 0 29.866667-4.266667 43.093333-11.52 41.386667-22.272 93.013333-8.106667 116.48 31.573334l29.013334 49.92c7.253333 12.8 11.52 27.306667 11.52 42.24 0 30.293333-16.64 58.453333-43.52 73.386666-13.226667 7.253333-24.32 18.346667-32 31.146667a83.626667 83.626667 0 0 0 32 113.92 84.394667 84.394667 0 0 1 32 115.2l-29.013334 48.213333c-15.36 26.453333-43.946667 42.666667-74.666666 42.666667-15.36 0-30.72-3.84-43.52-11.52-13.653333-7.253333-28.586667-11.52-43.52-11.52-23.04 0-45.226667 8.96-61.44 25.173333-16.64 15.786667-25.6 37.546667-25.6 60.16 0 46.506667-38.826667 84.48-87.04 84.48h-58.453334c-23.04 0-44.8-9.386667-60.586666-25.173333-16.213333-16.213333-24.746667-37.546667-24.746667-59.733333 0-46.933333-38.4-84.906667-86.613333-84.906667-15.786667 0-31.146667 4.266667-44.373334 12.373333a91.733333 91.733333 0 0 1-66.133333 8.533334c-22.186667-5.973333-41.386667-20.48-52.906667-39.68l-27.306666-48.213334a83.157333 83.157333 0 0 1-10.666667-66.56c5.973333-22.613333 21.333333-41.813333 42.24-53.333333 13.226667-7.253333 24.32-17.92 32-31.146667a84.48 84.48 0 0 0-32-113.92 83.072 83.072 0 0 1-31.573333-113.92l27.306666-47.786666c11.52-20.053333 30.72-34.56 53.333334-40.533334a88.149333 88.149333 0 0 1 66.56 8.96c13.653333 7.253333 28.586667 11.093333 43.52 11.093334 23.04 0 45.226667-8.96 61.44-24.746667 16.213333-15.786667 25.173333-37.546667 25.173333-59.733333 0-46.933333 38.826667-84.906667 87.04-84.906667z m17.109333 319.189334a121.728 121.728 0 0 0-130.986666 25.173333c-34.133333 33.28-44.8 84.053333-26.026667 127.573333a119.210667 119.210667 0 0 0 110.506667 72.533334h0.426666c32 0.426667 61.866667-11.946667 84.48-34.133334 22.613333-21.76 35.413333-51.626667 35.413334-82.773333 0.426667-47.36-29.013333-90.453333-73.813334-108.373333z" />
|
android:pathData="M 12.714 1.9999999921875 c 0.5500000078125 -0.0100000078125 1.071 0.1900000078125 1.4599999921875 0.57 0.3910000078125 0.3700000078125 0.6 0.8800000078125 0.6 1.4200000078125 0 1.0999999921875 0.9100000078125 1.9909999921875 2.0410000078125 1.9909999921875 0.3499999921875 0 0.7000000078125 -0.1000000078125 1.0099999921875 -0.27 0.9700000078125 -0.522 2.1799999921875 -0.1900000078125 2.73 0.740000015625 l 0.680000015625 1.17 c 0.1699999921875 0.3 0.27 0.6400000078125 0.27 0.99 0 0.7099999921875 -0.39 1.3699999921875 -1.02 1.719999984375 -0.3100000078125 0.1699999921875 -0.57 0.4300000078125 -0.75 0.7300000078125 a 1.9600000078125 1.9600000078125 0 0 0 0.75 2.67 1.9780000078125 1.9780000078125 0 0 0.0234375 0.75 2.7 l -0.680000015625 1.1299999921875 c -0.36 0.6199999921875 -1.0300000078125 1.0000000078125 -1.749999984375 1.0000000078125 -0.36 0 -0.72 -0.09 -1.02 -0.27 -0.3199999921875 -0.1699999921875 -0.6700000078125 -0.27 -1.02 -0.27 -0.54 0 -1.0600000078125 0.21 -1.44 0.5899999921875 -0.39 0.3700000078125 -0.6 0.8800000078125 -0.6 1.41 0 1.0900000078125 -0.9100000078125 1.98 -2.04 1.98 h -1.370000015625 c -0.54 0 -1.05 -0.2200000078125 -1.419999984375 -0.5899999921875 -0.3799999921875 -0.3799999921875 -0.5800000078125 -0.8800000078125 -0.5800000078125 -1.3999999921875 0 -1.0999999921875 -0.9 -1.9900000078125 -2.0299999921875 -1.9900000078125 -0.3700000078125 0 -0.7300000078125 0.1000000078125 -1.040000015625 0.2899999921875 a 2.1499999921875 2.1499999921875 0 0 0.0234375 -1.5499999921875 0.200000015625 c -0.5200000078125 -0.1399999921875 -0.9700000078125 -0.48 -1.2400000078125 -0.93 l -0.639999984375 -1.130000015625 a 1.9489999921875 1.9489999921875 0 0 0.0234375 -0.2500000078125 -1.56 c 0.1399999921875 -0.5299999921875 0.4999999921875 -0.9799999921875 0.99 -1.2499999921875 0.3100000078125 -0.1699999921875 0.57 -0.42 0.75 -0.7300000078125 a 1.98 1.98 0 0 0 -0.75 -2.67 1.947 1.947 0 0 0.0234375 -0.7399999921875 -2.67 l 0.639999984375 -1.119999984375 c 0.27 -0.4699999921875 0.72 -0.81 1.250000015625 -0.950000015625 a 2.0659999921875 2.0659999921875 0 0 0.0234375 1.56 0.21 c 0.3199999921875 0.1699999921875 0.6700000078125 0.2599999921875 1.02 0.260000015625 0.54 0 1.0600000078125 -0.21 1.44 -0.5800000078125 0.3799999921875 -0.3700000078125 0.5899999921875 -0.8800000078125 0.5899999921875 -1.3999999921875 0 -1.0999999921875 0.9100000078125 -1.9900000078125 2.04 -1.9900000078125 z m 0.4009999921875 7.481000015625 a 2.853 2.853 0 0 0 -3.069999984375 0.5899999921875 c -0.7999999921875 0.78 -1.05 1.9699999921875 -0.6100000078125 2.9899999921875 a 2.7940000078125 2.7940000078125 0 0 0 2.5900000078125 1.700000015625 h 0.009999984375 c 0.75 0.0100000078125 1.4500000078125 -0.2800000078125 1.98 -0.800000015625 0.5299999921875 -0.51 0.8299999921875 -1.2100000078125 0.830000015625 -1.9399999921875 0.0100000078125 -1.11 -0.6799999921875 -2.1199999921875 -1.730000015625 -2.5399999921875 z"
|
||||||
|
tools:ignore="VectorPath" />
|
||||||
</vector>
|
</vector>
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="200dp"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:height="200dp"
|
android:width="24dp"
|
||||||
android:viewportWidth="1024"
|
android:height="24dp"
|
||||||
android:viewportHeight="1024">
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="?attr/app_theme"
|
android:fillColor="?attr/app_theme"
|
||||||
android:pathData="M1004.12788 321.092L762.77088 79.735a68.267 68.267 0 0 0-96.546 0l-30.293 30.294a68.284 68.284 0 0 1-48.265 20.002H436.47388a68.181 68.181 0 0 1-48.265-20.002l-30.293-30.294a68.267 68.267 0 0 0-96.546 0L19.99588 321.092a68.267 68.267 0 0 0 0 96.546l96.546 96.547a67.84 67.84 0 0 0 66.645 17.271c10.804-3.072 21.675 4.181 21.675 15.411V896c0 37.547 30.72 68.267 68.267 68.267H750.99388c37.547 0 68.267-30.72 68.267-68.267V546.867c0-11.23 10.872-18.483 21.675-15.411a67.84 67.84 0 0 0 66.645-17.271l96.546-96.547a68.267 68.267 0 0 0 0-96.546z" />
|
android:pathData="M 23.5342471875 7.52559375 L 17.8774425 1.8687890625 a 1.6000078125 1.6000078125 0 0 0 -2.262796875 0 l -0.7099921875 0.710015625 a 1.60040625 1.60040625 0 0 0.0234375 -1.1312109375 0.468796875 H 10.2298565625 a 1.5979921875 1.5979921875 0 0 0.0234375 -1.1312109375 -0.468796875 l -0.7099921875 -0.710015625 a 1.6000078125 1.6000078125 0 0 0 -2.262796875 0 L 0.4686534375 7.52559375 a 1.6000078125 1.6000078125 0 0 0 0 2.262796875 l 2.262796875 2.2628203125 a 1.59 1.59 0 0 0 1.5619921875 0.4047890625 c 0.25321875 -0.072 0.5080078125 0.0979921875 0.5080078125 0.3611953125 V 21 c 0 0.8800078125 0.72 1.6000078125 1.6000078125 1.6000078125 H 17.6014190625 c 0.8800078125 0 1.6000078125 -0.72 1.6000078125 -1.6000078125 V 12.8171953125 c 0 -0.263203125 0.2548125 -0.4331953125 0.5080078125 -0.3611953125 a 1.59 1.59 0 0 0 1.5619921875 -0.4047890625 l 2.262796875 -2.2628203125 a 1.6000078125 1.6000078125 0 0 0 0 -2.262796875 z"
|
||||||
|
tools:ignore="VectorPath" />
|
||||||
</vector>
|
</vector>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/libraries_page"
|
android:id="@+id/constraint_layout_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/app_background_theme"
|
android:background="?attr/app_background_theme"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/libraries_recycler_view"
|
android:id="@+id/recycler_view_libraries"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
android:background="?attr/windowSplashScreenBackground">
|
android:background="?attr/windowSplashScreenBackground">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/image_view_logo"
|
||||||
android:layout_width="288dp"
|
android:layout_width="@dimen/splash_logo_size"
|
||||||
android:layout_height="288dp"
|
android:layout_height="@dimen/splash_logo_size"
|
||||||
android:contentDescription="Logo"
|
android:contentDescription="Logo"
|
||||||
android:src="@drawable/ic_launcher"
|
android:src="@drawable/ic_launcher"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/constraint_layout_time_screen"
|
android:id="@+id/constraint_layout_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/app_show_background_theme"
|
android:background="?attr/app_show_background_theme"
|
||||||
@@ -13,9 +13,9 @@
|
|||||||
android:id="@+id/image_view_mode"
|
android:id="@+id/image_view_mode"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="@dimen/tool_time_screen_image_view_mode_margin"
|
||||||
android:contentDescription="Change Mode"
|
android:contentDescription="Change Mode"
|
||||||
android:padding="10dp"
|
android:padding="@dimen/tool_time_screen_clickable_padding"
|
||||||
android:src="@drawable/animation_light_to_dark_mode"
|
android:src="@drawable/animation_light_to_dark_mode"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -32,14 +32,14 @@
|
|||||||
<TextSwitcher
|
<TextSwitcher
|
||||||
android:id="@+id/text_switcher_hour_ten"
|
android:id="@+id/text_switcher_hour_ten"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:inAnimation="@anim/text_from_top_in"
|
android:inAnimation="@anim/text_from_top_in"
|
||||||
android:outAnimation="@anim/text_to_down_out" />
|
android:outAnimation="@anim/text_to_down_out" />
|
||||||
|
|
||||||
<TextSwitcher
|
<TextSwitcher
|
||||||
android:id="@+id/text_switcher_hour_one"
|
android:id="@+id/text_switcher_hour_one"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inAnimation="@anim/text_from_top_in"
|
android:inAnimation="@anim/text_from_top_in"
|
||||||
android:outAnimation="@anim/text_to_down_out" />
|
android:outAnimation="@anim/text_to_down_out" />
|
||||||
@@ -47,17 +47,17 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_view_colon_hour_minute"
|
android:id="@+id/text_view_colon_hour_minute"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/tool_time_screen_colon"
|
android:text="@string/tool_time_screen_colon"
|
||||||
android:textColor="?attr/app_show_text_theme"
|
android:textColor="?attr/app_show_text_theme"
|
||||||
android:textSize="100sp"
|
android:textSize="@dimen/tool_time_screen_time_text_size"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextSwitcher
|
<TextSwitcher
|
||||||
android:id="@+id/text_switcher_minute_ten"
|
android:id="@+id/text_switcher_minute_ten"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inAnimation="@anim/text_from_top_in"
|
android:inAnimation="@anim/text_from_top_in"
|
||||||
android:outAnimation="@anim/text_to_down_out" />
|
android:outAnimation="@anim/text_to_down_out" />
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<TextSwitcher
|
<TextSwitcher
|
||||||
android:id="@+id/text_switcher_minute_one"
|
android:id="@+id/text_switcher_minute_one"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inAnimation="@anim/text_from_top_in"
|
android:inAnimation="@anim/text_from_top_in"
|
||||||
android:outAnimation="@anim/text_to_down_out" />
|
android:outAnimation="@anim/text_to_down_out" />
|
||||||
@@ -73,17 +73,17 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_view_colon_minute_second"
|
android:id="@+id/text_view_colon_minute_second"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/tool_time_screen_colon"
|
android:text="@string/tool_time_screen_colon"
|
||||||
android:textColor="?attr/app_show_text_theme"
|
android:textColor="?attr/app_show_text_theme"
|
||||||
android:textSize="100sp"
|
android:textSize="@dimen/tool_time_screen_time_text_size"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextSwitcher
|
<TextSwitcher
|
||||||
android:id="@+id/text_switcher_second_ten"
|
android:id="@+id/text_switcher_second_ten"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inAnimation="@anim/text_from_top_in"
|
android:inAnimation="@anim/text_from_top_in"
|
||||||
android:outAnimation="@anim/text_to_down_out" />
|
android:outAnimation="@anim/text_to_down_out" />
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
<TextSwitcher
|
<TextSwitcher
|
||||||
android:id="@+id/text_switcher_second_one"
|
android:id="@+id/text_switcher_second_one"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inAnimation="@anim/text_from_top_in"
|
android:inAnimation="@anim/text_from_top_in"
|
||||||
android:outAnimation="@anim/text_to_down_out" />
|
android:outAnimation="@anim/text_to_down_out" />
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
android:id="@+id/text_view_date"
|
android:id="@+id/text_view_date"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
android:padding="@dimen/tool_time_screen_clickable_padding"
|
||||||
android:textColor="?attr/app_show_second_text_theme"
|
android:textColor="?attr/app_show_second_text_theme"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
android:id="@+id/linear_layout_language"
|
android:id="@+id/linear_layout_language"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="@dimen/tool_translation_layout_margin"
|
||||||
android:background="@drawable/background_top_bottom_radius"
|
android:background="@drawable/background_top_bottom_radius"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
@@ -48,14 +48,14 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/tool_translation_language_chinese"
|
android:text="@string/tool_translation_language_chinese"
|
||||||
android:textColor="?attr/app_theme"
|
android:textColor="?attr/app_theme"
|
||||||
android:textSize="16sp" />
|
android:textSize="@dimen/tool_translation_text_size" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_view_swap"
|
android:id="@+id/image_view_swap"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="Swap"
|
android:contentDescription="Swap"
|
||||||
android:padding="5dp"
|
android:padding="@dimen/tool_translation_clickable_padding"
|
||||||
android:src="@drawable/animation_swap_horizon" />
|
android:src="@drawable/animation_swap_horizon" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -66,50 +66,50 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/tool_translation_language_english"
|
android:text="@string/tool_translation_language_english"
|
||||||
android:textColor="?attr/app_theme"
|
android:textColor="?attr/app_theme"
|
||||||
android:textSize="16sp" />
|
android:textSize="@dimen/tool_translation_text_size" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edit_text_from"
|
android:id="@+id/edit_text_from"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="@dimen/tool_translation_edit_text_view_height"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="@dimen/tool_translation_layout_margin"
|
||||||
android:autofillHints="text"
|
android:autofillHints="text"
|
||||||
android:background="@drawable/background_top_bottom_radius"
|
android:background="@drawable/background_top_bottom_radius"
|
||||||
android:gravity="start|top"
|
android:gravity="start|top"
|
||||||
android:hint="@string/tool_translation_please_enter_text"
|
android:hint="@string/tool_translation_please_enter_text"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
android:maxLength="850"
|
android:maxLength="850"
|
||||||
android:paddingHorizontal="15dp"
|
android:paddingHorizontal="@dimen/tool_translation_edit_text_view_padding"
|
||||||
android:paddingTop="15dp"
|
android:paddingTop="@dimen/tool_translation_edit_text_view_padding"
|
||||||
android:paddingBottom="30dp"
|
android:paddingBottom="@dimen/tool_translation_edit_text_view_padding_plus"
|
||||||
android:textColor="?attr/app_text_theme"
|
android:textColor="?attr/app_text_theme"
|
||||||
android:textSize="16sp"
|
android:textSize="@dimen/tool_translation_text_size"
|
||||||
app:layout_constraintTop_toBottomOf="@id/linear_layout_language" />
|
app:layout_constraintTop_toBottomOf="@id/linear_layout_language" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/edit_text_to"
|
android:id="@+id/edit_text_to"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="@dimen/tool_translation_edit_text_view_height"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="@dimen/tool_translation_layout_margin"
|
||||||
android:autofillHints="text"
|
android:autofillHints="text"
|
||||||
android:background="@drawable/background_top_bottom_radius"
|
android:background="@drawable/background_top_bottom_radius"
|
||||||
android:gravity="start|top"
|
android:gravity="start|top"
|
||||||
android:paddingHorizontal="15dp"
|
android:paddingHorizontal="@dimen/tool_translation_edit_text_view_padding"
|
||||||
android:paddingTop="30dp"
|
android:paddingTop="@dimen/tool_translation_edit_text_view_padding_plus"
|
||||||
android:paddingBottom="15dp"
|
android:paddingBottom="@dimen/tool_translation_edit_text_view_padding"
|
||||||
android:textColor="?attr/app_text_theme"
|
android:textColor="?attr/app_text_theme"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
android:textSize="16sp"
|
android:textSize="@dimen/tool_translation_text_size"
|
||||||
app:layout_constraintTop_toBottomOf="@id/edit_text_from" />
|
app:layout_constraintTop_toBottomOf="@id/edit_text_from" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/background_round"
|
android:background="@drawable/background_round"
|
||||||
android:padding="5dp"
|
android:padding="@dimen/tool_translation_clickable_padding"
|
||||||
app:layout_constraintBottom_toTopOf="@id/edit_text_to"
|
app:layout_constraintBottom_toTopOf="@id/edit_text_to"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
android:contentDescription="Translate"
|
android:contentDescription="Translate"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:foreground="@drawable/foreground_ripple"
|
android:foreground="@drawable/foreground_ripple"
|
||||||
android:src="@drawable/ic_translate"
|
android:src="@drawable/ic_tool_translation_translate"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|||||||
@@ -6,14 +6,10 @@
|
|||||||
android:background="@drawable/background_side_nav_bar"
|
android:background="@drawable/background_side_nav_bar"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:padding="@dimen/nav_padding"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_view"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="Logo"
|
android:contentDescription="Logo"
|
||||||
@@ -28,7 +24,6 @@
|
|||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_view"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/nav_header_subtitle" />
|
android:text="@string/nav_header_subtitle" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/layout_item_LinearLayout"
|
android:id="@+id/linear_layout_body"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
@@ -11,11 +11,10 @@
|
|||||||
android:id="@+id/auto_linefeed_layout"
|
android:id="@+id/auto_linefeed_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@drawable/background_bottom_radius"
|
android:background="@drawable/background_bottom_radius"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingHorizontal="5dp"
|
android:paddingHorizontal="@dimen/fold_layout_body_auto_linefeed_layout_padding_horizontal"
|
||||||
android:paddingBottom="2dp" />
|
android:paddingBottom="@dimen/fold_layout_body_auto_linefeed_layout_padding_bottom" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/tool_button"
|
android:id="@+id/button_tool"
|
||||||
style="@style/ToolsButton" />
|
style="@style/ToolsButton" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/fold_layout_head_layout"
|
android:id="@+id/linear_layout_head"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="@dimen/fold_layout_head_layout_height"
|
||||||
android:layout_marginHorizontal="10dp"
|
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="@dimen/common_layout_margin"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fold_layout_icon"
|
android:id="@+id/text_view_icon"
|
||||||
android:layout_width="20dp"
|
android:layout_width="@dimen/fold_layout_head_icon_size"
|
||||||
android:layout_height="20dp"
|
android:layout_height="@dimen/fold_layout_head_icon_size"
|
||||||
android:layout_marginHorizontal="10dp"
|
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="?attr/app_theme"
|
android:textColor="?attr/app_theme"
|
||||||
android:textSize="20sp" />
|
android:textSize="@dimen/common_text_size" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fold_layout_text_view"
|
android:id="@+id/text_view_title"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="@dimen/fold_layout_head_title_height"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:textColor="?attr/app_text_theme"
|
android:textColor="?attr/app_text_theme"
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/fold_layout_arrow_icon"
|
android:id="@+id/image_view_arrow"
|
||||||
android:layout_width="15dp"
|
android:layout_width="@dimen/fold_layout_head_arrow_size"
|
||||||
android:layout_height="15dp"
|
android:layout_height="@dimen/fold_layout_head_arrow_size"
|
||||||
android:layout_marginHorizontal="10dp"
|
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||||
android:contentDescription="Arrow" />
|
android:contentDescription="Arrow" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -8,30 +8,30 @@
|
|||||||
tools:context=".ui.about.AboutFragment">
|
tools:context=".ui.about.AboutFragment">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/app_icon"
|
android:id="@+id/image_view_app_icon"
|
||||||
android:layout_width="@dimen/about_app_icon_size"
|
android:layout_width="@dimen/about_app_icon_size"
|
||||||
android:layout_height="@dimen/about_app_icon_size"
|
android:layout_height="@dimen/about_app_icon_size"
|
||||||
android:layout_marginTop="@dimen/about_activity_margin_top"
|
android:layout_marginTop="@dimen/about_layout_margin_top"
|
||||||
android:src="@mipmap/ic_launcher"
|
android:src="@mipmap/ic_launcher"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/app_name"
|
android:id="@+id/text_view_app_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/about_icon_text_margin"
|
android:layout_marginTop="@dimen/about_icon_text_margin"
|
||||||
android:text="@string/app_full_name"
|
android:text="@string/app_full_name"
|
||||||
android:textColor="?attr/app_text_theme"
|
android:textColor="?attr/app_text_theme"
|
||||||
android:textSize="@dimen/default_text_size"
|
android:textSize="@dimen/common_text_size"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/app_icon" />
|
app:layout_constraintTop_toBottomOf="@id/image_view_app_icon" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/app_desc"
|
android:id="@+id/text_view_app_desc"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/about_text_text_margin"
|
android:layout_marginTop="@dimen/about_text_text_margin"
|
||||||
@@ -40,23 +40,23 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/app_name" />
|
app:layout_constraintTop_toBottomOf="@id/text_view_app_name" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/app_version"
|
android:id="@+id/text_view_app_version"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/about_text_text_margin"
|
android:layout_marginTop="@dimen/about_text_text_margin"
|
||||||
android:textColor="@color/app_secondary_text"
|
android:textColor="@color/app_secondary_text"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/app_desc" />
|
app:layout_constraintTop_toBottomOf="@id/text_view_app_desc" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/open_source"
|
android:id="@+id/text_view_open_source"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/about_activity_margin_bottom"
|
android:layout_marginBottom="@dimen/about_layout_margin_bottom"
|
||||||
android:text="@string/setting_open_source"
|
android:text="@string/setting_open_source"
|
||||||
android:textColor="?attr/app_theme"
|
android:textColor="?attr/app_theme"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
@@ -6,17 +6,17 @@
|
|||||||
android:background="?attr/app_background_theme">
|
android:background="?attr/app_background_theme">
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/bottom_nav_view_pager"
|
android:id="@+id/view_pager_bottom_nav"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view"
|
app:layout_constraintBottom_toTopOf="@+id/navigation_view_bottom_nav"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottom_navigation_view"
|
android:id="@+id/navigation_view_bottom_nav"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/app_theme"
|
android:background="?attr/app_theme"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/bottom_nav_view_pager"
|
app:layout_constraintTop_toBottomOf="@id/view_pager_bottom_nav"
|
||||||
app:menu="@menu/bottom_nav_menu" />
|
app:menu="@menu/bottom_nav" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,18 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/fragment_home_tools"
|
android:id="@+id/constraint_layout_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/app_background_theme"
|
android:background="?attr/app_background_theme"
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".ui.home.HomeFragment">
|
tools:context=".ui.home.HomeFragment">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/fold_layouts_linear_layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent" />
|
||||||
android:orientation="vertical"
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:paddingTop="10dp"
|
|
||||||
android:paddingBottom="10dp" />
|
|
||||||
</ScrollView>
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/fragment_home_tools"
|
android:id="@+id/constraint_layout_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/app_background_theme"
|
android:background="?attr/app_background_theme"
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".ui.home.tools.ToolsFragment">
|
tools:context=".ui.home.tools.ToolsFragment">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/tools_recycler_view"
|
android:id="@+id/recycler_view_tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
tools:context=".ui.theme.ThemeFragment">
|
tools:context=".ui.theme.ThemeFragment">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/theme_recycler_view"
|
android:id="@+id/recycler_view_themes"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -4,133 +4,118 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/library_item_card_margin_horizontal"
|
android:layout_margin="@dimen/item_libraries_card_margin"
|
||||||
android:layout_marginTop="@dimen/library_item_card_margin_vertical"
|
|
||||||
android:layout_marginEnd="@dimen/library_item_card_margin_horizontal"
|
|
||||||
android:layout_marginBottom="@dimen/library_item_card_margin_vertical"
|
|
||||||
android:background="?attr/app_on_background_theme"
|
android:background="?attr/app_on_background_theme"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true">
|
android:focusable="true">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/content"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/app_on_background_theme"
|
android:background="?attr/app_on_background_theme">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/library_name"
|
android:id="@+id/text_view_library_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingStart="@dimen/library_item_card_inner_padding"
|
android:paddingTop="@dimen/item_libraries_card_inner_padding"
|
||||||
android:paddingLeft="@dimen/library_item_card_inner_padding"
|
android:paddingHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||||
android:paddingTop="@dimen/library_item_card_inner_padding"
|
|
||||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
|
||||||
android:paddingRight="@dimen/library_item_card_inner_padding"
|
|
||||||
android:textAppearance="?textAppearanceHeadline5"
|
android:textAppearance="?textAppearanceHeadline5"
|
||||||
android:textColor="?attr/app_text_theme"
|
android:textColor="?attr/app_text_theme"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/library_creator"
|
app:layout_constraintBottom_toTopOf="@+id/text_view_library_creator"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/library_version"
|
app:layout_constraintEnd_toStartOf="@+id/text_view_library_version"
|
||||||
app:layout_constraintHorizontal_weight="1"
|
app:layout_constraintHorizontal_weight="1"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="Library name" />
|
tools:text="Library name" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/library_creator"
|
android:id="@+id/text_view_library_creator"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:paddingStart="@dimen/library_item_card_inner_padding"
|
android:paddingHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||||
android:paddingLeft="@dimen/library_item_card_inner_padding"
|
|
||||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
|
||||||
android:paddingRight="@dimen/library_item_card_inner_padding"
|
|
||||||
android:textAppearance="?textAppearanceSubtitle1"
|
android:textAppearance="?textAppearanceSubtitle1"
|
||||||
android:textColor="?attr/app_second_text_theme"
|
android:textColor="?attr/app_second_text_theme"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/library_description_divider"
|
app:layout_constraintBottom_toTopOf="@+id/view_library_description_divider"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/library_version"
|
app:layout_constraintEnd_toStartOf="@+id/text_view_library_version"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/library_name"
|
app:layout_constraintTop_toBottomOf="@+id/text_view_library_name"
|
||||||
tools:text="Creator" />
|
tools:text="Creator" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/library_version"
|
android:id="@+id/text_view_library_version"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingTop="@dimen/library_item_card_inner_padding"
|
android:paddingTop="@dimen/item_libraries_card_inner_padding"
|
||||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
android:paddingEnd="@dimen/item_libraries_card_inner_padding"
|
||||||
android:textAppearance="?textAppearanceBody2"
|
android:textAppearance="?textAppearanceBody2"
|
||||||
android:textColor="?attr/app_second_text_theme"
|
android:textColor="?attr/app_second_text_theme"
|
||||||
app:layout_constrainedWidth="true"
|
app:layout_constrainedWidth="true"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/library_name"
|
app:layout_constraintBottom_toBottomOf="@id/text_view_library_name"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/library_name"
|
app:layout_constraintStart_toEndOf="@id/text_view_library_name"
|
||||||
app:layout_constraintTop_toTopOf="@id/library_name"
|
app:layout_constraintTop_toTopOf="@id/text_view_library_name"
|
||||||
tools:text="Version" />
|
tools:text="Version" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/library_description_divider"
|
android:id="@+id/view_library_description_divider"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="@dimen/item_libraries_card_divider_height"
|
||||||
android:layout_marginHorizontal="@dimen/library_item_card_divider_padding_horizontal"
|
android:layout_marginHorizontal="@dimen/item_libraries_card_divider_padding_horizontal"
|
||||||
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
|
android:layout_marginVertical="@dimen/item_libraries_card_divider_padding_vertical"
|
||||||
android:background="?attr/app_divider_theme"
|
android:background="?attr/app_divider_theme"
|
||||||
app:layout_constraintBottom_toTopOf="@id/library_description"
|
app:layout_constraintBottom_toTopOf="@id/text_view_library_description"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/library_creator" />
|
app:layout_constraintTop_toBottomOf="@id/text_view_library_creator" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/library_description"
|
android:id="@+id/text_view_library_description"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/library_item_card_inner_padding"
|
android:layout_marginHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||||
android:layout_marginEnd="@dimen/library_item_card_inner_padding"
|
|
||||||
android:maxLines="20"
|
android:maxLines="20"
|
||||||
android:textAppearance="?textAppearanceBody2"
|
android:textAppearance="?textAppearanceBody2"
|
||||||
android:textColor="?attr/app_text_theme"
|
android:textColor="?attr/app_text_theme"
|
||||||
app:layout_constraintBottom_toTopOf="@id/library_bottom_divider"
|
app:layout_constraintBottom_toTopOf="@id/view_library_bottom_divider"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/library_description_divider"
|
app:layout_constraintTop_toBottomOf="@id/view_library_description_divider"
|
||||||
tools:text="This is library description.This is library description.This is library description.This is library description.This is library description.This is library description.This is library description.This is library description." />
|
tools:text="This is library description.This is library description.This is library description.This is library description.This is library description.This is library description.This is library description.This is library description." />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/library_bottom_divider"
|
android:id="@+id/view_library_bottom_divider"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="@dimen/item_libraries_card_divider_height"
|
||||||
android:layout_marginHorizontal="@dimen/library_item_card_divider_padding_horizontal"
|
android:layout_marginHorizontal="@dimen/item_libraries_card_divider_padding_horizontal"
|
||||||
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
|
android:layout_marginVertical="@dimen/item_libraries_card_divider_padding_vertical"
|
||||||
android:background="?attr/app_divider_theme"
|
android:background="?attr/app_divider_theme"
|
||||||
app:layout_constraintBottom_toTopOf="@id/library_license"
|
app:layout_constraintBottom_toTopOf="@id/text_view_library_license"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/library_description" />
|
app:layout_constraintTop_toBottomOf="@id/text_view_library_description" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/library_license"
|
android:id="@+id/text_view_library_license"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingStart="@dimen/library_item_card_inner_padding"
|
android:paddingHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||||
android:paddingLeft="@dimen/library_item_card_inner_padding"
|
android:paddingBottom="@dimen/item_libraries_card_inner_padding"
|
||||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
|
||||||
android:paddingRight="@dimen/library_item_card_inner_padding"
|
|
||||||
android:paddingBottom="@dimen/library_item_card_inner_padding"
|
|
||||||
android:textAppearance="?textAppearanceBody1"
|
android:textAppearance="?textAppearanceBody1"
|
||||||
android:textColor="?attr/app_text_theme"
|
android:textColor="?attr/app_text_theme"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/library_bottom_divider"
|
app:layout_constraintTop_toBottomOf="@id/view_library_bottom_divider"
|
||||||
tools:text="License" />
|
tools:text="License" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/theme_layout"
|
xmlns:tool="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/linear_layout_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="@dimen/common_layout_margin"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/primary_color"
|
android:id="@+id/linear_layout_primary_color"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="@dimen/item_themes_primary_layout_height"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:background="@drawable/background_theme_top"
|
android:background="@drawable/background_theme_top"
|
||||||
android:orientation="horizontal">
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="@dimen/common_layout_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/color_name"
|
android:id="@+id/text_view_color_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/setting_theme"
|
android:textColor="?attr/app_on_theme"
|
||||||
android:textColor="?attr/app_on_theme"/>
|
tool:text="Theme" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/check"
|
android:id="@+id/view_check"
|
||||||
android:layout_width="24dp"
|
android:layout_width="@dimen/item_themes_check_icon_size"
|
||||||
android:layout_height="24dp"
|
android:layout_height="@dimen/item_themes_check_icon_size"
|
||||||
android:background="@drawable/selector_themes" />
|
android:background="@drawable/selector_themes" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/primary_dark_color"
|
android:id="@+id/view_primary_dark_color"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="@dimen/item_themes_other_layout_height"
|
||||||
android:background="@drawable/background_theme_middle" />
|
android:background="@drawable/background_theme_middle" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/primary_light_color"
|
android:id="@+id/view_primary_light_color"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="@dimen/item_themes_other_layout_height"
|
||||||
android:background="@drawable/background_theme_middle" />
|
android:background="@drawable/background_theme_middle" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/accent_color"
|
android:id="@+id/view_accent_color"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="@dimen/item_themes_other_layout_height"
|
||||||
android:background="@drawable/background_theme_bottom" />
|
android:background="@drawable/background_theme_bottom" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_home_tools"
|
android:id="@+id/nav_home_tools"
|
||||||
android:icon="@drawable/ic_menu_home"
|
android:icon="@drawable/ic_home"
|
||||||
android:orderInCategory="0"
|
android:orderInCategory="0"
|
||||||
android:title="@string/menu_home_tools" />
|
android:title="@string/menu_home_tools" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_home_fav"
|
android:id="@+id/nav_home_fav"
|
||||||
android:icon="@drawable/ic_menu_home"
|
android:icon="@drawable/ic_favorite"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/menu_home_fav" />
|
android:title="@string/menu_home_fav" />
|
||||||
|
|
||||||
@@ -1,21 +1,47 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
<dimen name="common_layout_margin">10dp</dimen>
|
||||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
<dimen name="common_text_size">20sp</dimen>
|
||||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
|
||||||
<dimen name="nav_header_vertical_spacing">8dp</dimen>
|
<dimen name="splash_logo_size">288dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="nav_padding">16dp</dimen>
|
||||||
<dimen name="nav_header_height">176dp</dimen>
|
<dimen name="nav_header_height">176dp</dimen>
|
||||||
<dimen name="default_text_size">20sp</dimen>
|
<dimen name="nav_header_vertical_spacing">8dp</dimen>
|
||||||
|
|
||||||
<dimen name="library_item_card_margin_vertical">16dp</dimen>
|
<dimen name="fold_layout_head_layout_height">40dp</dimen>
|
||||||
<dimen name="library_item_card_margin_horizontal">16dp</dimen>
|
<dimen name="fold_layout_head_icon_size">20dp</dimen>
|
||||||
<dimen name="library_item_card_inner_padding">16dp</dimen>
|
<dimen name="fold_layout_head_title_height">40dp</dimen>
|
||||||
<dimen name="library_item_card_divider_padding_vertical">8dp</dimen>
|
<dimen name="fold_layout_head_arrow_size">15dp</dimen>
|
||||||
<dimen name="library_item_card_divider_padding_horizontal">16dp</dimen>
|
|
||||||
|
|
||||||
<dimen name="about_activity_margin_top">50dp</dimen>
|
<dimen name="fold_layout_body_auto_linefeed_layout_padding_horizontal">5dp</dimen>
|
||||||
<dimen name="about_activity_margin_bottom">30dp</dimen>
|
<dimen name="fold_layout_body_auto_linefeed_layout_padding_bottom">2dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="about_layout_margin_top">50dp</dimen>
|
||||||
|
<dimen name="about_layout_margin_bottom">30dp</dimen>
|
||||||
<dimen name="about_app_icon_size">96dp</dimen>
|
<dimen name="about_app_icon_size">96dp</dimen>
|
||||||
<dimen name="about_icon_text_margin">20dp</dimen>
|
<dimen name="about_icon_text_margin">20dp</dimen>
|
||||||
<dimen name="about_text_text_margin">4dp</dimen>
|
<dimen name="about_text_text_margin">4dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="item_libraries_card_margin">16dp</dimen>
|
||||||
|
<dimen name="item_libraries_card_inner_padding">16dp</dimen>
|
||||||
|
<dimen name="item_libraries_card_divider_height">1dp</dimen>
|
||||||
|
<dimen name="item_libraries_card_divider_padding_vertical">8dp</dimen>
|
||||||
|
<dimen name="item_libraries_card_divider_padding_horizontal">16dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="item_themes_primary_layout_height">40dp</dimen>
|
||||||
|
<dimen name="item_themes_other_layout_height">20dp</dimen>
|
||||||
|
<dimen name="item_themes_check_icon_size">24dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="tool_time_screen_clickable_padding">10dp</dimen>
|
||||||
|
<dimen name="tool_time_screen_image_view_mode_margin">20dp</dimen>
|
||||||
|
<dimen name="tool_time_screen_time_height">120dp</dimen>
|
||||||
|
<dimen name="tool_time_screen_time_text_size">100sp</dimen>
|
||||||
|
|
||||||
|
<dimen name="tool_translation_text_size">16sp</dimen>
|
||||||
|
<dimen name="tool_translation_clickable_padding">5dp</dimen>
|
||||||
|
<dimen name="tool_translation_edit_text_view_padding">15dp</dimen>
|
||||||
|
<dimen name="tool_translation_edit_text_view_padding_plus">30dp</dimen>
|
||||||
|
<dimen name="tool_translation_layout_margin">@dimen/common_layout_margin</dimen>
|
||||||
|
<dimen name="tool_translation_edit_text_view_height">200dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user