Commit 8f3846e7 authored by kenan's avatar kenan

logo

parent 695d5069
package cn.garymb.ygomobile.ui.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class SquareFrameLayout extends FrameLayout {
public SquareFrameLayout(@NonNull Context context) {
super(context);
}
public SquareFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public SquareFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, widthMeasureSpec);
}
}
...@@ -7,18 +7,23 @@ ...@@ -7,18 +7,23 @@
android:background="#38000000" android:background="#38000000"
android:gravity="center"> android:gravity="center">
<FrameLayout <cn.garymb.ygomobile.ui.widget.SquareFrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="400dp" android:layout_height="wrap_content"
android:gravity="center"> android:gravity="center">
<cn.garymb.ygomobile.ui.widget.SquareFrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView <ImageView
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="380dp" android:layout_width="match_parent"
android:layout_height="380dp" android:layout_height="match_parent"
android:padding="10dp"
android:layout_gravity="top|center_horizontal" android:layout_gravity="top|center_horizontal"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/ic_launcher3" /> android:src="@drawable/ic_launcher3" />
</cn.garymb.ygomobile.ui.widget.SquareFrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ly_loading" android:id="@+id/ly_loading"
...@@ -46,5 +51,5 @@ ...@@ -46,5 +51,5 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal" />
</LinearLayout> </LinearLayout>
</FrameLayout> </cn.garymb.ygomobile.ui.widget.SquareFrameLayout>
</LinearLayout> </LinearLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment