Skip to content

Commit

Permalink
Merge pull request #83 from JeasonWong/master
Browse files Browse the repository at this point in the history
support close activity
  • Loading branch information
JeasonWong authored Aug 12, 2020
2 parents 72f7db2 + 094e77c commit 72d46a3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ At present, UETool provides functionality as follows:

```gradle
dependencies {
debugImplementation 'me.ele:uetool:1.2.8'
releaseImplementation 'me.ele:uetool-no-op:1.2.8'
debugImplementation 'me.ele:uetool:1.2.9'
releaseImplementation 'me.ele:uetool-no-op:1.2.9'
// if you want to show more attrs about Fresco's DraweeView
debugImplementation 'me.ele:uetool-fresco:1.2.8'
debugImplementation 'me.ele:uetool-fresco:1.2.9'
}
```

Expand Down
6 changes: 3 additions & 3 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ UETool 是一个各方人员(设计师、程序员、测试)都可以使用

```gradle
dependencies {
debugImplementation 'me.ele:uetool:1.2.8'
releaseImplementation 'me.ele:uetool-no-op:1.2.8'
debugImplementation 'me.ele:uetool:1.2.9'
releaseImplementation 'me.ele:uetool-no-op:1.2.9'
// if you want to show more attrs about Fresco's DraweeView
debugImplementation 'me.ele:uetool-fresco:1.2.8'
debugImplementation 'me.ele:uetool-fresco:1.2.9'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
'supportLibrary': '27.1.1',
'fresco' : '1.0.1',

'release' : '1.2.8',]
'release' : '1.2.9',]
repositories {
jcenter()
google()
Expand Down
4 changes: 4 additions & 0 deletions uetool/src/main/java/me/ele/uetool/BoardTextView.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;

Expand Down Expand Up @@ -31,6 +33,8 @@ private void initView() {
setTextColor(0xffffffff);
setTextSize(9);
setText(defaultInfo);
setCompoundDrawablesRelativeWithIntrinsicBounds(null, null, ContextCompat.getDrawable(getContext(), R.drawable.uet_close), null);
setCompoundDrawablePadding(DimenUtil.dip2px(2));
}

public void updateInfo(String info) {
Expand Down
7 changes: 7 additions & 0 deletions uetool/src/main/java/me/ele/uetool/TransparentActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ protected void onCreate(Bundle savedInstanceState) {
vContainer = findViewById(R.id.container);

final BoardTextView board = new BoardTextView(this);
board.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
UETool.getInstance().getTargetActivity().finish();
finish();
}
});

type = getIntent().getIntExtra(EXTRA_TYPE, TYPE_UNKNOWN);

Expand Down
Binary file added uetool/src/main/res/drawable-xxhdpi/uet_close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 72d46a3

Please sign in to comment.