-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
改善emoji输入太多导致卡顿的问题; 修复再次打开评论弹窗崩溃的bug; 修复多次打开评论弹窗莫名自动关闭的bug;细节优化
- Loading branch information
Showing
36 changed files
with
568 additions
and
779 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
app/src/main/java/com/zpj/shouji/market/ui/widget/DialogHeaderLayout.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.zpj.shouji.market.ui.widget; | ||
|
||
import android.content.Context; | ||
import android.content.res.TypedArray; | ||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import android.util.AttributeSet; | ||
import android.view.LayoutInflater; | ||
import android.widget.ImageButton; | ||
import android.widget.LinearLayout; | ||
import android.widget.TextView; | ||
|
||
import com.zpj.shouji.market.R; | ||
|
||
public class DialogHeaderLayout extends LinearLayout { | ||
|
||
private final TextView mTvTitle; | ||
private final ImageButton mBtnClose; | ||
|
||
private CharSequence mTitle; | ||
private OnClickListener mListener; | ||
|
||
public DialogHeaderLayout(@NonNull Context context) { | ||
this(context, null); | ||
} | ||
|
||
public DialogHeaderLayout(@NonNull Context context, @Nullable AttributeSet attrs) { | ||
this(context, attrs, 0); | ||
} | ||
|
||
public DialogHeaderLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { | ||
super(context, attrs, defStyleAttr); | ||
setOrientation(VERTICAL); | ||
LayoutInflater.from(context).inflate(R.layout.layout_dialog_header, this, true); | ||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.DialogHeaderLayout); | ||
mTitle = typedArray.getString(R.styleable.DialogHeaderLayout_dialog_header_title); | ||
typedArray.recycle(); | ||
|
||
|
||
mTvTitle = findViewById(R.id.tv_title); | ||
mTvTitle.setText(mTitle); | ||
mBtnClose = findViewById(R.id.btn_close); | ||
mBtnClose.setOnClickListener(mListener); | ||
} | ||
|
||
public void setTitle(CharSequence title) { | ||
mTitle = title; | ||
if (mTvTitle != null) { | ||
mTvTitle.setText(title); | ||
} | ||
} | ||
|
||
public void setOnCloseClickListener(OnClickListener listener) { | ||
mListener = listener; | ||
if (mBtnClose != null) { | ||
mBtnClose.setOnClickListener(listener); | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.