Skip to content

Commit

Permalink
Add FakeR javadoc (to describe its purpose)
Browse files Browse the repository at this point in the history
  • Loading branch information
Juraj Fulir committed Sep 28, 2017
1 parent e6f55f8 commit 3db2077
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
import android.content.Context;

/**
* R replacement for PhoneGap Build.
* <p>
* ([^.\w])R\.(\w+)\.(\w+)
* $1fakeR("$2", "$3")
*
* @author Maciej Nux Jaros
* Replacement for android resources <b>R</b> in PhoneGap plugins.<br/>
* Used for resources added with a plugin. Since the application has its own <b>R</b> the plugin must fetch its resources through the activity's context.
*/
public class FakeR {
private Context context;
Expand Down Expand Up @@ -55,4 +51,4 @@ public int getId(String key) {
public String getString(String key) {
return context.getResources().getString(getIdFrom("string", key));
}
}
}

0 comments on commit 3db2077

Please sign in to comment.