Example usage for android.app Fragment getText

List of usage examples for android.app Fragment getText

Introduction

In this page you can find the example usage for android.app Fragment getText.

Prototype

public final CharSequence getText(@StringRes int resId) 

Source Link

Document

Return a localized, styled CharSequence from the application's package's default string table.

Usage

From source file:org.alfresco.mobile.android.platform.intent.BaseActionUtils.java

/**
 * Allow to pick file with other apps./*from w w  w. ja  va2s  . co  m*/
 * 
 * @return Activity for Result.
 */
public static void actionPickFile(Fragment f, int requestCode) {
    Intent i = new Intent(Intent.ACTION_GET_CONTENT);
    i.setType("*/*");
    i.addCategory(Intent.CATEGORY_OPENABLE);
    f.startActivityForResult(Intent.createChooser(i, f.getText(R.string.content_app_pick_file)), requestCode);
}

From source file:org.alfresco.mobile.android.application.manager.ActionManager.java

/**
 * Allow to pick file with other apps.//ww w  .j  a  va2 s .com
 * 
 * @return Activity for Result.
 */
public static void actionPickFile(Fragment f, int requestCode) {
    try {
        Intent i = new Intent(Intent.ACTION_GET_CONTENT);
        i.setType("*/*");
        i.addCategory(Intent.CATEGORY_OPENABLE);
        f.startActivityForResult(Intent.createChooser(i, f.getText(R.string.content_app_pick_file)),
                requestCode);
    } catch (ActivityNotFoundException e) {
        MessengerManager.showToast(f.getActivity(), R.string.error_unable_open_file);
    }
}