Search in sources :

Example 6 with ScriptFile

use of com.stardust.scriptdroid.model.script.ScriptFile in project Auto.js by hyb1996.

the class BuildActivity method setupViews.

@AfterViews
void setupViews() {
    setToolbarAsBack(getString(R.string.text_build_apk));
    String sourcePath = getIntent().getStringExtra(EXTRA_SOURCE_FILE);
    if (sourcePath != null) {
        setupWithSourceFile(new ScriptFile(sourcePath));
    }
    showPluginDownloadDialogIfNeeded();
}
Also used : ScriptFile(com.stardust.scriptdroid.model.script.ScriptFile) AfterViews(org.androidannotations.annotations.AfterViews)

Example 7 with ScriptFile

use of com.stardust.scriptdroid.model.script.ScriptFile 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();
    });
}
Also used : ScriptFile(com.stardust.scriptdroid.model.script.ScriptFile) ScriptListView(com.stardust.scriptdroid.ui.main.scripts.ScriptListView)

Example 8 with ScriptFile

use of com.stardust.scriptdroid.model.script.ScriptFile 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();
    });
}
Also used : ScriptFile(com.stardust.scriptdroid.model.script.ScriptFile) ScriptListView(com.stardust.scriptdroid.ui.main.scripts.ScriptListView)

Aggregations

ScriptFile (com.stardust.scriptdroid.model.script.ScriptFile)8 PFile (com.stardust.pio.PFile)2 ScriptListView (com.stardust.scriptdroid.ui.main.scripts.ScriptListView)2 Context (android.content.Context)1 GradientDrawable (android.graphics.drawable.GradientDrawable)1 Nullable (android.support.annotation.Nullable)1 ResourcesCompat (android.support.v4.content.res.ResourcesCompat)1 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)1 GridLayoutManager (android.support.v7.widget.GridLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 AttributeSet (android.util.AttributeSet)1 LayoutInflater (android.view.LayoutInflater)1 MenuItem (android.view.MenuItem)1 View (android.view.View)1 ViewGroup (android.view.ViewGroup)1 ImageView (android.widget.ImageView)1 PopupMenu (android.widget.PopupMenu)1 TextView (android.widget.TextView)1 BindView (butterknife.BindView)1 ButterKnife (butterknife.ButterKnife)1