本文整理汇总了Java中com.afollestad.materialdialogs.MaterialDialog.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java MaterialDialog.setTitle方法的具体用法?Java MaterialDialog.setTitle怎么用?Java MaterialDialog.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.afollestad.materialdialogs.MaterialDialog
的用法示例。
在下文中一共展示了MaterialDialog.setTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSelection
import com.afollestad.materialdialogs.MaterialDialog; //导入方法依赖的package包/类
@Override
public void onSelection(MaterialDialog materialDialog, View view, int i, CharSequence s) {
if (canGoUp && i == 0) {
parentFolder = parentFolder.getParentFile();
if (parentFolder.getAbsolutePath().equals("/storage/emulated"))
parentFolder = parentFolder.getParentFile();
canGoUp = parentFolder.getParent() != null;
} else {
parentFolder = parentContents[canGoUp ? i - 1 : i];
canGoUp = true;
if (parentFolder.getAbsolutePath().equals("/storage/emulated"))
parentFolder = Environment.getExternalStorageDirectory();
}
if (parentFolder.isFile()) {
callback.onFileSelection(this, parentFolder);
dismiss();
} else {
parentContents = listFiles(getBuilder().mimeType, getBuilder().extensions);
MaterialDialog dialog = (MaterialDialog) getDialog();
dialog.setTitle(parentFolder.getAbsolutePath());
getArguments().putString("current_path", parentFolder.getAbsolutePath());
dialog.setItems(getContentsArray());
}
}
示例2: reload
import com.afollestad.materialdialogs.MaterialDialog; //导入方法依赖的package包/类
private void reload() {
parentContents = listFiles();
MaterialDialog dialog = (MaterialDialog) getDialog();
dialog.setTitle(parentFolder.getAbsolutePath());
getArguments().putString("current_path", parentFolder.getAbsolutePath());
dialog.setItems((CharSequence[]) getContentsArray());
}
示例3: reload
import com.afollestad.materialdialogs.MaterialDialog; //导入方法依赖的package包/类
private void reload() {
parentContents = listFiles();
MaterialDialog dialog = (MaterialDialog) getDialog();
dialog.setTitle(parentFolder.getAbsolutePath());
dialog.setItems((CharSequence[]) getContentsArray());
}