将TopViewManager#addView()的默认LayoutParams属性改成了(MATCH_PARENT,WRAP_CONTENT)
This commit is contained in:
@@ -19,16 +19,6 @@ import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
@Route(path = MogoServicePaths.PATH_EXTENSIONS_TOP_VIEW_MANAGER)
|
||||
public class TopViewManager implements IMogoTopViewManager {
|
||||
|
||||
// @Override
|
||||
// public void addTopView(View view, ViewGroup.LayoutParams params) {
|
||||
// TopViewAnimHelper.getInstance().startTopInAnim(view, params);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void removeTopView() {
|
||||
// TopViewAnimHelper.getInstance().startTopOutAnim();
|
||||
// }
|
||||
|
||||
private Context context;
|
||||
private LayoutParams parentParams;
|
||||
@Override
|
||||
@@ -38,14 +28,14 @@ public class TopViewManager implements IMogoTopViewManager {
|
||||
|
||||
@Override
|
||||
public void addView(View view) {
|
||||
addView(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) context.getResources().getDimension(R.dimen.dp_350)),null);
|
||||
addView(view, new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT,
|
||||
LayoutParams.WRAP_CONTENT),null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addView(View view, IMogoTopViewStatusListener statusListener) {
|
||||
addView(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) context.getResources().getDimension(R.dimen.dp_350)),statusListener);
|
||||
addView(view, new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT,
|
||||
LayoutParams.WRAP_CONTENT),statusListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_350"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#ccc">
|
||||
|
||||
<TextView
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv2"
|
||||
android:layout_width="@dimen/dp_150"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
android:layout_width="@dimen/dp_250"
|
||||
android:layout_height="@dimen/dp_250"
|
||||
android:src="@drawable/icon_default_user_head"
|
||||
app:layout_constraintLeft_toRightOf="@+id/iv1"
|
||||
app:layout_constraintRight_toLeftOf="@+id/iv3"
|
||||
|
||||
Reference in New Issue
Block a user