diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
index 14922df..699b2b5 100644
--- a/.idea/deploymentTargetDropDown.xml
+++ b/.idea/deploymentTargetDropDown.xml
@@ -7,12 +7,12 @@
-
+
-
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 41b83d3..d6d68b4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -10,8 +10,11 @@
+
+
+
@@ -44,6 +47,7 @@
+
@@ -54,6 +58,7 @@
+
@@ -65,9 +70,11 @@
+
+
diff --git a/app/src/main/java/com/fatapp/oxygentoolbox/App.java b/app/src/main/java/com/fatapp/oxygentoolbox/App.java
index 7624d95..a5c05bd 100644
--- a/app/src/main/java/com/fatapp/oxygentoolbox/App.java
+++ b/app/src/main/java/com/fatapp/oxygentoolbox/App.java
@@ -5,6 +5,7 @@ import android.app.Application;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
+import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -12,12 +13,23 @@ import androidx.annotation.Nullable;
import com.fatapp.oxygentoolbox.util.MultiLanguageUtils;
import com.fatapp.oxygentoolbox.util.ResourceUtil;
import com.fatapp.oxygentoolbox.util.SharedPreferencesUtils;
+import com.fatapp.oxygentoolbox.util.ToolsList;
+
+import java.io.IOException;
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
+ try {
+ ToolsList.init(getResources().getAssets().open("json/BasicTools.json"));
+ } catch (IOException e) {
+ e.printStackTrace();
+ Toast.makeText(getApplicationContext(), R.string.init_tools_failed, Toast.LENGTH_LONG).show();
+ return;
+ }
+
registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
@Override
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {
diff --git a/app/src/main/java/com/fatapp/oxygentoolbox/layout/FoldLayout.java b/app/src/main/java/com/fatapp/oxygentoolbox/layout/FoldLayout.java
index c255f55..f242310 100644
--- a/app/src/main/java/com/fatapp/oxygentoolbox/layout/FoldLayout.java
+++ b/app/src/main/java/com/fatapp/oxygentoolbox/layout/FoldLayout.java
@@ -3,7 +3,6 @@ package com.fatapp.oxygentoolbox.layout;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
-import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.AnimatedVectorDrawable;
@@ -14,6 +13,7 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
+import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import com.fatapp.oxygentoolbox.R;
@@ -24,8 +24,8 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
private boolean init;
private final int layoutId;
- private boolean isShow;
- private boolean isDefaultShow;
+ private final long duration;
+ private boolean isShow = true;
private LinearLayout content;
private ValueAnimator showAnimator;
private ValueAnimator hideAnimator;
@@ -37,15 +37,19 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
this(context, null);
}
- public FoldLayout(Context context, AttributeSet attrs) {
- this(context, attrs, 0, false);
+ public FoldLayout(Context context, @Nullable AttributeSet attrs) {
+ this(context, attrs, 0);
}
- public FoldLayout(Context context, AttributeSet attrs, int defStyleAttr, boolean isDefaultShow) {
+ public FoldLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
- @SuppressLint("Recycle") TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.FoldLayout, defStyleAttr, 0);
- layoutId = ta.getResourceId(R.styleable.FoldLayout_layoutId, -1);
- this.isDefaultShow = isDefaultShow;
+ TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.FoldLayout, defStyleAttr, 0);
+ try {
+ layoutId = typedArray.getResourceId(R.styleable.FoldLayout_layoutId, -1);
+ duration = typedArray.getInt(R.styleable.FoldLayout_transitionTime, 500);
+ } finally {
+ typedArray.recycle();
+ }
init(context);
}
@@ -54,19 +58,11 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
addDefaultLayout(context);
}
- public void setDefaultShow(boolean defaultShow) {
- isDefaultShow = defaultShow;
- }
-
public View getDefaultView() {
return defaultView;
}
- /**
- * Init
- */
private void addDefaultLayout(Context context) {
-
defaultView = LayoutInflater.from(context).inflate(layoutId, this, true);
defaultView.setOnClickListener(this);
content = new LinearLayout(context);
@@ -95,53 +91,46 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
* Animation
*/
private void initAnimation() {
-
- int contentHeight = content.getMeasuredHeight();
if (!init) {
+ int contentHeight = content.getMeasuredHeight();
LayoutParams layoutParams = (LayoutParams) content.getLayoutParams();
- if (isDefaultShow) {
- isShow = true;
- layoutParams.height = contentHeight;
- LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_linear_layout);
- linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_radius));
- ImageView imageView = defaultView.findViewById(R.id.arrow_icon);
- imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.down_to_right_arrow));
- } else {
- layoutParams.height = 0;
- LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_linear_layout);
- linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_bottom_radius));
- ImageView imageView = defaultView.findViewById(R.id.arrow_icon);
- imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.right_to_down_arrow));
- }
+ layoutParams.height = contentHeight;
+ LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_head_layout);
+ linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_radius));
+ ImageView imageView = defaultView.findViewById(R.id.fold_layout_arrow_icon);
+ imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_down_to_right_arrow));
content.setLayoutParams(layoutParams);
showAnimator = ValueAnimator.ofInt(0, contentHeight);
+ showAnimator.setDuration(duration);
showAnimator.addUpdateListener(animation -> {
layoutParams.height = (int) animation.getAnimatedValue();
content.setLayoutParams(layoutParams);
});
showAnimator.addListener(new AnimatorListenerAdapter() {
- @SuppressLint("UseCompatLoadingForDrawables")
+ @Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
- LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_linear_layout);
- linearLayout.setBackground(getContext().getDrawable(R.drawable.background_top_radius));
+ if (isShow) {
+ LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_head_layout);
+ linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_radius));
+ }
}
});
hideAnimator = ValueAnimator.ofInt(contentHeight, 0);
+ hideAnimator.setDuration(duration);
hideAnimator.addUpdateListener(animation -> {
layoutParams.height = (int) animation.getAnimatedValue();
content.setLayoutParams(layoutParams);
});
hideAnimator.addListener(new AnimatorListenerAdapter() {
- @SuppressLint("UseCompatLoadingForDrawables")
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
if (!isShow) {
- LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_linear_layout);
- linearLayout.setBackground(getContext().getDrawable(R.drawable.background_top_bottom_radius));
+ LinearLayout linearLayout = defaultView.findViewById(R.id.fold_layout_head_layout);
+ linearLayout.setBackground(AppCompatResources.getDrawable(getContext(), R.drawable.background_top_bottom_radius));
}
}
});
@@ -156,30 +145,28 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener {
for (int i = 0; i < views.size(); i++) {
final int position = i;
content.addView(views.get(i));
- views.get(i).setOnClickListener(v -> {
+ views.get(i).setOnClickListener(view -> {
if (null != mOnItemClickListener) {
- mOnItemClickListener.onItemClick(v, position);
+ mOnItemClickListener.onItemClick(view, position);
}
});
}
}
- @SuppressLint("UseCompatLoadingForDrawables")
public void showItem() {
isShow = true;
showAnimator.start();
- ImageView imageView = defaultView.findViewById(R.id.arrow_icon);
- imageView.setImageDrawable(getContext().getDrawable(R.drawable.right_to_down_arrow));
+ ImageView imageView = defaultView.findViewById(R.id.fold_layout_arrow_icon);
+ imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_right_to_down_arrow));
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
animatedVectorDrawable.start();
}
- @SuppressLint("UseCompatLoadingForDrawables")
public void hideItem() {
isShow = false;
hideAnimator.start();
- ImageView imageView = defaultView.findViewById(R.id.arrow_icon);
- imageView.setImageDrawable(getContext().getDrawable(R.drawable.down_to_right_arrow));
+ ImageView imageView = defaultView.findViewById(R.id.fold_layout_arrow_icon);
+ imageView.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.animation_down_to_right_arrow));
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) imageView.getDrawable();
animatedVectorDrawable.start();
}
diff --git a/app/src/main/java/com/fatapp/oxygentoolbox/ui/home/tools/ToolsFragment.java b/app/src/main/java/com/fatapp/oxygentoolbox/ui/home/tools/ToolsFragment.java
index 25e5c90..1cf2ea4 100644
--- a/app/src/main/java/com/fatapp/oxygentoolbox/ui/home/tools/ToolsFragment.java
+++ b/app/src/main/java/com/fatapp/oxygentoolbox/ui/home/tools/ToolsFragment.java
@@ -1,30 +1,18 @@
package com.fatapp.oxygentoolbox.ui.home.tools;
-import android.annotation.SuppressLint;
-import android.graphics.Typeface;
import android.os.Bundle;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import com.fatapp.oxygentoolbox.R;
-import com.fatapp.oxygentoolbox.layout.FoldLayout;
-import com.fatapp.oxygentoolbox.util.ToolsLauncher;
-import com.fatapp.oxygentoolbox.util.ToolsList;
-import com.fatapp.oxygentoolbox.util.VibratorController;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import com.fatapp.oxygentoolbox.ui.home.util.ToolsAdapter;
public class ToolsFragment extends Fragment {
@@ -32,7 +20,7 @@ public class ToolsFragment extends Fragment {
private ToolsViewModel toolsViewModel;
- private LinearLayout foldLayoutsLinearLayout;
+ private RecyclerView toolsRecyclerView;
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
toolsViewModel = new ViewModelProvider(this).get(ToolsViewModel.class);
@@ -46,92 +34,11 @@ public class ToolsFragment extends Fragment {
}
private void initView() {
- foldLayoutsLinearLayout = root.findViewById(R.id.fold_layouts_linear_layout);
+ toolsRecyclerView = root.findViewById(R.id.tools_recycler_view);
}
private void initLayout() {
- initFoldLayout();
+ toolsRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
+ toolsRecyclerView.setAdapter(new ToolsAdapter());
}
-
- @SuppressLint("ClickableViewAccessibility")
- private void initFoldLayout() {
- try {
- ToolsList.init(getResources().getAssets().open("json/BasicTools.json"));
- } catch (IOException e) {
- e.printStackTrace();
- Toast.makeText(getContext(), R.string.init_tools_failed, 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 toolButtonLayout = getLayoutInflater().inflate(R.layout.fold_layout_button, null);
- Button toolButton = toolButtonLayout.findViewById(R.id.tool_button);
- toolButton.setText(button.getText());
-
- toolButton.setOnClickListener(v -> ToolsLauncher.launch(getContext(), button.getActivity()));
-
- toolButton.setOnTouchListener((v, event) -> {
- if (event.getAction() == MotionEvent.ACTION_DOWN) {
- v.animate().translationZ(8f).setDuration(100L);
- }
- if (event.getAction() == MotionEvent.ACTION_UP) {
- v.animate().translationZ(0).setDuration(100L);
- }
- return false;
- });
-
- toolButton.setOnLongClickListener(v -> {
- v.animate().translationZ(0).setDuration(100L);
- VibratorController.vibrate(1);
- return false;
- });
-
- autoLinefeedLayout.addView(toolButtonLayout);
- }
-
- List viewList = new ArrayList<>();
- viewList.add(foldLayoutBodyLayout);
-
- View foldLayoutHead = getLayoutInflater().inflate(R.layout.fold_layout, null);
- FoldLayout foldLayout = foldLayoutHead.findViewById(R.id.fold_layout);
- foldLayout.setDefaultShow(true);
- ((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(requireContext().getAssets(), tool.getFont()));
- foldLayoutIcon.setText(tool.getIcon());
-
- foldLayout.addItemView(viewList);
-
- foldLayoutsLinearLayout.removeAllViews();
- foldLayoutsLinearLayout.addView(foldLayoutHead);
- }
-
- for (int i = 0; i < 10; i++) {
- View toolButton = getLayoutInflater().inflate(R.layout.fold_layout_button, null);
- ((Button) toolButton.findViewById(R.id.tool_button)).setText("Button");
- toolButton.findViewById(R.id.tool_button).setOnClickListener(v -> {
- });
-
- View foldLayoutBody = getLayoutInflater().inflate(R.layout.fold_layout_body, null);
- ViewGroup layout_item_AutoLinefeedLayout = foldLayoutBody.findViewById(R.id.auto_linefeed_layout);
- layout_item_AutoLinefeedLayout.addView(toolButton);
-
- List viewList = new ArrayList<>();
- viewList.add(foldLayoutBody);
-
- View foldLayoutHead = getLayoutInflater().inflate(R.layout.fold_layout, null);
- FoldLayout foldLayout = foldLayoutHead.findViewById(R.id.fold_layout);
- ((TextView) foldLayout.findViewById(R.id.fold_layout_text_view)).setText("FoldLayout_" + i);
- foldLayout.addItemView(viewList);
-
- foldLayoutsLinearLayout.addView(foldLayoutHead);
- }
- }
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/com/fatapp/oxygentoolbox/ui/home/util/ToolsAdapter.java b/app/src/main/java/com/fatapp/oxygentoolbox/ui/home/util/ToolsAdapter.java
new file mode 100644
index 0000000..7610a96
--- /dev/null
+++ b/app/src/main/java/com/fatapp/oxygentoolbox/ui/home/util/ToolsAdapter.java
@@ -0,0 +1,88 @@
+package com.fatapp.oxygentoolbox.ui.home.util;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.fatapp.oxygentoolbox.R;
+import com.fatapp.oxygentoolbox.layout.AutoLinefeedLayout;
+import com.fatapp.oxygentoolbox.layout.FoldLayout;
+import com.fatapp.oxygentoolbox.util.ToolsLauncher;
+import com.fatapp.oxygentoolbox.util.ToolsList;
+import com.fatapp.oxygentoolbox.util.VibratorController;
+
+import java.util.Collections;
+
+public class ToolsAdapter extends RecyclerView.Adapter {
+ private ViewGroup parent;
+
+ @NonNull
+ @Override
+ public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ this.parent = parent;
+ View inflate = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_tools, parent, false);
+ return new ViewHolder(inflate);
+ }
+
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
+ View foldLayoutBodyLayout = LayoutInflater.from(parent.getContext()).inflate(R.layout.fold_layout_body, parent, false);
+ AutoLinefeedLayout autoLinefeedLayout = foldLayoutBodyLayout.findViewById(R.id.auto_linefeed_layout);
+ ToolsList.Tool tool = ToolsList.getToolList().get(position);
+ for (ToolsList.Button button : tool.getButtonList()) {
+ View toolButtonLayout = LayoutInflater.from(parent.getContext()).inflate(R.layout.fold_layout_button, parent, false);
+ Button toolButton = toolButtonLayout.findViewById(R.id.tool_button);
+ toolButton.setText(button.getText());
+ toolButton.setOnClickListener(view -> ToolsLauncher.launch(parent.getContext(), button.getActivity()));
+ toolButton.setOnTouchListener((view, motionEvent) -> {
+
+ if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
+ view.animate().translationZ(8f).setDuration(100L);
+ }
+ if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
+ view.animate().translationZ(0).setDuration(100L);
+ }
+ return false;
+ });
+ toolButton.setOnLongClickListener(v -> {
+ v.animate().translationZ(0).setDuration(100L);
+ VibratorController.vibrate(1);
+ return false;
+ });
+
+ autoLinefeedLayout.addView(toolButtonLayout);
+ }
+
+ TextView foldLayoutIcon = holder.getFoldLayout().findViewById(R.id.fold_layout_icon);
+ foldLayoutIcon.setTypeface(Typeface.createFromAsset(parent.getContext().getAssets(), tool.getFont()));
+ foldLayoutIcon.setText(tool.getIcon());
+ ((TextView) holder.getFoldLayout().findViewById(R.id.fold_layout_text_view)).setText(tool.getFoldLayoutTitle());
+ holder.getFoldLayout().addItemView(Collections.singletonList(foldLayoutBodyLayout));
+ }
+
+ @Override
+ public int getItemCount() {
+ return ToolsList.getToolList().size();
+ }
+
+ public static class ViewHolder extends RecyclerView.ViewHolder {
+ private final FoldLayout foldLayout;
+ public ViewHolder(@NonNull View itemView) {
+ super(itemView);
+ foldLayout = itemView.findViewById(R.id.fold_layout);
+ }
+
+ public FoldLayout getFoldLayout() {
+ return foldLayout;
+ }
+ }
+}
diff --git a/app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsList.java b/app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsList.java
index e24ce48..2dd6928 100644
--- a/app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsList.java
+++ b/app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsList.java
@@ -15,6 +15,7 @@ public class ToolsList {
private static List toolList = new ArrayList<>();
public static void init(InputStream file) throws IOException {
+ toolList.clear();
String str;
StringBuilder jsonStringBuilder = new StringBuilder();
InputStreamReader inputStreamReader = new InputStreamReader(file);
diff --git a/app/src/main/res/drawable-v21/ripple_foreground.xml b/app/src/main/res/drawable-v21/foreground_ripple.xml
similarity index 100%
rename from app/src/main/res/drawable-v21/ripple_foreground.xml
rename to app/src/main/res/drawable-v21/foreground_ripple.xml
diff --git a/app/src/main/res/drawable/down_to_right_arrow.xml b/app/src/main/res/drawable/animation_down_to_right_arrow.xml
similarity index 100%
rename from app/src/main/res/drawable/down_to_right_arrow.xml
rename to app/src/main/res/drawable/animation_down_to_right_arrow.xml
diff --git a/app/src/main/res/drawable/right_to_down_arrow.xml b/app/src/main/res/drawable/animation_right_to_down_arrow.xml
similarity index 100%
rename from app/src/main/res/drawable/right_to_down_arrow.xml
rename to app/src/main/res/drawable/animation_right_to_down_arrow.xml
diff --git a/app/src/main/res/drawable/side_nav_bar.xml b/app/src/main/res/drawable/background_side_nav_bar.xml
similarity index 100%
rename from app/src/main/res/drawable/side_nav_bar.xml
rename to app/src/main/res/drawable/background_side_nav_bar.xml
diff --git a/app/src/main/res/drawable/background_theme_bottom.xml b/app/src/main/res/drawable/background_theme_bottom.xml
new file mode 100644
index 0000000..e742379
--- /dev/null
+++ b/app/src/main/res/drawable/background_theme_bottom.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/background_no_radius.xml b/app/src/main/res/drawable/background_theme_middle.xml
similarity index 100%
rename from app/src/main/res/drawable/background_no_radius.xml
rename to app/src/main/res/drawable/background_theme_middle.xml
diff --git a/app/src/main/res/drawable/background_theme_top.xml b/app/src/main/res/drawable/background_theme_top.xml
new file mode 100644
index 0000000..b712f8a
--- /dev/null
+++ b/app/src/main/res/drawable/background_theme_top.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/radius_shape.xml b/app/src/main/res/drawable/shape_radius.xml
similarity index 100%
rename from app/src/main/res/drawable/radius_shape.xml
rename to app/src/main/res/drawable/shape_radius.xml
diff --git a/app/src/main/res/layout/app_nav_header_main.xml b/app/src/main/res/layout/app_nav_header_main.xml
index bac68aa..d10a655 100644
--- a/app/src/main/res/layout/app_nav_header_main.xml
+++ b/app/src/main/res/layout/app_nav_header_main.xml
@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
- android:background="@drawable/side_nav_bar"
+ android:background="@drawable/background_side_nav_bar"
android:gravity="bottom"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
diff --git a/app/src/main/res/layout/fold_layout_body.xml b/app/src/main/res/layout/fold_layout_body.xml
index e0784f5..8d1fed1 100644
--- a/app/src/main/res/layout/fold_layout_body.xml
+++ b/app/src/main/res/layout/fold_layout_body.xml
@@ -11,12 +11,11 @@
android:id="@+id/auto_linefeed_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:paddingHorizontal="5dp"
- android:paddingBottom="2dp"
+ android:layout_marginStart="10dp"
+ android:layout_marginEnd="10dp"
android:background="@drawable/background_bottom_radius"
- android:gravity="center_vertical">
-
+ android:gravity="center_vertical"
+ android:paddingHorizontal="5dp"
+ android:paddingBottom="2dp" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/fold_layout_head.xml b/app/src/main/res/layout/fold_layout_head.xml
index 89f0fe9..8b1d30d 100644
--- a/app/src/main/res/layout/fold_layout_head.xml
+++ b/app/src/main/res/layout/fold_layout_head.xml
@@ -1,11 +1,11 @@
-
-
-
-
\ No newline at end of file
+ android:layout_height="match_parent" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_theme.xml b/app/src/main/res/layout/fragment_theme.xml
index 5878da2..b934faf 100644
--- a/app/src/main/res/layout/fragment_theme.xml
+++ b/app/src/main/res/layout/fragment_theme.xml
@@ -1,6 +1,5 @@
+ android:layout_height="match_parent" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_libraries.xml b/app/src/main/res/layout/item_libraries.xml
index 3424495..d8068ef 100644
--- a/app/src/main/res/layout/item_libraries.xml
+++ b/app/src/main/res/layout/item_libraries.xml
@@ -90,8 +90,8 @@
android:id="@+id/library_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/library_item_card_inner_padding"
- android:layout_marginRight="@dimen/library_item_card_inner_padding"
+ android:layout_marginStart="@dimen/library_item_card_inner_padding"
+ android:layout_marginEnd="@dimen/library_item_card_inner_padding"
android:maxLines="20"
android:textAppearance="?textAppearanceBody2"
android:textColor="?attr/app_text_theme"
diff --git a/app/src/main/res/layout/item_themes.xml b/app/src/main/res/layout/item_themes.xml
index cb60ff6..23fe67d 100644
--- a/app/src/main/res/layout/item_themes.xml
+++ b/app/src/main/res/layout/item_themes.xml
@@ -12,7 +12,7 @@
android:layout_height="40dp"
android:gravity="center_vertical"
android:padding="10dp"
- android:background="@drawable/background_top_radius"
+ android:background="@drawable/background_theme_top"
android:orientation="horizontal">
+ android:background="@drawable/background_theme_middle" />
+ android:background="@drawable/background_theme_middle" />
+ android:background="@drawable/background_theme_bottom" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/fold_layout.xml b/app/src/main/res/layout/item_tools.xml
similarity index 89%
rename from app/src/main/res/layout/fold_layout.xml
rename to app/src/main/res/layout/item_tools.xml
index caf1785..714c8d3 100644
--- a/app/src/main/res/layout/fold_layout.xml
+++ b/app/src/main/res/layout/item_tools.xml
@@ -2,13 +2,14 @@
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 65c235d..508bda0 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -2,6 +2,7 @@
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 3d0a7a9..4f746a2 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -5,14 +5,11 @@
- wrap_content
- 0dp
- 35dp
- - 5dp
- - 5dp
- - 5dp
- - 5dp
+ - 5dp
- 15dp
- 15dp
- - @drawable/radius_shape
- - @drawable/ripple_foreground
+ - @drawable/shape_radius
+ - @drawable/foreground_ripple
- @null
- ?attr/tools_button_text