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

support close activity #83

Merged
merged 1 commit into from
Aug 12, 2020
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
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.