提交 8a99c6ca 编写于 作者: J JessYan

Demo used AndroidAutoSize

上级 ecd9c435
......@@ -80,7 +80,7 @@ dependencies {
//现在已经将 Demo 中的屏幕适配框架从 AndroidAutoLayout 替换为 AndroidAutoSize, AndroidAutoLayout 和 AndroidAutoSize 可以在项目中共存
//所以旧项目只要依赖 arms-autolayout 即可兼容之前的旧页面, 新页面使用 AndroidAutoSize 进行适配即可
// implementation rootProject.ext.dependencies["autosize"]
implementation rootProject.ext.dependencies["autosize"]
//Arms 核心库不再包含 Glide, 想使用其他图片加载框架或者想自行扩展 ImageLoaderStrategy 就不要依赖 arms-imageloader-glide
//依赖 arms-imageloader-glide 后还需要在 GlobalConfiguration 中手动注册 GlideImageLoaderStrategy
......
......@@ -25,7 +25,18 @@
</intent-filter>
</activity>
<!-- arms配置 -->
<!-- 只要依赖 AutoSize 就必须填写设计图尺寸, 否则报错, 不想使用 AutoSize 就不要依赖 AutoSize
只要填写完设计图的尺寸, AutoSize 就会自动启动, 以下 dp 尺寸是根据公式 px / (dpi / 160) 求出, 运算时使用测试机的 dpi 即可
AutoSize 的详细介绍请看这里 https://juejin.im/post/5bce688e6fb9a05cf715d1c2
-->
<meta-data
android:name="design_width_in_dp"
android:value="360"/>
<meta-data
android:name="design_height_in_dp"
android:value="640"/>
<!-- Arms 配置 -->
<meta-data
android:name="me.jessyan.mvparms.demo.app.GlobalConfiguration"
android:value="ConfigModule"/>
......
......@@ -13,8 +13,8 @@
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="15px"
android:paddingTop="15px"
android:paddingLeft="4dp"
android:paddingTop="4dp"
>
<android.support.v7.widget.RecyclerView
......
......@@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="120px"
android:layout_height="50dp"
android:background="?attr/colorPrimary"
app:contentInsetStart="0dp"
>
......@@ -21,8 +21,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="30px"
android:layout_marginRight="30px"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:src="@mipmap/ic_arrow_back_white_24dp"/>
</RelativeLayout>
......@@ -34,4 +34,5 @@
android:textColor="@color/white"
android:textSize="18sp"
tools:text="@string/app_name"/>
</android.support.v7.widget.Toolbar>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="550px"
android:layout_marginRight="15px"
android:layout_marginBottom="15px"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="174dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="4dp"
>
<ImageView
......@@ -12,7 +12,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:src="#000000" />
tools:src="#000000"/>
<TextView
......@@ -20,9 +20,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="10px"
android:layout_marginBottom="3dp"
android:textColor="@color/white"
android:textSize="18sp"
tools:text="ss" />
tools:text="ss"/>
</android.support.v7.widget.CardView>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册