屏幕适配1(Android 加强版百分比布局库 为了适配而扩展)

转载请标明出处: 
http://blog.csdn.net/lmj623565791/article/details/46767825; 
本文出自:【张鸿洋的博客】android

这篇博文写得太好了,让我很激动,分享分享!git

详细请前往出处 http://blog.csdn.net/lmj623565791/article/details/46767825 进行学习github

我这里给出我导入时的步骤和使用方法吧!app

导入步骤:学习

一、https://github.com/hongyangAndroid/android-percent-support-extend 下载,解压.net

 

二、在 android stdio 中导入Modelxml

 

 

三、编译,若是出错,就根据出错的提示,把出错的信息屏蔽掉blog

四、使用utf-8

<?xml version="1.0" encoding="utf-8"?>
<com.zhy.android.percent.support.PercentLinearLayout
    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="match_parent"
      >
    <TextView
        android:width="0dp"
        android:height="0dp"
        app:layout_heightPercent="20%"
        app:layout_widthPercent="30%"
        android:text="很好"
        android:background="@android:color/holo_blue_light"
        />
    <TextView
        android:width="0dp"
        android:height="0dp"
        app:layout_heightPercent="80%"
        app:layout_widthPercent="70%"
        android:text="你好啊"
        android:background="@android:color/holo_red_light"
        />
</com.zhy.android.percent.support.PercentLinearLayout>get

相关文章
相关标签/搜索