kandi background
Explore Kits

AndroidAutoLayout | Android屏幕适配方案,直接填写设计图上的像素尺寸即可完成适配,最大限度解决适配问题。

 by   hongyangAndroid Java Version: Current License: Apache-2.0

 by   hongyangAndroid Java Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | AndroidAutoLayout Summary

AndroidAutoLayout is a Java library. AndroidAutoLayout has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.
非常感谢 : 吃土豆的人 的协作。. AndroidAutoSize目前作者一直在维护,私下也有一些交流,也是 AndroidAutoLayout 3年的使用者,自研了AndroidAutoSize, 在目前本库已经没有精力维护的情况下,推荐使用;如果使用了本库,迁移成本也非常低,迁移指南。.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • AndroidAutoLayout has a medium active ecosystem.
  • It has 6726 star(s) with 1941 fork(s). There are 349 watchers for this library.
  • It had no major release in the last 12 months.
  • AndroidAutoLayout has no issues reported. There are 5 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of AndroidAutoLayout is current.
AndroidAutoLayout Support
Best in #Java
Average in #Java
AndroidAutoLayout Support
Best in #Java
Average in #Java

quality kandi Quality

  • AndroidAutoLayout has 0 bugs and 99 code smells.
AndroidAutoLayout Quality
Best in #Java
Average in #Java
AndroidAutoLayout Quality
Best in #Java
Average in #Java

securitySecurity

  • AndroidAutoLayout has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • AndroidAutoLayout code analysis shows 0 unresolved vulnerabilities.
  • There are 3 security hotspots that need review.
AndroidAutoLayout Security
Best in #Java
Average in #Java
AndroidAutoLayout Security
Best in #Java
Average in #Java

license License

  • AndroidAutoLayout is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
AndroidAutoLayout License
Best in #Java
Average in #Java
AndroidAutoLayout License
Best in #Java
Average in #Java

buildReuse

  • AndroidAutoLayout releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • AndroidAutoLayout saves you 1873 person hours of effort in developing the same functionality from scratch.
  • It has 4131 lines of code, 315 functions and 108 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
AndroidAutoLayout Reuse
Best in #Java
Average in #Java
AndroidAutoLayout Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

kandi has reviewed AndroidAutoLayout and discovered the below as its top functions. This is intended to give you an instant insight into AndroidAutoLayout implemented functionality, and help decide if they suit your requirements.

  • get auto layout info from view
  • Get the AutoLayoutInfo from attributes .
  • Called when the view is visible .
  • Returns the screen size .
  • Set the text size
  • Get manifest meta data
  • Returns the minimum height of the given view .
  • set the percentage of view s margin
  • Draws a divider on the canvas .
  • Override this method to handle an action bar selection .

AndroidAutoLayout Key Features

[停止维护]Android屏幕适配方案,直接填写设计图上的像素尺寸即可完成适配,最大限度解决适配问题。

引入

copy iconCopydownload iconDownload
dependencies {
    compile project(':autolayout')
}

第一步:

copy iconCopydownload iconDownload
<meta-data android:name="design_width" android:value="768">
</meta-data>
<meta-data android:name="design_height" android:value="1280">
</meta-data>
    

配置

copy iconCopydownload iconDownload
public class UseDeviceSizeApplication extends Application
{
    @Override
    public void onCreate()
    {
        super.onCreate();
        AutoLayoutConifg.getInstance().useDeviceSize();
    }
}

扩展

copy iconCopydownload iconDownload
package com.zhy.sample.view;

import android.content.Context;
import android.support.v7.widget.CardView;
import android.util.AttributeSet;

import com.zhy.autolayout.AutoFrameLayout;
import com.zhy.autolayout.utils.AutoLayoutHelper;

/**
 * Created by zhy on 15/12/8.
 */
public class AutoCardView extends CardView
{
    private final AutoLayoutHelper mHelper = new AutoLayoutHelper(this);

    public AutoCardView(Context context)
    {
        super(context);
    }

    public AutoCardView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
    }

    public AutoCardView(Context context, AttributeSet attrs, int defStyleAttr)
    {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public AutoFrameLayout.LayoutParams generateLayoutParams(AttributeSet attrs)
    {
        return new AutoFrameLayout.LayoutParams(getContext(), attrs);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
    {
        if (!isInEditMode())
        {
            mHelper.adjustChildren();
        }
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }


}

ListView、RecyclerView类的Item的适配

copy iconCopydownload iconDownload
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
    ViewHolder holder = null;
    if (convertView == null)
    {
        holder = new ViewHolder();
        convertView = LayoutInflater.from(mContext).inflate(R.layout.list_item, parent, false);
        convertView.setTag(holder);
        //对于listview,注意添加这一行,即可在item上使用高度
        AutoUtils.autoSize(convertView);
    } else
    {
        holder = (ViewHolder) convertView.getTag();
    }

    return convertView;
}

Community Discussions

No Community Discussions are available at this moment for AndroidAutoLayout.Refer to stack overflow page for discussions.

No Community Discussions are available at this moment for AndroidAutoLayout.Refer to stack overflow page for discussions.

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install AndroidAutoLayout

You can download it from GitHub.
You can use AndroidAutoLayout like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the AndroidAutoLayout component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.