mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 06:51:26 +08:00
Auto init basic tools
This commit is contained in:
@@ -5,13 +5,12 @@ import android.content.pm.ShortcutInfo;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Menu;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.fatapp.oxygentoolbox.layout.FoldLayout;
|
||||
import com.fatapp.oxygentoolbox.util.ToolsList;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
|
||||
import androidx.navigation.NavController;
|
||||
@@ -22,10 +21,8 @@ import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@@ -62,6 +59,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public class AutoLinefeedLayout extends ViewGroup {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
layoutHorizontal();
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class AutoLinefeedLayout extends ViewGroup {
|
||||
for (int i = 0; i < count; i++) {
|
||||
measureChild(getChildAt(i), widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
if (heightMode == MeasureSpec.AT_MOST||heightMode == MeasureSpec.UNSPECIFIED) {
|
||||
if (heightMode == MeasureSpec.AT_MOST || heightMode == MeasureSpec.UNSPECIFIED) {
|
||||
final int width = MeasureSpec.getSize(widthMeasureSpec);
|
||||
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(getDesiredHeight(width), MeasureSpec.EXACTLY));
|
||||
} else {
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.fatapp.oxygentoolbox.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
public class FoldLayout extends LinearLayout implements View.OnClickListener {
|
||||
|
||||
private boolean init;
|
||||
private final int layoutId;
|
||||
@@ -40,8 +40,8 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
|
||||
public FoldLayout(Context context, 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);
|
||||
@SuppressLint("Recycle") TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.FoldLayout, defStyleAttr, 0);
|
||||
layoutId = ta.getResourceId(R.styleable.FoldLayout_layoutId, -1);
|
||||
init(context);
|
||||
}
|
||||
|
||||
@@ -55,18 +55,18 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
*/
|
||||
private void addDefaultLayout(Context context) {
|
||||
|
||||
defaultView = LayoutInflater.from(context).inflate(layoutId, this,true);
|
||||
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,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
content.setOrientation(VERTICAL);
|
||||
addView(content,layoutParams);
|
||||
addView(content, layoutParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(isShow) {
|
||||
if (isShow) {
|
||||
hideItem();
|
||||
} else {
|
||||
showItem();
|
||||
@@ -85,7 +85,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
private void initAnimation() {
|
||||
|
||||
int contentHeight = content.getMeasuredHeight();
|
||||
if(!init) {
|
||||
if (!init) {
|
||||
showAnimator = ValueAnimator.ofInt(0, contentHeight);
|
||||
showAnimator.addUpdateListener(animation -> {
|
||||
LayoutParams layoutParams = (LayoutParams) content.getLayoutParams();
|
||||
@@ -101,7 +101,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
}
|
||||
});
|
||||
|
||||
hideAnimator = ValueAnimator.ofInt(contentHeight,0);
|
||||
hideAnimator = ValueAnimator.ofInt(contentHeight, 0);
|
||||
hideAnimator.addUpdateListener(animation -> {
|
||||
LayoutParams layoutParams = (LayoutParams) content.getLayoutParams();
|
||||
layoutParams.height = (int) animation.getAnimatedValue();
|
||||
@@ -119,7 +119,6 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
}
|
||||
});
|
||||
init = true;
|
||||
hide();
|
||||
|
||||
showItem();
|
||||
}
|
||||
@@ -133,22 +132,13 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
final int position = i;
|
||||
content.addView(views.get(i));
|
||||
views.get(i).setOnClickListener(v -> {
|
||||
if(null != mOnItemClickListener) {
|
||||
mOnItemClickListener.onItemClick(v,position);
|
||||
if (null != mOnItemClickListener) {
|
||||
mOnItemClickListener.onItemClick(v, position);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto hide
|
||||
*/
|
||||
public void hide() {
|
||||
LinearLayout.LayoutParams layoutParams = (LayoutParams) content.getLayoutParams();
|
||||
layoutParams.height = 0;
|
||||
content.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
public void showItem() {
|
||||
isShow = true;
|
||||
@@ -170,7 +160,7 @@ public class FoldLayout extends LinearLayout implements View.OnClickListener{
|
||||
}
|
||||
|
||||
interface OnItemClickListener {
|
||||
void onItemClick(View view,int position);
|
||||
void onItemClick(View view, int position);
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.fatapp.oxygentoolbox.tools;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.fatapp.oxygentoolbox.R;
|
||||
|
||||
public class TimeScreenActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_time_screen);
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,25 @@
|
||||
package com.fatapp.oxygentoolbox.ui.home;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Bundle;
|
||||
import android.util.TypedValue;
|
||||
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 androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.fatapp.oxygentoolbox.MainActivity;
|
||||
import com.fatapp.oxygentoolbox.R;
|
||||
import com.fatapp.oxygentoolbox.layout.FoldLayout;
|
||||
import com.fatapp.oxygentoolbox.util.BasicToolsLauncher;
|
||||
import com.fatapp.oxygentoolbox.util.ToolsList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -32,8 +30,7 @@ public class HomeFragment extends Fragment {
|
||||
|
||||
private HomeViewModel homeViewModel;
|
||||
|
||||
private FoldLayout foldLayout;
|
||||
private FoldLayout foldLayout1;
|
||||
private LinearLayout foldLayoutsLinearLayout;
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
homeViewModel =
|
||||
@@ -44,21 +41,56 @@ public class HomeFragment extends Fragment {
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
foldLayout = root.findViewById(R.id.foldLayout);
|
||||
List<View> viewList = new ArrayList<>();
|
||||
View layout_item = getLayoutInflater().inflate(R.layout.layout_item, null);
|
||||
ViewGroup layout_item_AutoLinefeedLayout = layout_item.findViewById(R.id.layout_item_AutoLinefeedLayout);
|
||||
for (int i = 1; i < 1000; i++) {
|
||||
View toolButton = getLayoutInflater().inflate(R.layout.tool_button, null);
|
||||
((Button) toolButton.findViewById(R.id.toolButton)).setText("Bt" + i);
|
||||
layout_item_AutoLinefeedLayout.addView(toolButton);
|
||||
}
|
||||
viewList.add(layout_item);
|
||||
foldLayout.addItemView(viewList);
|
||||
for (ToolsList.Tool tool : ToolsList.getToolList()) {
|
||||
|
||||
foldLayout1 = root.findViewById(R.id.foldLayout1);
|
||||
List<View> viewList1 = new ArrayList<>();
|
||||
viewList1.add(getLayoutInflater().inflate(R.layout.layout_item, null));
|
||||
foldLayout1.addItemView(viewList1);
|
||||
View foldLayoutBody = getLayoutInflater().inflate(R.layout.fold_layout_body, null);
|
||||
ViewGroup layout_item_AutoLinefeedLayout = foldLayoutBody.findViewById(R.id.layout_item_AutoLinefeedLayout);
|
||||
|
||||
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 -> {
|
||||
BasicToolsLauncher.launch(button.getActivity(), getContext());
|
||||
});
|
||||
layout_item_AutoLinefeedLayout.addView(toolButton);
|
||||
}
|
||||
|
||||
List<View> viewList = new ArrayList<>();
|
||||
viewList.add(foldLayoutBody);
|
||||
|
||||
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.addItemView(viewList);
|
||||
|
||||
foldLayoutsLinearLayout = root.findViewById(R.id.foldLayoutsLinearLayout);
|
||||
foldLayoutsLinearLayout.addView(foldLayoutHead);
|
||||
}
|
||||
|
||||
/*for (int i = 0; i < 10; i++) {
|
||||
View toolButton = getLayoutInflater().inflate(R.layout.tool_button, null);
|
||||
((Button) toolButton.findViewById(R.id.toolButton)).setText("Button");
|
||||
toolButton.findViewById(R.id.toolButton).setOnClickListener(v -> {
|
||||
BasicToolsLauncher.launch(0, getContext());
|
||||
});
|
||||
|
||||
View foldLayoutBody = getLayoutInflater().inflate(R.layout.fold_layout_body, null);
|
||||
ViewGroup layout_item_AutoLinefeedLayout = foldLayoutBody.findViewById(R.id.layout_item_AutoLinefeedLayout);
|
||||
layout_item_AutoLinefeedLayout.addView(toolButton);
|
||||
|
||||
List<View> viewList = new ArrayList<>();
|
||||
viewList.add(foldLayoutBody);
|
||||
|
||||
View foldLayoutHead = getLayoutInflater().inflate(R.layout.fold_layout, null);
|
||||
FoldLayout foldLayout = foldLayoutHead.findViewById(R.id.foldLayout);
|
||||
((TextView) foldLayout.findViewById(R.id.foldLayoutTextView)).setText("FoldLayout_" + i);
|
||||
foldLayout.addItemView(viewList);
|
||||
|
||||
foldLayoutsLinearLayout = root.findViewById(R.id.foldLayoutsLinearLayout);
|
||||
foldLayoutsLinearLayout.addView(foldLayoutHead);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.fatapp.oxygentoolbox.util;
|
||||
|
||||
import static androidx.core.content.ContextCompat.startActivity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.fatapp.oxygentoolbox.tools.TimeScreenActivity;
|
||||
|
||||
public class BasicToolsLauncher {
|
||||
public static void launch(int activity, Context context) {
|
||||
switch (activity) {
|
||||
case 0:
|
||||
startActivity(context, new Intent(context, TimeScreenActivity.class), null);
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.fatapp.oxygentoolbox.util;
|
||||
|
||||
public class Config {
|
||||
}
|
||||
233
app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsJson.java
Normal file
233
app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsJson.java
Normal file
@@ -0,0 +1,233 @@
|
||||
package com.fatapp.oxygentoolbox.util;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ToolsJson {
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("content")
|
||||
private Content content;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Content getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(Content content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public static class Content {
|
||||
@SerializedName("version")
|
||||
private String version;
|
||||
@SerializedName("versionID")
|
||||
private Integer versionID;
|
||||
@SerializedName("mainVersion")
|
||||
private Integer mainVersion;
|
||||
@SerializedName("font")
|
||||
private String font;
|
||||
@SerializedName("icon")
|
||||
private String icon;
|
||||
@SerializedName("title")
|
||||
private Title title;
|
||||
@SerializedName("desc")
|
||||
private Desc desc;
|
||||
@SerializedName("buttons")
|
||||
private List<Buttons> buttons;
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Integer getVersionID() {
|
||||
return versionID;
|
||||
}
|
||||
|
||||
public void setVersionID(Integer versionID) {
|
||||
this.versionID = versionID;
|
||||
}
|
||||
|
||||
public Integer getMainVersion() {
|
||||
return mainVersion;
|
||||
}
|
||||
|
||||
public void setMainVersion(Integer mainVersion) {
|
||||
this.mainVersion = mainVersion;
|
||||
}
|
||||
|
||||
public Title getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(Title title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getFont() {
|
||||
return font;
|
||||
}
|
||||
|
||||
public void setFont(String font) {
|
||||
this.font = font;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public Desc getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(Desc desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public List<Buttons> getButtons() {
|
||||
return buttons;
|
||||
}
|
||||
|
||||
public void setButtons(List<Buttons> buttons) {
|
||||
this.buttons = buttons;
|
||||
}
|
||||
|
||||
public static class Title {
|
||||
@SerializedName("cn")
|
||||
private String cn;
|
||||
@SerializedName("tc")
|
||||
private String tc;
|
||||
@SerializedName("en")
|
||||
private String en;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getTc() {
|
||||
return tc;
|
||||
}
|
||||
|
||||
public void setTc(String tc) {
|
||||
this.tc = tc;
|
||||
}
|
||||
|
||||
public String getEn() {
|
||||
return en;
|
||||
}
|
||||
|
||||
public void setEn(String en) {
|
||||
this.en = en;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Desc {
|
||||
@SerializedName("cn")
|
||||
private String cn;
|
||||
@SerializedName("tc")
|
||||
private String tc;
|
||||
@SerializedName("en")
|
||||
private String en;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getTc() {
|
||||
return tc;
|
||||
}
|
||||
|
||||
public void setTc(String tc) {
|
||||
this.tc = tc;
|
||||
}
|
||||
|
||||
public String getEn() {
|
||||
return en;
|
||||
}
|
||||
|
||||
public void setEn(String en) {
|
||||
this.en = en;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Buttons {
|
||||
@SerializedName("text")
|
||||
private Text text;
|
||||
@SerializedName("activity")
|
||||
private Integer activity;
|
||||
|
||||
public Text getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(Text text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Integer getActivity() {
|
||||
return activity;
|
||||
}
|
||||
|
||||
public void setActivity(Integer activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
public static class Text {
|
||||
@SerializedName("cn")
|
||||
private String cn;
|
||||
@SerializedName("tc")
|
||||
private String tc;
|
||||
@SerializedName("en")
|
||||
private String en;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getTc() {
|
||||
return tc;
|
||||
}
|
||||
|
||||
public void setTc(String tc) {
|
||||
this.tc = tc;
|
||||
}
|
||||
|
||||
public String getEn() {
|
||||
return en;
|
||||
}
|
||||
|
||||
public void setEn(String en) {
|
||||
this.en = en;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
106
app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsList.java
Normal file
106
app/src/main/java/com/fatapp/oxygentoolbox/util/ToolsList.java
Normal file
@@ -0,0 +1,106 @@
|
||||
package com.fatapp.oxygentoolbox.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ToolsList {
|
||||
private static List<Tool> toolList = new ArrayList<>();
|
||||
|
||||
public static void init(InputStream file) throws IOException {
|
||||
int i;
|
||||
StringBuilder jsonStringBuilder = new StringBuilder();
|
||||
|
||||
while ((i = file.read()) != -1) {
|
||||
jsonStringBuilder.append((char) i);
|
||||
}
|
||||
file.close();
|
||||
List<ToolsJson> toolsJsonList = new Gson().fromJson(jsonStringBuilder.toString(), new TypeToken<List<ToolsJson>>(){}.getType());
|
||||
|
||||
for (ToolsJson toolsJson : toolsJsonList) {
|
||||
Tool tool = new Tool();
|
||||
tool.setFont(toolsJson.getContent().getFont());
|
||||
tool.setIcon(toolsJson.getContent().getIcon());
|
||||
tool.setFoldLayoutTitle(toolsJson.getContent().getTitle().getCn());
|
||||
for (ToolsJson.Content.Buttons cButton : toolsJson.getContent().getButtons()) {
|
||||
Button button = new Button();
|
||||
button.setText(cButton.getText().getCn());
|
||||
button.setActivity(cButton.getActivity());
|
||||
tool.buttonList.add(button);
|
||||
}
|
||||
toolList.add(tool);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Tool> getToolList() {
|
||||
return toolList;
|
||||
}
|
||||
|
||||
public void setToolList(List<Tool> toolList) {
|
||||
ToolsList.toolList = toolList;
|
||||
}
|
||||
|
||||
public static class Tool {
|
||||
private String font;
|
||||
private String icon;
|
||||
private String foldLayoutTitle;
|
||||
private List<Button> buttonList = new ArrayList<>();
|
||||
|
||||
public String getFont() {
|
||||
return font;
|
||||
}
|
||||
|
||||
public void setFont(String font) {
|
||||
this.font = font;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getFoldLayoutTitle() {
|
||||
return foldLayoutTitle;
|
||||
}
|
||||
|
||||
public void setFoldLayoutTitle(String foldLayoutTitle) {
|
||||
this.foldLayoutTitle = foldLayoutTitle;
|
||||
}
|
||||
|
||||
public List<Button> getButtonList() {
|
||||
return buttonList;
|
||||
}
|
||||
|
||||
public void setButtonList(List<Button> buttonList) {
|
||||
this.buttonList = buttonList;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Button {
|
||||
private String text;
|
||||
private Integer activity;
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Integer getActivity() {
|
||||
return activity;
|
||||
}
|
||||
|
||||
public void setActivity(Integer activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user