• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FileChooserActivity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.ipaulpro.afilechooser.FileChooserActivity的典型用法代码示例。如果您正苦于以下问题:Java FileChooserActivity类的具体用法?Java FileChooserActivity怎么用?Java FileChooserActivity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FileChooserActivity类属于com.ipaulpro.afilechooser包,在下文中一共展示了FileChooserActivity类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: myMethod

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
@OptionsItem(R.id.action_add_file)
void myMethod() {
    // Use the GET_CONTENT intent from the utility class
    Intent target = com.ipaulpro.afilechooser.utils.FileUtils.createGetContentIntent();
    // Create the chooser Intent
    Intent intent = Intent.createChooser(
            target, getString(R.string.Dialog_header__pick_file));
    try {
        startActivityForResult(intent, REQUEST_CODE);
        onPauseDecision.startActivity();
    } catch (ActivityNotFoundException e) {
        intent = new Intent(context, FileChooserActivity.class);
        intent.putStringArrayListExtra(
                FileChooserActivity.EXTRA_FILTER_INCLUDE_EXTENSIONS,
                INCLUDE_EXTENSIONS_LIST);
        intent.putExtra(FileChooserActivity.EXTRA_SELECT_FOLDER, false);
        startActivityForResult(intent, REQUEST_CODE);
        onPauseDecision.startActivity();
    }
}
 
开发者ID:SecrecySupportTeam,项目名称:Secrecy_fDroid_DEPRECIATED,代码行数:21,代码来源:FilesListFragment.java


示例2: preparePreferenceVaultRoot

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
private void preparePreferenceVaultRoot(){
    Preference vault_root = findPreference("vault_root");
    vault_root.setSummary(Storage.getRoot().getAbsolutePath());
    vault_root.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
        @Override
        public boolean onPreferenceClick(Preference preference) {
            choosePath(new getFileListener() {
                @Override
                public void get(File file) {
                    Intent intent = new Intent(context, FileChooserActivity.class);
                    intent.putStringArrayListExtra(
                            FileChooserActivity.EXTRA_FILTER_INCLUDE_EXTENSIONS,
                            INCLUDE_EXTENSIONS_LIST);
                    intent.putExtra(FileChooserActivity.PATH, file.getAbsolutePath());
                    intent.putExtra(FileChooserActivity.EXTRA_SELECT_FOLDER, true);
                    startActivityForResult(intent, REQUEST_CODE_SET_VAULT_ROOT);
                }
            });
            return true;
        }
    });
}
 
开发者ID:SecrecySupportTeam,项目名称:secrecy,代码行数:23,代码来源:SettingsFragment.java


示例3: preparePreferenceVaultMove

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
private void preparePreferenceVaultMove(){
    Preference vault_move = findPreference("vault_move");
    vault_move.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
        @Override
        public boolean onPreferenceClick(Preference preference) {
            choosePath(new getFileListener() {
                @Override
                public void get(File file) {
                    Intent intent = new Intent(context, FileChooserActivity.class);
                    intent.putStringArrayListExtra(
                            FileChooserActivity.EXTRA_FILTER_INCLUDE_EXTENSIONS,
                            INCLUDE_EXTENSIONS_LIST);
                    intent.putExtra(FileChooserActivity.PATH, file.getAbsolutePath());
                    intent.putExtra(FileChooserActivity.EXTRA_SELECT_FOLDER, true);
                    startActivityForResult(intent, REQUEST_CODE_MOVE_VAULT);
                }
            });
            return true;
        }
    });
}
 
开发者ID:SecrecySupportTeam,项目名称:secrecy,代码行数:22,代码来源:SettingsFragment.java


示例4: addFile

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
void addFile() {
    // Use the GET_CONTENT intent from the utility class
    Intent target = com.ipaulpro.afilechooser.utils.FileUtils.createGetContentIntent();
    // Create the chooser Intent
    Intent intent = Intent.createChooser(
            target, getString(R.string.Dialog_header__pick_file));
    try {
        startActivityForResult(intent, REQUEST_CODE);
        FilesActivity.onPauseDecision.startActivity();
    } catch (ActivityNotFoundException e) {
        intent = new Intent(context, FileChooserActivity.class);
        intent.putStringArrayListExtra(
                FileChooserActivity.EXTRA_FILTER_INCLUDE_EXTENSIONS,
                INCLUDE_EXTENSIONS_LIST);
        intent.putExtra(FileChooserActivity.EXTRA_SELECT_FOLDER, false);
        startActivityForResult(intent, REQUEST_CODE);
        FilesActivity.onPauseDecision.startActivity();
    }
}
 
开发者ID:SecrecySupportTeam,项目名称:secrecy,代码行数:20,代码来源:FilesListFragment.java


示例5: onCreate

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_afile_chooser_sample);
    findViewById(R.id.button).setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = new Intent(This(), FileChooserActivity.class);
            // 汎用的なファイル選択を呼び出す場合
            // Intent getContentIntent = FileUtils.createGetContentIntent();
            // getContentIntent.setType("image/*");
            // Intent intent = Intent.createChooser(getContentIntent,
            // "Select Image File.");
            startActivityForResult(intent, FILE_CHOOSE);
        }
    });
}
 
开发者ID:android-opensource-library-56,项目名称:android-opensource-library-56,代码行数:18,代码来源:AFileChooserSampleActivity.java


示例6: onStartAddingAttachments

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
public void onStartAddingAttachments(View view) {
    try {
        Intent intent = new Intent(this, FileChooserActivity.class);
        startActivityForResult(intent, REQUEST_ATTACH_FILE);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(this, getString(R.string.failure_choosing_file), Toast.LENGTH_LONG).show();
    }
}
 
开发者ID:benetech,项目名称:Secure-App-Generator,代码行数:9,代码来源:ManageAttachmentsActivty.java


示例7: onCreate

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Intent intent = new Intent(this, FileChooserActivity.class);

    intent.putStringArrayListExtra(
            FileChooserActivity.EXTRA_FILTER_INCLUDE_EXTENSIONS,
            INCLUDE_EXTENSIONS_LIST);
    intent.putExtra(FileChooserActivity.EXTRA_SELECT_FOLDER, true);
    startActivityForResult(intent, REQUEST_CODE);
}
 
开发者ID:SecrecySupportTeam,项目名称:Secrecy_fDroid_DEPRECIATED,代码行数:13,代码来源:ChooseFolder.java


示例8: restore

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
void restore() {
    ArrayList<String> INCLUDE_EXTENSIONS_LIST = new ArrayList<String>();
    INCLUDE_EXTENSIONS_LIST.add(".zip");

    Intent intent = new Intent(context, FileChooserActivity.class);

    intent.putStringArrayListExtra(
            FileChooserActivity.EXTRA_FILTER_INCLUDE_EXTENSIONS,
            INCLUDE_EXTENSIONS_LIST);
    intent.putExtra(FileChooserActivity.PATH, Storage.getRoot().getAbsolutePath());
    startActivityForResult(intent, REQUESTCODE);
}
 
开发者ID:SecrecySupportTeam,项目名称:secrecy,代码行数:13,代码来源:VaultsListFragment.java


示例9: onClick

import com.ipaulpro.afilechooser.FileChooserActivity; //导入依赖的package包/类
public void onClick(View view) {
	Button clickedBtn = (Button) view;

	switch (clickedBtn.getId()) {
	case R.id.button1:
		// TODO Auto-generated method stub
		// Intent getContentIntent = FileUtils.createGetContentIntent();
		// Intent intent = Intent.createChooser(getContentIntent,
		// "Select a file");
		Intent intent = new Intent(this, FileChooserActivity.class);
		startActivityForResult(intent, REQUEST_CODE);
		break;

	}
}
 
开发者ID:BucketDevelopers,项目名称:AndroidFileBroadcast,代码行数:16,代码来源:File_Download.java



注:本文中的com.ipaulpro.afilechooser.FileChooserActivity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PointerWrapper类代码示例发布时间:2022-05-22
下一篇:
Java StepPartitioningMeta类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap