Skip to content

Commit

Permalink
fix issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
lguipeng committed Dec 6, 2015
1 parent 95595ad commit 06a35ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.lguipeng.notes.mvp.presenters;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.StringRes;

import com.lguipeng.notes.mvp.views.View;

Expand All @@ -24,9 +22,4 @@ public interface Presenter {

void attachView (View v);

default String getString(Context context, @StringRes int string){
if (context != null)
return context.getString(string);
return "";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.preference.Preference;
import android.support.annotation.StringRes;
import android.text.TextUtils;

import com.lguipeng.notes.R;
Expand Down Expand Up @@ -300,4 +301,10 @@ private void notifyChangeTheme(){
EventBus.getDefault().post(event);
view.finishView();
}

private String getString(Context context, @StringRes int string){
if (context != null)
return context.getString(string);
return "";
}
}

0 comments on commit 06a35ce

Please sign in to comment.