Giter Site home page Giter Site logo

androidframework's Introduction

"# androidFrameWork"

功能介绍

整合常用控件,下拉刷新列表,轮播图,图片选择器,图片加载,api加载等 有效减少代码开发量。

  • MimageView支持(支持加载本地,网络图片,支持gif,支持圆形图片,圆形变,模糊,变色,提取颜色)
  • 支持databinding,使用AuotFit类,支持弹出pop,dialog,自动填充列表功能。

MImage test

图片

利用autofit类减少数据和控件的绑定下面是一个监控设备的list的一项 名称为item_device

<?xml version="1.0" encoding="UTF-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <data>

        <variable
            name="F"
            type="com.mdx.framework.autofit.AutoFit" />

        <variable
            name="item"
            type="org.speedbird.dataset.DataDevice.Device" />

        <variable
            name="P"
            type="com.mdx.framework.autofit.commons.AutoParams" />

        <import type="android.view.View" />
    </data>

    <com.mdx.framework.autofit.layout.FitRelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#fff"
        app:loadApi="">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="10dp"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{item.name}"
                android:textColor="@{item.state==1?@color/FA:@color/FB}"
                android:textSize="16sp" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{item.username}"
                android:textColor="@color/FB"
                android:textSize="14sp" />
        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="0.5dp"
            android:layout_marginTop="71.5dp"
            android:background="@color/F" />
    </com.mdx.framework.autofit.layout.FitRelativeLayout>
</layout>

利用autofit进行绑定数据,不需再要写adapter,viewhold

        Fit.listSet(
                R.id.jklist,   //MFRecyclerView的实例或id
                ApisFactory.getApiDevices().set(PhoneUtil.username(), PhoneUtil.token()),   //绑定api,也开源直接给出list/数组的数据,自动将数据绑定在item上
                R.layout.item_device);  //项目的layout

androidframework's People

Contributors

ryanliu19843 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.