add: new ui for file creating
This commit is contained in:
@@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
public class FragmentPagerAdapterBuilder {
|
public class FragmentPagerAdapterBuilder {
|
||||||
|
|
||||||
public interface OnFragmentInstantiateListener {
|
public interface OnFragmentInstantiateListener {
|
||||||
void OnInstantiate(Fragment fragment);
|
void OnInstantiate(int pos, Fragment fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Fragment> mFragments = new ArrayList<>();
|
private List<Fragment> mFragments = new ArrayList<>();
|
||||||
@@ -71,7 +71,7 @@ public class FragmentPagerAdapterBuilder {
|
|||||||
Fragment fragment = (Fragment) super.instantiateItem(container, position);
|
Fragment fragment = (Fragment) super.instantiateItem(container, position);
|
||||||
mStoredFragments.put(position, fragment);
|
mStoredFragments.put(position, fragment);
|
||||||
if(mOnFragmentInstantiateListener != null){
|
if(mOnFragmentInstantiateListener != null){
|
||||||
mOnFragmentInstantiateListener.OnInstantiate(fragment);
|
mOnFragmentInstantiateListener.OnInstantiate(position, fragment);
|
||||||
}
|
}
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ import com.stardust.scriptdroid.ui.main.doc.OnlineDocsFragment_;
|
|||||||
import com.stardust.scriptdroid.ui.main.drawer.DrawerFragment;
|
import com.stardust.scriptdroid.ui.main.drawer.DrawerFragment;
|
||||||
import com.stardust.scriptdroid.ui.main.script_list.MyScriptListFragment_;
|
import com.stardust.scriptdroid.ui.main.script_list.MyScriptListFragment_;
|
||||||
import com.stardust.scriptdroid.ui.main.task.TaskManagerFragment_;
|
import com.stardust.scriptdroid.ui.main.task.TaskManagerFragment_;
|
||||||
|
import com.stardust.theme.ThemeColorManager;
|
||||||
|
import com.stardust.theme.ThemeColorManagerCompat;
|
||||||
import com.stardust.util.DeveloperUtils;
|
import com.stardust.util.DeveloperUtils;
|
||||||
import com.stardust.scriptdroid.tool.AccessibilityServiceTool;
|
import com.stardust.scriptdroid.tool.AccessibilityServiceTool;
|
||||||
import com.stardust.scriptdroid.tool.DrawableSaver;
|
import com.stardust.scriptdroid.tool.DrawableSaver;
|
||||||
@@ -92,6 +94,7 @@ public class MainActivity extends BaseActivity implements OnActivityResultDelega
|
|||||||
setUpTabViewPager();
|
setUpTabViewPager();
|
||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||||
registerBackPressHandlers();
|
registerBackPressHandlers();
|
||||||
|
ThemeColorManager.addViewBackground(findViewById(R.id.app_bar));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAnnunciationIfNeeded() {
|
private void showAnnunciationIfNeeded() {
|
||||||
@@ -164,13 +167,22 @@ public class MainActivity extends BaseActivity implements OnActivityResultDelega
|
|||||||
.build();
|
.build();
|
||||||
mViewPager.setAdapter(mPagerAdapter);
|
mViewPager.setAdapter(mPagerAdapter);
|
||||||
tabLayout.setupWithViewPager(mViewPager);
|
tabLayout.setupWithViewPager(mViewPager);
|
||||||
|
mPagerAdapter.setOnFragmentInstantiateListener(new FragmentPagerAdapterBuilder.OnFragmentInstantiateListener() {
|
||||||
|
@Override
|
||||||
|
public void OnInstantiate(int pos, Fragment fragment) {
|
||||||
|
((ViewPagerFragment) fragment).setFab(mFab);
|
||||||
|
if (pos == mViewPager.getCurrentItem()) {
|
||||||
|
((ViewPagerFragment) fragment).onPageSelected();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
mViewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
|
mViewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
Fragment fragment = mPagerAdapter.getStoredFragment(position);
|
Fragment fragment = mPagerAdapter.getStoredFragment(position);
|
||||||
if (fragment == null)
|
if (fragment == null)
|
||||||
return;
|
return;
|
||||||
((ViewPagerFragment) fragment).setUpWithFab(mViewPager, mFab);
|
((ViewPagerFragment) fragment).onPageSelected();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.stardust.scriptdroid.ui.main;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.support.annotation.IdRes;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
|
import com.github.aakira.expandablelayout.ExpandableRelativeLayout;
|
||||||
|
import com.stardust.scriptdroid.R;
|
||||||
|
import com.stardust.theme.dialog.ThemeColorMaterialDialogBuilder;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import butterknife.OnCheckedChanged;
|
||||||
|
import butterknife.OnClick;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Stardust on 2017/8/25.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class NewFileDialogBuilder extends ThemeColorMaterialDialogBuilder {
|
||||||
|
|
||||||
|
@BindView(R.id.layout_new_file)
|
||||||
|
ExpandableRelativeLayout mLayoutNewFile;
|
||||||
|
|
||||||
|
@BindView(R.id.layout_import)
|
||||||
|
ExpandableRelativeLayout mLayoutImport;
|
||||||
|
|
||||||
|
ExpandableRelativeLayout mExpandedLayout;
|
||||||
|
|
||||||
|
|
||||||
|
public NewFileDialogBuilder(Context context) {
|
||||||
|
super(context);
|
||||||
|
View view = View.inflate(context, R.layout.new_file_dialog, null);
|
||||||
|
customView(view, true);
|
||||||
|
title(R.string.text_new);
|
||||||
|
positiveText(R.string.ok);
|
||||||
|
negativeText(R.string.cancel);
|
||||||
|
ButterKnife.bind(this, view);
|
||||||
|
mExpandedLayout = mLayoutNewFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnClick(R.id.option_new_file)
|
||||||
|
void expandLayoutNewFile() {
|
||||||
|
if (mExpandedLayout != mLayoutNewFile) {
|
||||||
|
if(mExpandedLayout != null){
|
||||||
|
mExpandedLayout.collapse();
|
||||||
|
}
|
||||||
|
mLayoutNewFile.expand();
|
||||||
|
mExpandedLayout = mLayoutNewFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OnClick(R.id.option_import)
|
||||||
|
void expandLayoutImport() {
|
||||||
|
if (mExpandedLayout != mLayoutImport) {
|
||||||
|
if(mExpandedLayout != null){
|
||||||
|
mExpandedLayout.collapse();
|
||||||
|
}
|
||||||
|
mLayoutImport.expand();
|
||||||
|
mExpandedLayout = mLayoutImport;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,14 +1,61 @@
|
|||||||
package com.stardust.scriptdroid.ui.main;
|
package com.stardust.scriptdroid.ui.main;
|
||||||
|
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
|
import android.support.v4.view.animation.FastOutSlowInInterpolator;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Stardust on 2017/8/22.
|
* Created by Stardust on 2017/8/22.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public interface ViewPagerFragment {
|
public abstract class ViewPagerFragment extends Fragment {
|
||||||
|
|
||||||
|
protected static final int ROTATION_GONE = -1;
|
||||||
|
|
||||||
|
private int mRotation;
|
||||||
|
private FloatingActionButton mFab;
|
||||||
|
private View.OnClickListener mOnFabClickListener = new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
onFabClick((FloatingActionButton) v);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public ViewPagerFragment(int rotation) {
|
||||||
|
mRotation = rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFab(FloatingActionButton fab) {
|
||||||
|
mFab = fab;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void onFabClick(FloatingActionButton fab);
|
||||||
|
|
||||||
|
public void onPageSelected() {
|
||||||
|
if (mRotation == ROTATION_GONE) {
|
||||||
|
if (mFab.getVisibility() == View.VISIBLE) {
|
||||||
|
mFab.hide();
|
||||||
|
}
|
||||||
|
mFab.setOnClickListener(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mFab.setOnClickListener(mOnFabClickListener);
|
||||||
|
if (mFab.getVisibility() != View.VISIBLE) {
|
||||||
|
mFab.setRotation(mRotation);
|
||||||
|
mFab.show();
|
||||||
|
} else if (Math.abs(mFab.getRotation() - mRotation) > 0.1f) {
|
||||||
|
mFab.animate()
|
||||||
|
.rotation(mRotation)
|
||||||
|
.setDuration(300)
|
||||||
|
.setInterpolator(new FastOutSlowInInterpolator())
|
||||||
|
.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void setUpWithFab(ViewPager pager, FloatingActionButton fab);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,17 +13,14 @@ import com.stardust.scriptdroid.ui.main.ViewPagerFragment;
|
|||||||
* Created by Stardust on 2017/8/22.
|
* Created by Stardust on 2017/8/22.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class CommunityFragment extends Fragment implements ViewPagerFragment {
|
public class CommunityFragment extends ViewPagerFragment {
|
||||||
|
|
||||||
|
public CommunityFragment() {
|
||||||
|
super(0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUpWithFab(ViewPager pager, FloatingActionButton fab) {
|
protected void onFabClick(FloatingActionButton fab) {
|
||||||
if (fab.getVisibility() != View.VISIBLE) {
|
|
||||||
fab.show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fab.animate()
|
|
||||||
.rotation(0)
|
|
||||||
.setDuration(300)
|
|
||||||
.setInterpolator(new FastOutSlowInInterpolator())
|
|
||||||
.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,12 +21,17 @@ import org.androidannotations.annotations.ViewById;
|
|||||||
* Created by Stardust on 2017/8/22.
|
* Created by Stardust on 2017/8/22.
|
||||||
*/
|
*/
|
||||||
@EFragment(R.layout.fragment_online_docs)
|
@EFragment(R.layout.fragment_online_docs)
|
||||||
public class OnlineDocsFragment extends Fragment implements BackPressedHandler, ViewPagerFragment {
|
public class OnlineDocsFragment extends ViewPagerFragment implements BackPressedHandler {
|
||||||
|
|
||||||
@ViewById(R.id.eweb_view)
|
@ViewById(R.id.eweb_view)
|
||||||
EWebView mEWebView;
|
EWebView mEWebView;
|
||||||
WebView mWebView;
|
WebView mWebView;
|
||||||
|
|
||||||
|
|
||||||
|
public OnlineDocsFragment() {
|
||||||
|
super(ROTATION_GONE);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAttach(Context context) {
|
public void onAttach(Context context) {
|
||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
@@ -59,9 +64,7 @@ public class OnlineDocsFragment extends Fragment implements BackPressedHandler,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUpWithFab(ViewPager pager, FloatingActionButton fab) {
|
protected void onFabClick(FloatingActionButton fab) {
|
||||||
if (fab.getVisibility() == View.VISIBLE) {
|
|
||||||
fab.hide();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.support.annotation.Nullable;
|
|||||||
import android.support.v7.widget.SwitchCompat;
|
import android.support.v7.widget.SwitchCompat;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ import com.stardust.scriptdroid.R;
|
|||||||
import com.stardust.scriptdroid.external.floatingwindow.HoverMenuManger;
|
import com.stardust.scriptdroid.external.floatingwindow.HoverMenuManger;
|
||||||
import com.stardust.scriptdroid.external.floatingwindow.menu.HoverMenuService;
|
import com.stardust.scriptdroid.external.floatingwindow.menu.HoverMenuService;
|
||||||
import com.stardust.scriptdroid.ui.common.ProgressDialog;
|
import com.stardust.scriptdroid.ui.common.ProgressDialog;
|
||||||
|
import com.stardust.theme.ThemeColorManager;
|
||||||
import com.stardust.view.accessibility.AccessibilityService;
|
import com.stardust.view.accessibility.AccessibilityService;
|
||||||
import com.stardust.scriptdroid.sublime.SublimePluginClient;
|
import com.stardust.scriptdroid.sublime.SublimePluginClient;
|
||||||
import com.stardust.scriptdroid.sublime.SublimePluginService;
|
import com.stardust.scriptdroid.sublime.SublimePluginService;
|
||||||
@@ -25,6 +27,7 @@ import com.stardust.scriptdroid.tool.WifiTool;
|
|||||||
import com.stardust.util.IntentUtil;
|
import com.stardust.util.IntentUtil;
|
||||||
import com.stardust.util.UnderuseExecutors;
|
import com.stardust.util.UnderuseExecutors;
|
||||||
|
|
||||||
|
import org.androidannotations.annotations.AfterViews;
|
||||||
import org.androidannotations.annotations.CheckedChange;
|
import org.androidannotations.annotations.CheckedChange;
|
||||||
import org.androidannotations.annotations.Click;
|
import org.androidannotations.annotations.Click;
|
||||||
import org.androidannotations.annotations.EFragment;
|
import org.androidannotations.annotations.EFragment;
|
||||||
@@ -45,8 +48,11 @@ public class DrawerFragment extends android.support.v4.app.Fragment {
|
|||||||
SwitchCompat mAccessibilityServiceSwitch;
|
SwitchCompat mAccessibilityServiceSwitch;
|
||||||
SwitchCompat mFloatingWindowSwitch;
|
SwitchCompat mFloatingWindowSwitch;
|
||||||
SwitchCompat mDebugSwitch;
|
SwitchCompat mDebugSwitch;
|
||||||
|
@ViewById(R.id.header)
|
||||||
|
View mHeaderView;
|
||||||
private Executor mExecutor = UnderuseExecutors.getExecutor();
|
private Executor mExecutor = UnderuseExecutors.getExecutor();
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -59,6 +65,11 @@ public class DrawerFragment extends android.support.v4.app.Fragment {
|
|||||||
//syncSwitchState();
|
//syncSwitchState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterViews
|
||||||
|
void setUpViews(){
|
||||||
|
ThemeColorManager.addViewBackground(mHeaderView);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void syncSwitchState() {
|
private void syncSwitchState() {
|
||||||
mAccessibilityServiceSwitch.postDelayed(new Runnable() {
|
mAccessibilityServiceSwitch.postDelayed(new Runnable() {
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
package com.stardust.scriptdroid.ui.main.sample_list;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.annotation.Nullable;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
|
||||||
import com.stardust.app.Fragment;
|
|
||||||
import com.stardust.scriptdroid.R;
|
|
||||||
import com.stardust.scriptdroid.script.Scripts;
|
|
||||||
import com.stardust.scriptdroid.script.sample.Sample;
|
|
||||||
import com.stardust.scriptdroid.script.sample.SampleFileManager;
|
|
||||||
import com.stardust.scriptdroid.ui.common.ScriptOperations;
|
|
||||||
import com.stardust.scriptdroid.ui.edit.ViewSampleActivity;
|
|
||||||
import com.stardust.scriptdroid.ui.main.MainActivity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Stardust on 2017/3/13.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class SampleScriptListFragment extends Fragment {
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public View createView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
||||||
return inflater.inflate(R.layout.fragment_sample_script_list, container, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
|
||||||
super.onViewCreated(view, savedInstanceState);
|
|
||||||
SampleScriptListRecyclerView sampleScriptListRecyclerView = $(R.id.script_list);
|
|
||||||
sampleScriptListRecyclerView.setSamples(SampleFileManager.getInstance().getSamplesFromAssets(getContext().getAssets(), "sample"));
|
|
||||||
sampleScriptListRecyclerView.setOnItemLongClickListener(new SampleScriptListRecyclerView.OnItemLongClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onItemLongClick(Sample sample) {
|
|
||||||
showMenuDialog(sample);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
sampleScriptListRecyclerView.setOnItemClickListener(new SampleScriptListRecyclerView.OnItemClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onItemClick(Sample sample) {
|
|
||||||
viewSample(sample);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showMenuDialog(final Sample sample) {
|
|
||||||
new MaterialDialog.Builder(getActivity())
|
|
||||||
.title(sample.name)
|
|
||||||
.items(getString(R.string.text_run), getString(R.string.text_copy_to_my_scripts))
|
|
||||||
.itemsCallback(new MaterialDialog.ListCallback() {
|
|
||||||
@Override
|
|
||||||
public void onSelection(MaterialDialog dialog, View itemView, int position, CharSequence text) {
|
|
||||||
if (position == 0) {
|
|
||||||
Scripts.run(getActivity(), sample);
|
|
||||||
} else {
|
|
||||||
copySampleToMyScripts(sample);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void copySampleToMyScripts(Sample sample) {
|
|
||||||
new ScriptOperations(getActivity(), getView())
|
|
||||||
.importSample(sample)
|
|
||||||
.subscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void viewSample(Sample sample) {
|
|
||||||
ViewSampleActivity.view(getContext(), sample);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,190 +0,0 @@
|
|||||||
package com.stardust.scriptdroid.ui.main.sample_list;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.support.annotation.NonNull;
|
|
||||||
import android.support.v7.widget.DividerItemDecoration;
|
|
||||||
import android.support.v7.widget.RecyclerView;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.workground.WrapContentLinearLayoutManager;
|
|
||||||
|
|
||||||
import com.bignerdranch.expandablerecyclerview.ChildViewHolder;
|
|
||||||
import com.bignerdranch.expandablerecyclerview.ExpandableRecyclerAdapter;
|
|
||||||
import com.bignerdranch.expandablerecyclerview.ParentViewHolder;
|
|
||||||
import com.bignerdranch.expandablerecyclerview.model.Parent;
|
|
||||||
import com.stardust.scriptdroid.R;
|
|
||||||
import com.stardust.scriptdroid.script.sample.Sample;
|
|
||||||
import com.stardust.widget.LevelBeamView;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Stardust on 2017/3/13.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class SampleScriptListRecyclerView extends RecyclerView {
|
|
||||||
|
|
||||||
public interface OnItemLongClickListener {
|
|
||||||
void onItemLongClick(Sample sample);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnItemClickListener {
|
|
||||||
void onItemClick(Sample sample);
|
|
||||||
}
|
|
||||||
|
|
||||||
private OnClickListener mOnItemClickListenerProxy = new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (mOnItemClickListener != null) {
|
|
||||||
SampleViewHolder viewHolder = (SampleViewHolder) getChildViewHolder(v);
|
|
||||||
mOnItemClickListener.onItemClick(viewHolder.getChild());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
private OnLongClickListener mOnLongClickListenerProxy = new OnLongClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onLongClick(View v) {
|
|
||||||
if (mOnItemLongClickListener != null) {
|
|
||||||
SampleViewHolder viewHolder = (SampleViewHolder) getChildViewHolder(v);
|
|
||||||
mOnItemLongClickListener.onItemLongClick(viewHolder.getChild());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
private OnItemLongClickListener mOnItemLongClickListener;
|
|
||||||
private OnItemClickListener mOnItemClickListener;
|
|
||||||
|
|
||||||
|
|
||||||
private Adapter mAdapter;
|
|
||||||
private List<SampleGroup> mSampleGroups = new ArrayList<>();
|
|
||||||
|
|
||||||
public SampleScriptListRecyclerView(Context context) {
|
|
||||||
super(context);
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SampleScriptListRecyclerView(Context context, AttributeSet attrs) {
|
|
||||||
super(context, attrs);
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SampleScriptListRecyclerView(Context context, AttributeSet attrs, int defStyle) {
|
|
||||||
super(context, attrs, defStyle);
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnItemLongClickListener(OnItemLongClickListener onItemLongClickListener) {
|
|
||||||
mOnItemLongClickListener = onItemLongClickListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
|
|
||||||
mOnItemClickListener = onItemClickListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSamples(List<com.stardust.scriptdroid.script.sample.SampleGroup> samples) {
|
|
||||||
mSampleGroups.clear();
|
|
||||||
for (com.stardust.scriptdroid.script.sample.SampleGroup sampleGroup : samples) {
|
|
||||||
mSampleGroups.add(new SampleGroup(sampleGroup));
|
|
||||||
}
|
|
||||||
mAdapter = new Adapter(mSampleGroups);
|
|
||||||
setAdapter(mAdapter);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init() {
|
|
||||||
setLayoutManager(new WrapContentLinearLayoutManager(getContext()));
|
|
||||||
addItemDecoration(new DividerItemDecoration(getContext(), VERTICAL));
|
|
||||||
}
|
|
||||||
|
|
||||||
private class SampleGroup implements Parent<Sample> {
|
|
||||||
|
|
||||||
private com.stardust.scriptdroid.script.sample.SampleGroup mSampleGroup;
|
|
||||||
|
|
||||||
SampleGroup(com.stardust.scriptdroid.script.sample.SampleGroup sampleGroup) {
|
|
||||||
mSampleGroup = sampleGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
String getGroupName() {
|
|
||||||
return mSampleGroup.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Sample> getChildList() {
|
|
||||||
return mSampleGroup.sampleList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInitiallyExpanded() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class SampleViewHolder extends ChildViewHolder<Sample> {
|
|
||||||
|
|
||||||
TextView name;
|
|
||||||
|
|
||||||
SampleViewHolder(@NonNull View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
name = (TextView) itemView.findViewById(R.id.name);
|
|
||||||
((LevelBeamView) itemView.findViewById(R.id.level)).setLevel(2);
|
|
||||||
itemView.setOnClickListener(mOnItemClickListenerProxy);
|
|
||||||
itemView.setOnLongClickListener(mOnLongClickListenerProxy);
|
|
||||||
}
|
|
||||||
|
|
||||||
void bind(Sample sample) {
|
|
||||||
name.setText(sample.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private class SampleGroupViewHolder extends ParentViewHolder<SampleGroup, Sample> {
|
|
||||||
|
|
||||||
TextView name;
|
|
||||||
|
|
||||||
SampleGroupViewHolder(@NonNull View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
name = (TextView) itemView.findViewById(R.id.name);
|
|
||||||
((LevelBeamView) itemView.findViewById(R.id.level)).setLevel(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void bind(SampleGroup group) {
|
|
||||||
name.setText(group.getGroupName());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private class Adapter extends ExpandableRecyclerAdapter<SampleGroup, Sample, SampleGroupViewHolder, SampleViewHolder> {
|
|
||||||
|
|
||||||
public Adapter(@NonNull List<SampleGroup> parentList) {
|
|
||||||
super(parentList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public SampleGroupViewHolder onCreateParentViewHolder(@NonNull ViewGroup parentViewGroup, int viewType) {
|
|
||||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.sample_recycler_view_group, parentViewGroup, false);
|
|
||||||
return new SampleGroupViewHolder(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public SampleViewHolder onCreateChildViewHolder(@NonNull ViewGroup childViewGroup, int viewType) {
|
|
||||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.sample_recycler_view_item, childViewGroup, false);
|
|
||||||
return new SampleViewHolder(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindParentViewHolder(@NonNull SampleGroupViewHolder parentViewHolder, int parentPosition, @NonNull SampleGroup parent) {
|
|
||||||
parentViewHolder.bind(parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindChildViewHolder(@NonNull SampleViewHolder childViewHolder, int parentPosition, int childPosition, @NonNull Sample child) {
|
|
||||||
childViewHolder.bind(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -17,6 +17,7 @@ import com.stardust.scriptdroid.script.Scripts;
|
|||||||
import com.stardust.scriptdroid.script.StorageFileProvider;
|
import com.stardust.scriptdroid.script.StorageFileProvider;
|
||||||
import com.stardust.scriptdroid.ui.common.ScriptLoopDialog;
|
import com.stardust.scriptdroid.ui.common.ScriptLoopDialog;
|
||||||
import com.stardust.scriptdroid.ui.edit.ScriptEditView;
|
import com.stardust.scriptdroid.ui.edit.ScriptEditView;
|
||||||
|
import com.stardust.scriptdroid.ui.main.NewFileDialogBuilder;
|
||||||
import com.stardust.scriptdroid.ui.main.ViewPagerFragment;
|
import com.stardust.scriptdroid.ui.main.ViewPagerFragment;
|
||||||
|
|
||||||
import org.androidannotations.annotations.AfterViews;
|
import org.androidannotations.annotations.AfterViews;
|
||||||
@@ -36,12 +37,16 @@ import io.reactivex.schedulers.Schedulers;
|
|||||||
* Created by Stardust on 2017/3/13.
|
* Created by Stardust on 2017/3/13.
|
||||||
*/
|
*/
|
||||||
@EFragment(R.layout.fragment_my_script_list)
|
@EFragment(R.layout.fragment_my_script_list)
|
||||||
public class MyScriptListFragment extends Fragment implements ViewPagerFragment {
|
public class MyScriptListFragment extends ViewPagerFragment {
|
||||||
|
|
||||||
private static final String TAG = "MyScriptListFragment";
|
private static final String TAG = "MyScriptListFragment";
|
||||||
|
|
||||||
private static ScriptFile sCurrentDirectory = StorageFileProvider.DEFAULT_DIRECTORY;
|
private static ScriptFile sCurrentDirectory = StorageFileProvider.DEFAULT_DIRECTORY;
|
||||||
|
|
||||||
|
public MyScriptListFragment(){
|
||||||
|
super(0);
|
||||||
|
}
|
||||||
|
|
||||||
@ViewById(R.id.script_file_list)
|
@ViewById(R.id.script_file_list)
|
||||||
ScriptListView mScriptFileList;
|
ScriptListView mScriptFileList;
|
||||||
|
|
||||||
@@ -145,15 +150,8 @@ public class MyScriptListFragment extends Fragment implements ViewPagerFragment
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUpWithFab(ViewPager pager, FloatingActionButton fab) {
|
protected void onFabClick(FloatingActionButton fab) {
|
||||||
if (fab.getVisibility() != View.VISIBLE) {
|
new NewFileDialogBuilder(getContext())
|
||||||
fab.show();
|
.show();
|
||||||
return;
|
|
||||||
}
|
|
||||||
fab.animate()
|
|
||||||
.rotation(0)
|
|
||||||
.setDuration(300)
|
|
||||||
.setInterpolator(new FastOutSlowInInterpolator())
|
|
||||||
.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import butterknife.OnClick;
|
|||||||
* Created by Stardust on 2017/3/24.
|
* Created by Stardust on 2017/3/24.
|
||||||
*/
|
*/
|
||||||
@EFragment(R.layout.fragment_task_manager)
|
@EFragment(R.layout.fragment_task_manager)
|
||||||
public class TaskManagerFragment extends Fragment implements PopupMenu.OnMenuItemClickListener, ViewPagerFragment {
|
public class TaskManagerFragment extends ViewPagerFragment implements PopupMenu.OnMenuItemClickListener {
|
||||||
|
|
||||||
@ViewById(R.id.task_list)
|
@ViewById(R.id.task_list)
|
||||||
TaskListRecyclerView mTaskListRecyclerView;
|
TaskListRecyclerView mTaskListRecyclerView;
|
||||||
@@ -56,18 +56,9 @@ public class TaskManagerFragment extends Fragment implements PopupMenu.OnMenuIte
|
|||||||
@ViewById(R.id.spinner_current_item)
|
@ViewById(R.id.spinner_current_item)
|
||||||
TextView mSpinnerCurrentItem;
|
TextView mSpinnerCurrentItem;
|
||||||
|
|
||||||
private FloatingActionButton mFab;
|
public TaskManagerFragment() {
|
||||||
|
super(45);
|
||||||
private View.OnClickListener mOnFabClickListener = new View.OnClickListener() {
|
}
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (mLogView.getVisibility() == View.VISIBLE) {
|
|
||||||
Console.clear();
|
|
||||||
} else {
|
|
||||||
AutoJs.getInstance().getScriptEngineService().stopAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
@AfterViews
|
@AfterViews
|
||||||
@@ -140,35 +131,13 @@ public class TaskManagerFragment extends Fragment implements PopupMenu.OnMenuIte
|
|||||||
mSpinnerCurrentItem.setText(R.string.text_task_manage);
|
mSpinnerCurrentItem.setText(R.string.text_task_manage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setUpWithFab(ViewPager pager, final FloatingActionButton fab) {
|
|
||||||
mFab = fab;
|
|
||||||
fab.setOnClickListener(mOnFabClickListener);
|
|
||||||
if (fab.getVisibility() != View.VISIBLE) {
|
|
||||||
fab.show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fab.animate()
|
|
||||||
.rotation(45)
|
|
||||||
.setDuration(300)
|
|
||||||
.setInterpolator(new FastOutSlowInInterpolator())
|
|
||||||
.start();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
protected void onFabClick(FloatingActionButton fab) {
|
||||||
super.onPause();
|
if (mLogView.getVisibility() == View.VISIBLE) {
|
||||||
if (mFab != null) {
|
Console.clear();
|
||||||
mFab.setOnClickListener(null);
|
} else {
|
||||||
}
|
AutoJs.getInstance().getScriptEngineService().stopAll();
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
if (mFab != null) {
|
|
||||||
mFab.setOnClickListener(mOnFabClickListener);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,9 +52,8 @@ public class EWebView extends FrameLayout implements SwipeRefreshLayout.OnRefres
|
|||||||
WebSettings settings = mWebView.getSettings();
|
WebSettings settings = mWebView.getSettings();
|
||||||
settings.setUseWideViewPort(true);
|
settings.setUseWideViewPort(true);
|
||||||
settings.setBuiltInZoomControls(true);
|
settings.setBuiltInZoomControls(true);
|
||||||
settings.setSupportZoom(true);
|
|
||||||
settings.setLoadWithOverviewMode(true);
|
settings.setLoadWithOverviewMode(true);
|
||||||
settings.setJavaScriptEnabled(true);
|
//settings.setJavaScriptEnabled(true);
|
||||||
mWebView.setWebViewClient(new MyWebViewClient());
|
mWebView.setWebViewClient(new MyWebViewClient());
|
||||||
mWebView.setWebChromeClient(new MyWebChromeClient());
|
mWebView.setWebChromeClient(new MyWebChromeClient());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="#5cab7d"
|
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:theme="@style/AppTheme.AppBarOverlay">
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
|
|
||||||
@@ -42,14 +42,13 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<com.stardust.theme.widget.ThemeColorFloatingActionButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_add_white_48dp"
|
android:src="@drawable/ic_add_white_48dp"
|
||||||
app:backgroundTint="#5cab7d"
|
|
||||||
app:layout_anchor="@id/viewpager"
|
app:layout_anchor="@id/viewpager"
|
||||||
app:layout_anchorGravity="bottom|right|end"
|
app:layout_anchorGravity="bottom|right|end"
|
||||||
app:layout_behavior="com.stardust.widget.ScrollAwareFABBehavior"/>
|
app:layout_behavior="com.stardust.widget.ScrollAwareFABBehavior"/>
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:id="@+id/header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="170dp"
|
android:layout_height="170dp"
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp">
|
||||||
android:background="#5cab7d">
|
|
||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
|
|||||||
118
app/src/main/res/layout/new_file_dialog.xml
Normal file
118
app/src/main/res/layout/new_file_dialog.xml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<android.support.design.widget.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<android.support.design.widget.TextInputEditText
|
||||||
|
android:id="@+id/name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/text_name"/>
|
||||||
|
|
||||||
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/options"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/option_new_file"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/air_baseline"
|
||||||
|
android:checked="true"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:text="@string/text_file"
|
||||||
|
android:textSize="16sp"/>
|
||||||
|
|
||||||
|
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||||
|
android:id="@+id/layout_new_file"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
app:ael_expanded="true"
|
||||||
|
app:ael_orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckBox
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:paddingLeft="3dp"
|
||||||
|
android:text="@string/text_auto_mode"/>
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckBox
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="3dp"
|
||||||
|
android:text="@string/text_ui_mode"/>
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatCheckBox
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="3dp"
|
||||||
|
android:text="@string/text_console"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/option_new_dir"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:text="@string/text_directory"
|
||||||
|
android:textSize="16sp"/>
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/option_import"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:text="@string/text_import"
|
||||||
|
android:textSize="16sp"/>
|
||||||
|
|
||||||
|
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||||
|
android:id="@+id/layout_import"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
app:ael_orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/text_choose_file"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#009688</color>
|
<color name="colorPrimary">#009688</color>
|
||||||
<color name="colorPrimaryDark">#00796B</color>
|
<color name="colorPrimaryDark">#009688</color>
|
||||||
<color name="colorAccent">#536DFE</color>
|
<color name="colorAccent">#03a9f4</color>
|
||||||
<color name="sliding_up_panel_shadow_color">#99444444</color>
|
<color name="sliding_up_panel_shadow_color">#99444444</color>
|
||||||
<color name="bubble_bg">#eef2f3f9</color>
|
<color name="bubble_bg">#eef2f3f9</color>
|
||||||
<color name="color_r">#FD999A</color>
|
<color name="color_r">#FD999A</color>
|
||||||
|
|||||||
@@ -236,6 +236,11 @@
|
|||||||
<string name="not_login">未登录</string>
|
<string name="not_login">未登录</string>
|
||||||
<string name="text_volume_down_control">音量下键控制</string>
|
<string name="text_volume_down_control">音量下键控制</string>
|
||||||
<string name="text_others">其他</string>
|
<string name="text_others">其他</string>
|
||||||
|
<string name="text_import">导入...</string>
|
||||||
|
<string name="text_auto_mode">auto模式</string>
|
||||||
|
<string name="text_ui_mode">ui模式</string>
|
||||||
|
<string name="text_new">新建</string>
|
||||||
|
<string name="text_choose_file">选择文件</string>
|
||||||
|
|
||||||
|
|
||||||
<string-array name="record_control_keys">
|
<string-array name="record_control_keys">
|
||||||
|
|||||||
Reference in New Issue
Block a user