Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple quality improvements #54

Merged
merged 1 commit into from
May 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Multiple quality improvements
  • Loading branch information
Mohamed Ezzat committed Apr 29, 2016
commit c4023943d647ba2c8f842e58ec31b7e2fd12ef9f
4 changes: 4 additions & 0 deletions richeditor/src/main/java/jp/wasabeef/richeditor/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@

public final class Utils {

private Utils() throws InstantiationException {
throw new InstantiationException("This class is not for instantiation");
}

public static String toBase64(Bitmap bitmap) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/java/jp/wasabeef/sample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class MainActivity extends AppCompatActivity {
});

findViewById(R.id.action_txt_color).setOnClickListener(new View.OnClickListener() {
boolean isChanged;
private boolean isChanged;

@Override public void onClick(View v) {
mEditor.setTextColor(isChanged ? Color.BLACK : Color.RED);
Expand All @@ -127,7 +127,7 @@ public class MainActivity extends AppCompatActivity {
});

findViewById(R.id.action_bg_color).setOnClickListener(new View.OnClickListener() {
boolean isChanged;
private boolean isChanged;

@Override public void onClick(View v) {
mEditor.setTextBackgroundColor(isChanged ? Color.TRANSPARENT : Color.YELLOW);
Expand Down