I have added support for custom String content (title, message, button texts) at runtime. I designed it in such way that the API is backward compatible. If you are setting content with a String object it has priority over resources id. So, if String attribute is not null, String attribute is used...
This could be implemented also another way, minimizing number of methods and providing cleaner code. DialogOptions constructor should receive Context object, which would enable us to use only methods that return String objects (without resource identifiers), method for setting message text would look something like this:
public String getMessageText() {
if(meesageText != null)
return messageText;
else
return mContext.getString(R.string.rate_dialog_message);
}
I have added support for custom String content (title, message, button texts) at runtime. I designed it in such way that the API is backward compatible. If you are setting content with a String object it has priority over resources id. So, if String attribute is not null, String attribute is used...
This could be implemented also another way, minimizing number of methods and providing cleaner code. DialogOptions constructor should receive Context object, which would enable us to use only methods that return String objects (without resource identifiers), method for setting message text would look something like this: public String getMessageText() { if(meesageText != null) return messageText; else return mContext.getString(R.string.rate_dialog_message); }