mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix: update padding and gravity of empty state view's text
This commit is contained in:
@@ -24,6 +24,7 @@ import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
@@ -64,6 +65,7 @@ public class EmptyView extends RelativeLayout {
|
||||
text.setText(getMessage());
|
||||
text.setTextColor(ResourceUtilsKt.resolveAttr(getContext(), R.attr.colorSecondaryVariant));
|
||||
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
|
||||
text.setGravity(Gravity.CENTER);
|
||||
|
||||
LayoutParams params = new LayoutParams(-2, -2);
|
||||
params.addRule(CENTER_IN_PARENT);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/content_padding_double"
|
||||
android:background="?attr/colorSurface"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
||||
|
||||
Reference in New Issue
Block a user