Java Code Examples for com.blankj.utilcode.util.ToastUtils

The following examples show how to use com.blankj.utilcode.util.ToastUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: DanDanPlayForAndroid   Source File: LoginParam.java    License: MIT License 6 votes vote down vote up
public void buildHash(Context context) {
    if (StringUtils.isEmpty(userName) ||
            StringUtils.isEmpty(password) ||
            StringUtils.isEmpty(appId) ||
            unixTimestamp == 0){
        LogUtils.e("登录信息错误");
        ToastUtils.showShort("登录信息错误");
    }else {
        String builder = this.appId +
                this.password +
                this.unixTimestamp +
                this.userName +
                SoUtils.getInstance().getDanDanAppSecret();
        hash = EncryptUtils.encryptMD5ToString(builder);
    }
}
 
Example 2
Source Project: YCAudioPlayer   Source File: BaseActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    if (BaseConfig.INSTANCE.isNight()) {
        setTheme(getDarkTheme());
    }
    super.onCreate(savedInstanceState);
    setContentView(getContentView());
    ButterKnife.bind(this);
    //避免切换横竖屏
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    StateAppBar.setStatusBarColor(this,R.color.redTab);
    if (mPresenter != null){
        mPresenter.subscribe();
    }
    initView();
    initListener();
    if(!NetworkUtils.isConnected()){
        ToastUtils.showShort("请检查网络是否连接");
    }
    initData();
}
 
Example 3
Source Project: YCAudioPlayer   Source File: PlayMusicFragment.java    License: Apache License 2.0 6 votes vote down vote up
private void switchPlayMode() {
    int playMode = SPUtils.getInstance(Constant.SP_NAME).getInt(Constant.PLAY_MODE, 0);
    PlayModeEnum mode = PlayModeEnum.valueOf(playMode);
    switch (mode) {
        case LOOP:
            mode = PlayModeEnum.SHUFFLE;
            ToastUtils.showShort(R.string.mode_shuffle);
            break;
        case SHUFFLE:
            mode = PlayModeEnum.SINGLE;
            ToastUtils.showShort(R.string.mode_one);
            break;
        case SINGLE:
            mode = PlayModeEnum.LOOP;
            ToastUtils.showShort(R.string.mode_loop);
            break;
        default:
            break;
    }
    SPUtils.getInstance(Constant.SP_NAME).put(Constant.PLAY_MODE, mode.value());
    initPlayMode();
}
 
Example 4
Source Project: Android-UtilCode   Source File: CleanActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void onWidgetClick(View view) {
    switch (view.getId()) {
        case R.id.btn_clean_internal_cache:
            ToastUtils.showShort("cleanInternalCache" + CleanUtils.cleanInternalCache());
            break;
        case R.id.btn_clean_internal_files:
            ToastUtils.showShort("cleanInternalFiles" + CleanUtils.cleanInternalFiles());
            break;
        case R.id.btn_clean_internal_databases:
            ToastUtils.showShort("cleanInternalDbs" + CleanUtils.cleanInternalDbs());
            break;
        case R.id.btn_clean_internal_sp:
            ToastUtils.showShort("cleanInternalSP" + CleanUtils.cleanInternalSP());
            break;
        case R.id.btn_clean_external_cache:
            ToastUtils.showShort("cleanExternalCache" + CleanUtils.cleanExternalCache());
            break;
    }
}
 
Example 5
Source Project: DanDanPlayForAndroid   Source File: ImagePreviewActivity.java    License: MIT License 6 votes vote down vote up
private void saveBitmap(Bitmap bitmap){
    try {
        //make folder
        File folder = new File(Constants.DefaultConfig.imageFolder);
        if (!folder.exists())
            folder.mkdirs();

        //make file
        File coverFile = new File(folder,  CommonUtils.getCurrentFileName("COV", ".jpg"));
        if (coverFile.exists()) {
            coverFile.delete();
        }
        coverFile.createNewFile();

        //save
        FileOutputStream fos = new FileOutputStream(coverFile);
        bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
        fos.flush();
        fos.close();
        ToastUtils.showLong("保存成功:"+coverFile.getAbsolutePath());
    } catch (IOException e) {
        e.printStackTrace();
        ToastUtils.showShort("保存失败");
    }
}
 
Example 6
Source Project: V2EX   Source File: MainActivity.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onBackPressed() {

    if (drawerLayout.isDrawerOpen(Gravity.START)){
        drawerLayout.closeDrawer(Gravity.START);
    }else{
        if ((System.currentTimeMillis() - mLatestBackPressed) < 1000){
            finish();
            Observable.timer(500, TimeUnit.MILLISECONDS).subscribe(new RxObserver<Long>() {
                @Override
                public void _onNext(Long aLong) {
                    System.exit(0);
                }
            });
        }else{
            mLatestBackPressed = System.currentTimeMillis();
            ToastUtils.showShort("再按一次返回键退出");
        }
    }
}
 
Example 7
Source Project: V2EX   Source File: TopicActivity.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean onFailed(String msg) {

    mSwipeRefreshLayout.setRefreshing(false);
    ToastUtils.showShort(msg);
    if ((null != mErrorMsg) && !mErrorMsg.equals(msg)){
        TextView mTvError = new TextView(TopicActivity.this);
        mTvError.setLayoutParams(new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT, 600));
        mTvError.setTextSize(25);
        mTvError.setTextColor(getColorAccent());
        mTvError.setGravity(Gravity.CENTER);
        mTvError.setText(msg);

        mLlHeader.removeAllViews();
        mLlHeader.addView(mTvError);
        mErrorMsg = msg;
    }
    return true;
}
 
Example 8
Source Project: AndroidSamples   Source File: PictureActivity.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 拍照
 */
private void camera() {

    File file = new File(Config.SAVE_REAL_PATH, System.currentTimeMillis() + ".jpg");
    LogUtils.e(file.getPath());
    if (!file.getParentFile().exists()) {
        file.getParentFile().mkdirs();
    }
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    //Android7.0以上URI
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
        //通过FileProvider创建一个content类型的Uri
        mProviderUri = FileProvider.getUriForFile(this, "com.sdwfqin.sample.fileprovider", file);
        intent.putExtra(MediaStore.EXTRA_OUTPUT, mProviderUri);
        //添加这一句表示对目标应用临时授权该Uri所代表的文件
        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
    } else {
        mUri = Uri.fromFile(file);
        intent.putExtra(MediaStore.EXTRA_OUTPUT, mUri);
    }
    try {
        startActivityForResult(intent, RESULT_CODE_1);
    } catch (ActivityNotFoundException anf) {
        ToastUtils.showShort("摄像头未准备好!");
    }
}
 
Example 9
Source Project: DanDanPlayForAndroid   Source File: SearchPresenterImpl.java    License: MIT License 6 votes vote down vote up
@Override
public void search(String text, int type, int subgroup) {
    MagnetBean.searchMagnet(text, type, subgroup, new CommOtherDataObserver<MagnetBean>(getLifecycle()) {
        @Override
        public void onSuccess(MagnetBean magnetBean) {
            if (magnetBean != null && magnetBean.getResources() != null) {
                getView().refreshSearch(magnetBean.getResources());
            }
        }

        @Override
        public void onError(int errorCode, String message) {
            LogUtils.e(message);
            ToastUtils.showShort(message);
        }
    }, new NetworkConsumer());
}
 
Example 10
Source Project: DanDanPlayForAndroid   Source File: PersonalInfoActivity.java    License: MIT License 6 votes vote down vote up
@Override
public void initListener() {
    screenNameRl.setOnClickListener(this);
    passwordRl.setOnClickListener(this);

    loginOutBt.setOnClickListener(v -> {
        if (AppConfig.getInstance().isLogin()) {
            AppConfig.getInstance().setLogin(false);
            AppConfig.getInstance().saveUserName("");
            AppConfig.getInstance().saveUserScreenName("");
            AppConfig.getInstance().saveUserImage("");
            AppConfig.getInstance().saveToken("");
            EventBus.getDefault().post(UpdateFragmentEvent.updatePersonal());

            launchActivity(LoginActivity.class);
            PersonalInfoActivity.this.finish();
        } else {
            ToastUtils.showShort("请先登录再进行此操作");
        }

    });
}
 
Example 11
Source Project: DanDanPlayForAndroid   Source File: FolderPresenterImpl.java    License: MIT License 6 votes vote down vote up
@Override
public void bindAllZimu(List<VideoBean> videoList, String folderPath) {
    int count = 0;
    String zimuDownloadFolder = AppConfig.getInstance().getDownloadFolder()
            + Constants.DefaultConfig.subtitleFolder;
    for (VideoBean videoBean : videoList){
        String zimuPath = CommonPlayerUtils.getSubtitlePath(videoBean.getVideoPath(), zimuDownloadFolder);
        if (!TextUtils.isEmpty(zimuPath)){
            DataBaseManager.getInstance()
                    .selectTable("file")
                    .update()
                    .param("zimu_path", zimuPath)
                    .where("file_path", videoBean.getVideoPath())
                    .postExecute();
            count++;
        }
    }

    getVideoList(folderPath);
    ToastUtils.showLong("成功,共为"+count+"视频绑定字幕");
}
 
Example 12
Source Project: DanDanPlayForAndroid   Source File: AnimeDetailPresenterImpl.java    License: MIT License 6 votes vote down vote up
@Override
public void getAnimeDetail(String animeId) {
    getView().showLoading();
    AnimeDetailBean.getAnimaDetail(animeId, new CommJsonObserver<AnimeDetailBean>(getLifecycle()) {
        @Override
        public void onSuccess(AnimeDetailBean animeDetailBean) {
            getView().hideLoading();
            getView().showAnimeDetail(animeDetailBean);
        }

        @Override
        public void onError(int errorCode, String message) {
            getView().hideLoading();
            LogUtils.e(message);
            ToastUtils.showShort(message);
        }
    }, new NetworkConsumer());
}
 
Example 13
Source Project: DanDanPlayForAndroid   Source File: ShooterSubActivity.java    License: MIT License 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    if (item.getItemId() == R.id.about_download) {
        new CommonDialog.Builder(ShooterSubActivity.this)
                .setAutoDismiss()
                .setCancelListener(dialog -> {
                    String link = "https://secure.assrt.net/user/logon.xml";
                    ClipboardManager clipboardManagerMagnet = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
                    ClipData mClipDataMagnet = ClipData.newPlainText("Label", link);
                    if (clipboardManagerMagnet != null) {
                        clipboardManagerMagnet.setPrimaryClip(mClipDataMagnet);
                        ToastUtils.showShort("登录链接已复制");
                    }
                })
                .build()
                .show(getResources().getString(R.string.about_download_subtitle), "关于API", "确定", "复制登录链接");
    }
    return super.onOptionsItemSelected(item);
}
 
Example 14
Source Project: SuperNote   Source File: ImagePresenter.java    License: GNU General Public License v3.0 6 votes vote down vote up
private void deleteFile(final Activity activity){
    new AsyncTask<String,Integer,Boolean>(){

        @Override
        protected void onPreExecute() {
            mView.showLoading("删除中...");
        }

        @Override
        protected Boolean doInBackground(String... params) {
            return FileUtils.deleteFile(getImageFile(activity));
        }

        @Override
        protected void onPostExecute(Boolean aBoolean) {
            mView.unShowLoading();
            if(aBoolean){
                mView.setResultAndFinish();
            } else {
                ToastUtils.showShort("删除失败");
            }
        }
    }.execute();
}
 
Example 15
Source Project: DanDanPlayForAndroid   Source File: ChangePasswordPresenterImpl.java    License: MIT License 6 votes vote down vote up
@Override
public void change(ChangePasswordParam param) {
    getView().showLoading();
    PersonalBean.changePassword(param, new CommJsonObserver<CommJsonEntity>(getLifecycle()) {
        @Override
        public void onSuccess(CommJsonEntity commJsonEntity) {
            getView().hideLoading();
            getView().changeSuccess();
        }

        @Override
        public void onError(int errorCode, String message) {
            getView().hideLoading();
            LogUtils.e(message);
            ToastUtils.showShort(message);
        }
    }, new NetworkConsumer());
}
 
Example 16
Source Project: V2EX   Source File: MainActivity.java    License: GNU General Public License v3.0 6 votes vote down vote up
/**
 * 检查每日签到状态
 */
private void checkDailySignIn(){

    UserService.signIn(true, new ResponseListener<Integer>() {
        @Override
        public void onComplete(Integer result) {
            sSignIn = result;
            mAccount.setSign(result);
            if (sSignIn >= 0){
                if (Config.getConfig(ConfigRefEnum.CONFIG_AUTO_CHECK)) signIn();
            }
            updateMenu();
            setUserStatus();
        }
        @Override
        public boolean onFailed(String msg) {
            ToastUtils.showShort(msg);
            return true;
        }
    });
}
 
Example 17
Source Project: SuperNote   Source File: EditNotePresenter.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public void toCamera(Activity activity) {
    try {
        setFile(activity);
        createImageFile();
        Uri imageUri;
        if (Build.VERSION.SDK_INT >= 24) {
            imageUri = FileProvider.getUriForFile(activity, mView.getActivity().getPackageName()+".provider", mImageFile);
        } else {
            imageUri = Uri.fromFile(mImageFile);
        }

        Intent getImageByCamera = new Intent("android.media.action.IMAGE_CAPTURE");
        getImageByCamera.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
        activity.startActivityForResult(getImageByCamera, REQUEST_CODE_TO_CAMERA);
    } catch (Exception e) {
        ToastUtils.showShort("打开相机失败");
    }
}
 
Example 18
Source Project: DanDanPlayForAndroid   Source File: DialogScreenShot.java    License: MIT License 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.dialog_screen_shot);

    shotIv = findViewById(R.id.shot_iv);
    shotCancelBt = findViewById(R.id.shot_cancel_bt);
    shotSaveBt = findViewById(R.id.shot_save_bt);

    shotIv.setImageBitmap(bitmap);

    shotCancelBt.setOnClickListener(v -> DialogScreenShot.this.dismiss());

    shotSaveBt.setOnClickListener(v -> {
        String path = saveImage(bitmap);
        if (path == null) {
            ToastUtils.showShort("保存截图失败");
        } else {
            ToastUtils.showLong("保存成功:" + path);
        }
        DialogScreenShot.this.dismiss();
    });
}
 
Example 19
Source Project: DanDanPlayForAndroid   Source File: CrashDialog.java    License: MIT License 6 votes vote down vote up
@OnClick({R.id.dialog_cancel_iv, R.id.copy_log_tv})
public void onViewClicked(View view) {
    switch (view.getId()) {
        case R.id.dialog_cancel_iv:
            CrashDialog.this.dismiss();
            break;
        case R.id.copy_log_tv:
            ClipboardManager clipboardManagerMagnet = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
            ClipData mClipDataMagnet = ClipData.newPlainText("Label", content);
            if (clipboardManagerMagnet != null) {
                clipboardManagerMagnet.setPrimaryClip(mClipDataMagnet);
                ToastUtils.showShort("已复制错误日志");
            }
            break;
    }
}
 
Example 20
Source Project: DanDanPlayForAndroid   Source File: SmbFilePresenterImpl.java    License: MIT License 6 votes vote down vote up
@Override
public void openFile(List<SmbFileInfo> smbFileInfoList, String fileName) {
    if (!CommonUtils.isMediaFile(fileName)) {
        ToastUtils.showShort("不是可播放的视频文件");
        return;
    }
    if (!ServiceUtils.isServiceRunning(SmbService.class)) {
        ToastUtils.showShort("共享服务未启动,无法播放");
        return;
    }

    //文件Url由开启监听的IP和端口及视频地址组成
    String httpUrl = "http://" + SmbServer.SMB_IP + ":" + SmbServer.SMB_PORT;
    String videoUrl = httpUrl + "/smb/" + fileName;
    SmbServer.SMB_FILE_NAME = fileName;

    //是否自动加载同名字幕
    if (AppConfig.getInstance().isAutoLoadLocalSubtitle()) {
        String zimuName = checkZimuExist(smbFileInfoList, fileName);
        if (zimuName != null) {
            loadSmbSubtitlePlay(videoUrl, zimuName);
            return;
        }
    }
    getView().launchPlayerActivity(videoUrl, "");
}
 
Example 21
Source Project: YCAudioPlayer   Source File: QuitTimer.java    License: Apache License 2.0 5 votes vote down vote up
public void start(long milli) {
    if(mHandler==null){
        ToastUtils.showShort("请先进行初始化");
        return;
    }
    stop();
    if (milli > 0) {
        mTimerRemain = milli + DateUtils.SECOND_IN_MILLIS;
        mHandler.post(mQuitRunnable);
    } else {
        mTimerRemain = 0;
        mTimerCallback.onEvent(mTimerRemain);
    }
}
 
Example 22
Source Project: YCAudioPlayer   Source File: LocalMusicFragment.java    License: Apache License 2.0 5 votes vote down vote up
private void initRecyclerView() {
    recyclerView.setLayoutManager(new LinearLayoutManager(activity));
    adapter = new LocalMusicAdapter(activity);
    recyclerView.setAdapter(adapter);
    recyclerView.setRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            if(NetworkUtils.isConnected()){
                onLazyLoad();
            }else {
                com.pedaily.yc.ycdialoglib.toast.ToastUtils.showRoundRectToast("没有网络");
            }
        }
    });
}
 
Example 23
Source Project: YCAudioPlayer   Source File: LocalMusicFragment.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 设置为铃声
 */
private void requestSetRingtone(AudioBean localMusic) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !Settings.System.canWrite(getContext())) {
        ToastUtils.showShort(R.string.no_permission_setting);
        Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
        intent.setData(Uri.parse("package:" + getContext().getPackageName()));
        startActivityForResult(intent, 0);
    } else {
        setRingtone(localMusic);
    }
}
 
Example 24
Source Project: V2EX   Source File: MainActivity.java    License: GNU General Public License v3.0 5 votes vote down vote up
private void feedBack(){

        DialogUtil.showInputDialog(this,
                getString(R.string.feed_back),
                getString(R.string.summary_feed_back),
                "", value -> {
                    if ((null != value) && value.isEmpty()) return;
                    CrashReport.postCatchedException(new Throwable("Feed back. " + value));
                    ToastUtils.showShort(getString(R.string.thanks));
        });
    }
 
Example 25
Source Project: DanDanPlayForAndroid   Source File: IjkPlayerView.java    License: MIT License 5 votes vote down vote up
/**
 * 切换弹幕资源
 */
@Override
public void changeDanmuSource(String danmuPath) {
    try {
        mDanmakuView.release();
        mDanmakuLoader.load(danmuPath);
        IDataSource<?> dataSource = mDanmakuLoader.getDataSource();
        mDanmakuParser.load(dataSource);
        //装载弹幕
        mDanmakuView.prepare(mDanmakuParser, mDanmakuContext);
    } catch (IllegalDataException e) {
        e.printStackTrace();
        ToastUtils.showShort("弹幕加载失败");
    }
}
 
Example 26
Source Project: YCAudioPlayer   Source File: DetailAudioFragment.java    License: Apache License 2.0 5 votes vote down vote up
private void prev() {
    if (getPlayService() != null) {
        if(getPlayService().isHavePre()){
            ToastUtils.showShort(R.string.state_prev);
            getPlayService().prev();
        }else {
            ToastUtils.showShort("没有上一曲");
        }
    }
}
 
Example 27
Source Project: YCAudioPlayer   Source File: DetailAudioFragment.java    License: Apache License 2.0 5 votes vote down vote up
private void next() {
    if (getPlayService() != null) {
        if(getPlayService().isHaveNext()){
            ToastUtils.showShort(R.string.state_next);
            getPlayService().next();
        }else {
            ToastUtils.showShort("没有下一曲");
        }
    }
}
 
Example 28
Source Project: YCAudioPlayer   Source File: AbsDownloadMusic.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 开始下载
 * @param url                   url
 * @param artist                artist
 * @param title                 title
 * @param coverPath             path
 */
void downloadMusic(String url, String artist, String title, String coverPath) {
    try {
        String fileName = FileMusicUtils.getMp3FileName(artist, title);
        Uri uri = Uri.parse(url);
        DownloadManager.Request request = new DownloadManager.Request(uri);
        request.setTitle(FileMusicUtils.getFileName(artist, title));
        request.setDescription("正在下载…");
        request.setDestinationInExternalPublicDir(FileMusicUtils.getRelativeMusicDir(), fileName);
        request.setMimeType(MimeTypeMap.getFileExtensionFromUrl(url));
        request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_WIFI);
        // 不允许漫游
        request.setAllowedOverRoaming(false);
        DownloadManager downloadManager = (DownloadManager) Utils.getApp().getSystemService(Context.DOWNLOAD_SERVICE);
        long id = 0;
        if (downloadManager != null) {
            id = downloadManager.enqueue(request);
        }
        String musicAbsPath = FileMusicUtils.getMusicDir().concat(fileName);
        DownloadMusicInfo downloadMusicInfo = new DownloadMusicInfo(title, musicAbsPath, coverPath);
        BaseAppHelper.get().getDownloadList().put(id, downloadMusicInfo);
    } catch (Throwable th) {
        th.printStackTrace();
        ToastUtils.showShort("下载失败");
    } finally {

    }
}
 
Example 29
Source Project: V2EX   Source File: TopicFragment.java    License: GNU General Public License v3.0 5 votes vote down vote up
public void onRefresh() {
    if (mIsNeedLogin && !Config.getAccount().isLogin()){
        ToastUtils.showShort(R.string.not_login);
        return;
    }
    topicService.getTopic(mTabType, 1);
}
 
Example 30
Source Project: DanDanPlayForAndroid   Source File: ShooterSubActivity.java    License: MIT License 5 votes vote down vote up
@Override
public void initView() {
    setTitle("射手(伪)字幕下载");

    mSubtitleList = new ArrayList<>();

    subtitleAdapter = new ShooterSubtitleAdapter(R.layout.item_shooter_subtitle, mSubtitleList);
    subtitleAdapter.setOnItemChildClickListener((adapter, view, position) ->
            presenter.querySubtitleDetail(mSubtitleList.get(position).getId()));

    subtitleAdapter.setEnableLoadMore(true);
    subtitleAdapter.setOnLoadMoreListener(() -> {
        mPage += 1;
        if (isApiSecretExist) {
            String text = searchSubtitleEt.getText().toString();
            if (!TextUtils.isEmpty(text)) {
                presenter.searchSubtitle(text, mPage);
            } else {
                ToastUtils.showShort("搜索内容不能为空");
            }
        } else {
            ToastUtils.showShort("请先设置API密钥");
        }
    }, subtitleRv);

    subtitleRv.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
    subtitleRv.setAdapter(subtitleAdapter);

    updateApiSecretStatus();
}