use of com.stardust.scriptdroid.ui.main.scripts.ScriptListView in project Auto.js by hyb1996.
the class CircularMenu method showScriptList.
@Optional
@OnClick(R.id.script_list)
void showScriptList() {
mWindow.collapse();
ScriptListView listView = new ScriptListView(mContext);
listView.setStorageFileProvider(StorageFileProvider.getDefault());
listView.setDirectorySpanSize(2);
final MaterialDialog dialog = new ThemeColorMaterialDialogBuilder(mContext).title(R.string.text_run_script).customView(listView, false).positiveText(R.string.cancel).build();
listView.setOnItemOperatedListener(file -> dialog.dismiss());
listView.setOnScriptFileClickListener((view, file) -> Scripts.run(file));
DialogUtils.showDialog(dialog);
}
use of com.stardust.scriptdroid.ui.main.scripts.ScriptListView in project Auto.js by hyb1996.
the class TaskPrefEditActivity method initScriptListRecyclerView.
private void initScriptListRecyclerView() {
mStorageFileProvider = StorageFileProvider.getExternalStorageProvider();
ScriptListView scriptList = (ScriptListView) findViewById(R.id.script_list);
scriptList.setStorageFileProvider(mStorageFileProvider, new ScriptFile(StorageFileProvider.DEFAULT_DIRECTORY));
scriptList.setOnScriptFileClickListener((view, file) -> {
mSelectedScriptFilePath = file.getPath();
finish();
});
}
use of com.stardust.scriptdroid.ui.main.scripts.ScriptListView in project Auto.js by hyb1996.
the class ScriptWidgetSettingsActivity method initScriptListRecyclerView.
private void initScriptListRecyclerView() {
mStorageFileProvider = StorageFileProvider.getExternalStorageProvider();
ScriptListView scriptList = (ScriptListView) findViewById(R.id.script_list);
scriptList.setStorageFileProvider(mStorageFileProvider);
scriptList.setCurrentDirectory(new ScriptFile(StorageFileProvider.DEFAULT_DIRECTORY));
scriptList.setOnScriptFileClickListener((view, file) -> {
mSelectedScriptFilePath = file.getPath();
finish();
});
}
Aggregations