android.app.Application#getString ( )源码实例Demo

下面列出了android.app.Application#getString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: slf4android   文件: NotifyDeveloperHandler.java
NotifyDeveloperHandler(Application context, Iterable<String> emailAddress, LogLevel minLevel, final ActivityStateListener stateListener) {
    this.context = context;
    this.emailAddress = Lists.newArrayList(emailAddress);
    this.filter = new AtLeastFilter(minLevel);
    this.activityState = new WeakReference<>(stateListener);
    this.attachmentClassList = new ArrayList<>();
    this.shakeDetector = new ShakeDetector(new ShakeDetector.Listener() {
        @Override
        public void hearShake() {
            ActivityStateListener listener = activityState.get();
            if (listener != null) {
                if (listener.isAppInForeground()) {
                    beginPublishOnMainThread(new LogRecord(Level.INFO, "Report a problem with app"));
                } else {
                    Log.i(TAG, "Ignore shake event - the app appears to be in background");
                }
            } else {
                Log.i(TAG, "Ignore shake event - can't detect if app is in foreground (API < 14)");
            }
        }
    });
    this.emailSubject = context.getString(R.string.slf4android_email_subject) + context.getPackageName();
    this.emailBody = context.getString(R.string.slf4android_email_extra_text);
}
 
源代码2 项目: Awesome-WanAndroid   文件: TestActivityTest.java
@Test
public void testApplication() {
    Application application = RuntimeEnvironment.application;
    String appName = application.getString(R.string.app_name);
    Assert.assertEquals("WanAndroid", appName);
}
 
源代码3 项目: Xndroid   文件: DownloadsDatabase.java
@Inject
public DownloadsDatabase(@NonNull Application application) {
    super(application, DATABASE_NAME, null, DATABASE_VERSION);
    DEFAULT_DOWNLOADS_TITLE = application.getString(R.string.untitled);
}
 
源代码4 项目: Xndroid   文件: BookmarkDatabase.java
@Inject
public BookmarkDatabase(@NonNull Application application) {
    super(application, DATABASE_NAME, null, DATABASE_VERSION);
    DEFAULT_BOOKMARK_TITLE = application.getString(R.string.untitled);
}
 
源代码5 项目: Xndroid   文件: GoogleSuggestionsModel.java
public GoogleSuggestionsModel(@NonNull Application application) {
    super(application, ENCODING);
    mSearchSubtitle = application.getString(R.string.suggestion);
}
 
源代码6 项目: Xndroid   文件: BaiduSuggestionsModel.java
public BaiduSuggestionsModel(@NonNull Application application) {
    super(application, ENCODING);
    mSearchSubtitle = application.getString(R.string.suggestion);
}
 
源代码7 项目: Xndroid   文件: DuckSuggestionsModel.java
public DuckSuggestionsModel(@NonNull Application application) {
    super(application, ENCODING);
    mSearchSubtitle = application.getString(R.string.suggestion);
}
 
源代码8 项目: JumpGo   文件: DownloadsDatabase.java
@Inject
public DownloadsDatabase(@NonNull Application application) {
    super(application, DATABASE_NAME, null, DATABASE_VERSION);
    DEFAULT_DOWNLOADS_TITLE = application.getString(R.string.untitled);
}
 
源代码9 项目: JumpGo   文件: BookmarkDatabase.java
@Inject
public BookmarkDatabase(@NonNull Application application) {
    super(application, DATABASE_NAME, null, DATABASE_VERSION);
    DEFAULT_BOOKMARK_TITLE = application.getString(R.string.untitled);
}