Skip to content

Commit

Permalink
release v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mthli committed Dec 24, 2015
1 parent 139891f commit b52c455
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ Here has a [demo apk](https://github.com/mthli/Knife/releases/download/v1.0/Knif

- `undo()` when text change, you can also undo it!

- `fromHtml()` import from HTML file.

- `toHtml()` export as HTML file.

If you want to get more control of the editable text, just extend KnifeText to get all protected method.

#### Custom

- `app:bulletColor`

- `app:bulletRadius`

- `app:bulletGapWidth`

Expand All @@ -62,8 +68,6 @@ If you want to get more control of the editable text, just extend KnifeText to g
#### TODO

- Insert image.

- Export as HTML file.

## Gradle

Expand All @@ -77,7 +81,7 @@ At your top-level `build.gradle` file:
And then at your project `build.gradle` file:

dependencies {
compile 'com.github.mthli:Knife:v1.0'
compile 'com.github.mthli:Knife:v1.1'
}

Done!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;

import io.github.mthli.knife.KnifeParser;
import io.github.mthli.knife.KnifeText;

public class MainActivity extends Activity {
Expand Down Expand Up @@ -190,10 +188,7 @@ private void setupClear() {
clear.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// knife.clearFormats();
Log.e("position", "-> " + knife.getSelectionStart());
Log.e("length", "-> " + knife.getText().length());
Log.e("parser", "-> " + KnifeParser.toHtml(knife.getText()));
knife.clearFormats();
}
});

Expand Down

0 comments on commit b52c455

Please sign in to comment.