Optimize fold layout and ids

This commit is contained in:
2022-03-22 12:22:01 +08:00
parent 5b2b60624c
commit ef0760ef16
33 changed files with 206 additions and 110 deletions

View File

@@ -1,15 +1,17 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
}
//插件脚本
//apply from: "https://raw.githubusercontent.com/limpoxe/Android-Plugin-Framework/master/FairyPlugin/host.gradle"
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
compileSdk 31
defaultConfig {
applicationId "com.fatapp.oxygentoolbox"
minSdkVersion 21
targetSdkVersion 30
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
@@ -26,20 +28,36 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'androidx.navigation:navigation-fragment:2.2.2'
implementation 'androidx.navigation:navigation-ui:2.2.2'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
implementation 'com.google.code.gson:gson:2.8.6'
}
implementation 'com.google.code.gson:gson:2.9.0'
// 请务必使用@aar结尾以中断依赖传递
// implementation('com.github.limpoxe:Android-Plugin-Framework:0.0.72@aar')
// 可选,用于支持插件全局函数式服务,不使用全局函数式服务不需要添加此依赖
// implementation('com.limpoxe.support:android-servicemanager:1.0.5@aar')
}
/*
fairy {
//可选配置,用于指定插件进程名。默认插件进程为单独的进程,进程名为":plugin"
//若设置为空串或者null即是使用宿主进程作为插件进程
//pluginProcess = ""
//pluginProcess = null
//pluginProcess = ":xxx"
}*/

View File

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

View File

@@ -21,31 +21,49 @@ import androidx.drawerlayout.widget.DrawerLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import java.io.IOException;
import java.util.Collections;
public class MainActivity extends AppCompatActivity {
private AppBarConfiguration mAppBarConfiguration;
private Toolbar toolbar;
private FloatingActionButton fab;
private DrawerLayout drawer;
private NavigationView navigationView;
private void initView() {
toolbar = findViewById(R.id.toolbar);
fab = findViewById(R.id.fab);
drawer = findViewById(R.id.drawer_layout);
navigationView = findViewById(R.id.nav_view);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
//init
initView();
initLayout();
shortCutCreateTest();
}
private void initLayout() {
setSupportActionBar(toolbar);
FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(view -> {
/*Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();*/
});
DrawerLayout drawer = findViewById(R.id.drawer_layout);
NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.inflateHeaderView(R.layout.nav_header_main);
navigationView.inflateMenu(R.menu.activity_main_drawer);
navigationView.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
if (navigationView.getMenu().getItem(0).isChecked()) {
fab.setVisibility(View.VISIBLE);
} else if (navigationView.getMenu().getItem(4).isChecked()) {
System.exit(0);
} else {
fab.setVisibility(View.GONE);
}
@@ -53,23 +71,14 @@ public class MainActivity extends AppCompatActivity {
// 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)
.setDrawerLayout(drawer)
.setOpenableLayout(drawer)
.build();
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);
try {
ToolsList.init(getResources().getAssets().open("json/BasicTools.json"));
} catch (IOException e) {
e.printStackTrace();
Toast.makeText(getApplicationContext(), "初始化工具集失败", Toast.LENGTH_LONG).show();
}
shortCutCreateTest();
}
private void shortCutCreateTest() {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N_MR1) {
return;
}
@@ -78,12 +87,12 @@ public class MainActivity extends AppCompatActivity {
intent.setClassName("com.fatapp.oxygentoolbox",
"com.fatapp.oxygentoolbox.MainActivity");
ShortcutInfo.Builder builder;
builder = new ShortcutInfo.Builder(this, "dynamic shortcut")
builder = new ShortcutInfo.Builder(this, "Time Screen")
.setIntent(new Intent()
.setAction("android.intent.action.VIEW")
.setClassName("com.fatapp.oxygentoolbox", "com.fatapp.oxygentoolbox.MainActivity"))
.setShortLabel("This is a dynamic shortcut")
.setLongLabel("This is a dynamic shortcut with long label")
.setAction("activity.timescreen")
.setClassName("com.fatapp.oxygentoolbox", "com.fatapp.oxygentoolbox.tools.TimeScreenActivity"))
.setShortLabel("Time Screen")
.setLongLabel("Time Screen")
.setIcon(Icon.createWithResource(this, R.drawable.ic_menu_home));
ShortcutManager shortcutManager = getSystemService(ShortcutManager.class);
shortcutManager.addDynamicShortcuts(Collections.singletonList(builder.build()));

View File

@@ -0,0 +1,14 @@
package com.fatapp.oxygentoolbox;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
}
}

View File

@@ -28,7 +28,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
private ValueAnimator hideAnimator;
private View defaultView;
private OnItemClickListener mOnItemClickListener;
private OnItemClickListenerInterface mOnItemClickListener;
public FoldLayout(Context context) {
this(context, null);
@@ -58,7 +58,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
defaultView = LayoutInflater.from(context).inflate(layoutId, this, true);
defaultView.setOnClickListener(this);
content = new LinearLayout(context);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
LayoutParams layoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
content.setOrientation(VERTICAL);
addView(content, layoutParams);
@@ -96,7 +96,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
@SuppressLint("UseCompatLoadingForDrawables")
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
LinearLayout linearLayout = defaultView.findViewById(R.id.foldLayoutLinearLayout);
LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_linear_layout);
linearLayout.setBackground(getResources().getDrawable(R.drawable.top_radius_background));
}
});
@@ -113,7 +113,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
if (!isShow) {
LinearLayout linearLayout = defaultView.findViewById(R.id.foldLayoutLinearLayout);
LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_linear_layout);
linearLayout.setBackground(getResources().getDrawable(R.drawable.top_bottom_radius_background));
}
}
@@ -143,7 +143,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
public void showItem() {
isShow = true;
showAnimator.start();
ImageView imageView = defaultView.findViewById(R.id.arrowIcon);
ImageView imageView = defaultView.findViewById(R.id.arrow_icon);
imageView.setImageDrawable(getResources().getDrawable(R.drawable.right_to_down_arrow));
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
animatedVectorDrawable.start();
@@ -153,17 +153,13 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
public void hideItem() {
isShow = false;
hideAnimator.start();
ImageView imageView = defaultView.findViewById(R.id.arrowIcon);
ImageView imageView = defaultView.findViewById(R.id.arrow_icon);
imageView.setImageDrawable(getResources().getDrawable(R.drawable.down_to_right_arrow));
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
animatedVectorDrawable.start();
}
interface OnItemClickListener {
void onItemClick(View view, int position);
}
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
public void setOnItemClickListener(OnItemClickListenerInterface onItemClickListener) {
this.mOnItemClickListener = onItemClickListener;
}
}

View File

@@ -0,0 +1,7 @@
package com.fatapp.oxygentoolbox.layout;
import android.view.View;
interface OnItemClickListenerInterface {
void onItemClick(View view, int position);
}

View File

@@ -11,7 +11,6 @@ import androidx.fragment.app.Fragment;
public class ExitFragment extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
System.exit(0);
return null;
}
}

View File

@@ -1,16 +1,14 @@
package com.fatapp.oxygentoolbox.ui.home;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
@@ -21,12 +19,14 @@ import com.fatapp.oxygentoolbox.layout.FoldLayout;
import com.fatapp.oxygentoolbox.util.BasicToolsLauncher;
import com.fatapp.oxygentoolbox.util.ToolsList;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class HomeFragment extends Fragment {
View root;
private View root;
private HomeViewModel homeViewModel;
@@ -36,37 +36,60 @@ public class HomeFragment extends Fragment {
homeViewModel =
new ViewModelProvider(this).get(HomeViewModel.class);
root = inflater.inflate(R.layout.fragment_home, container, false);
//init
initView();
initLayout();
return root;
}
private void initView() {
for (ToolsList.Tool tool : ToolsList.getToolList()) {
foldLayoutsLinearLayout = root.findViewById(R.id.fold_layouts_linear_layout);
}
View foldLayoutBody = getLayoutInflater().inflate(R.layout.fold_layout_body, null);
ViewGroup layout_item_AutoLinefeedLayout = foldLayoutBody.findViewById(R.id.layout_item_AutoLinefeedLayout);
private void initLayout() {
initFoldLayout();
}
private void initFoldLayout() {
try {
ToolsList.init(getResources().getAssets().open("json/BasicTools.json"));
} catch (IOException e) {
e.printStackTrace();
Toast.makeText(getContext(), "初始化工具集失败", Toast.LENGTH_LONG).show();
return;
}
for (ToolsList.Tool tool : ToolsList.getToolList()) {
View foldLayoutBodyLayout = getLayoutInflater().inflate(R.layout.fold_layout_body, null);
ViewGroup autoLinefeedLayout = foldLayoutBodyLayout.findViewById(R.id.auto_linefeed_layout);
for (ToolsList.Button button : tool.getButtonList()) {
View toolButton = getLayoutInflater().inflate(R.layout.tool_button, null);
((Button) toolButton.findViewById(R.id.toolButton)).setText(button.getText());
toolButton.findViewById(R.id.toolButton).setOnClickListener(v -> {
View toolButtonLayout = getLayoutInflater().inflate(R.layout.tool_button, null);
Button toolButton = toolButtonLayout.findViewById(R.id.tool_button);
toolButton.setText(button.getText());
toolButton.setOnClickListener(v -> {
BasicToolsLauncher.launch(button.getActivity(), getContext());
});
layout_item_AutoLinefeedLayout.addView(toolButton);
autoLinefeedLayout.addView(toolButtonLayout);
}
List<View> viewList = new ArrayList<>();
viewList.add(foldLayoutBody);
viewList.add(foldLayoutBodyLayout);
View foldLayoutHead = getLayoutInflater().inflate(R.layout.fold_layout, null);
FoldLayout foldLayout = foldLayoutHead.findViewById(R.id.foldLayout);
((TextView) foldLayout.findViewById(R.id.foldLayoutTextView)).setText(tool.getFoldLayoutTitle());
((TextView) foldLayout.findViewById(R.id.foldLayoutIcon)).setTypeface(Typeface.createFromAsset(getContext().getAssets(), tool.getFont()));
((TextView) foldLayout.findViewById(R.id.foldLayoutIcon)).setText(tool.getIcon());
FoldLayout foldLayout = foldLayoutHead.findViewById(R.id.fold_layout);
((TextView) foldLayout.findViewById(R.id.fold_layout_text_view)).setText(tool.getFoldLayoutTitle());
TextView foldLayoutIcon = foldLayout.findViewById(R.id.fold_layout_icon);
foldLayoutIcon.setTypeface(Typeface.createFromAsset(Objects.requireNonNull(getContext()).getAssets(), tool.getFont()));
foldLayoutIcon.setText(tool.getIcon());
foldLayout.addItemView(viewList);
foldLayoutsLinearLayout = root.findViewById(R.id.foldLayoutsLinearLayout);
foldLayoutsLinearLayout.removeAllViews();
foldLayoutsLinearLayout.addView(foldLayoutHead);
}
@@ -93,4 +116,6 @@ public class HomeFragment extends Fragment {
foldLayoutsLinearLayout.addView(foldLayoutHead);
}*/
}
}

View File

@@ -22,7 +22,8 @@ public class SettingFragment extends Fragment {
ViewGroup container, Bundle savedInstanceState) {
settingViewModel =
new ViewModelProvider(this).get(SettingViewModel.class);
View root = inflater.inflate(R.layout.fragment_about, container, false);
View root = inflater.inflate(R.layout.fragment_setting, container, false);
/*
final TextView textView = root.findViewById(R.id.text_setting);
settingViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
@Override
@@ -30,6 +31,7 @@ public class SettingFragment extends Fragment {
textView.setText(s);
}
});
*/
return root;
}
}

View File

@@ -40,7 +40,7 @@ public class ToolsList {
return toolList;
}
public void setToolList(List<Tool> toolList) {
public static void setToolList(List<Tool> toolList) {
ToolsList.toolList = toolList;
}

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
@@ -19,5 +18,5 @@
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:background="@color/app_background" />
android:background="@color/app_background"/>
</androidx.drawerlayout.widget.DrawerLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SplashActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

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

View File

@@ -16,7 +16,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/basicToolsRecyclerView"
android:id="@+id/basic_tools_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@@ -5,7 +5,7 @@
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.fatapp.oxygentoolbox.layout.FoldLayout
android:id="@+id/foldLayout"
android:id="@+id/fold_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutId="@layout/fold_layout_head"

View File

@@ -4,11 +4,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"
android:gravity="center_vertical">
android:gravity="center_vertical"
android:orientation="vertical">
<com.fatapp.oxygentoolbox.layout.AutoLinefeedLayout
android:id="@+id/layout_item_AutoLinefeedLayout"
android:id="@+id/auto_linefeed_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/foldLayoutLinearLayout"
android:id="@+id/fold_layout_linear_layout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="10dp"
@@ -11,7 +11,7 @@
android:gravity="center_vertical" >
<TextView
android:id="@+id/foldLayoutIcon"
android:id="@+id/fold_layout_icon"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight="1"
@@ -20,7 +20,7 @@
android:textColor="@color/app_theme" />
<TextView
android:id="@+id/foldLayoutTextView"
android:id="@+id/fold_layout_text_view"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="6"
@@ -29,7 +29,7 @@
android:textSize="18sp" />
<ImageView
android:id="@+id/arrowIcon"
android:id="@+id/arrow_icon"
android:layout_width="0dp"
android:layout_height="15dp"
android:layout_weight="1"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment_home"
android:layout_width="match_parent"
@@ -10,7 +9,7 @@
tools:context=".ui.home.HomeFragment">
<LinearLayout
android:id="@+id/foldLayoutsLinearLayout"
android:id="@+id/fold_layouts_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"

View File

@@ -1,22 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.setting.SettingFragment">
<TextView
android:id="@+id/text_setting"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_height="wrap_content">
</LinearLayout>
</ScrollView>

View File

@@ -13,7 +13,7 @@
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:id="@+id/imageView"
android:id="@+id/image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/nav_header_desc"
@@ -28,7 +28,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:id="@+id/textView"
android:id="@+id/text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nav_header_subtitle" />

View File

@@ -3,6 +3,6 @@
android:layout_width="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/toolButton"
android:id="@+id/tool_button"
style="@style/ToolsButton" />
</LinearLayout>

View File

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

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Oxygen</string>
<string name="navigation_drawer_open">Open navigation drawer</string>

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.OxygenToolbox" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
@@ -19,6 +20,10 @@
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.OxygenToolbox.Full" parent="Theme.OxygenToolbox.NoActionBar">
<item name="android:windowFullscreen">true</item>
</style>
<style name="Theme.OxygenToolbox.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.OxygenToolbox.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />