kandi background
Explore Kits

MVVMHabit | 基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合OkhttpRxJavaRetrofitGlide等主流模块,满足日常开发需求。使用该框架可以快速开发一个高质量、易维护的Android应用。 | Reactive Programming library

 by   goldze Java Version: 3.1.6 License: Apache-2.0

 by   goldze Java Version: 3.1.6 License: Apache-2.0

Download this library from

kandi X-RAY | MVVMHabit Summary

MVVMHabit is a Java library typically used in Programming Style, Reactive Programming applications. MVVMHabit 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.
👕基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合Okhttp+RxJava+Retrofit+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发一个高质量、易维护的Android应用。
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • MVVMHabit has a medium active ecosystem.
  • It has 6436 star(s) with 1450 fork(s). There are 174 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 8 open issues and 75 have been closed. On average issues are closed in 26 days. There are 4 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of MVVMHabit is 3.1.6
MVVMHabit Support
Best in #Reactive Programming
Average in #Reactive Programming
MVVMHabit Support
Best in #Reactive Programming
Average in #Reactive Programming

quality kandi Quality

  • MVVMHabit has 0 bugs and 0 code smells.
MVVMHabit Quality
Best in #Reactive Programming
Average in #Reactive Programming
MVVMHabit Quality
Best in #Reactive Programming
Average in #Reactive Programming

securitySecurity

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

license License

  • MVVMHabit 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.
MVVMHabit License
Best in #Reactive Programming
Average in #Reactive Programming
MVVMHabit License
Best in #Reactive Programming
Average in #Reactive Programming

buildReuse

  • MVVMHabit releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
MVVMHabit Reuse
Best in #Reactive Programming
Average in #Reactive Programming
MVVMHabit Reuse
Best in #Reactive Programming
Average in #Reactive Programming
Top functions reviewed by kandi - BETA

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

  • print to log
  • Intercept the request .
  • Launch the scavenger .
  • Parse exception .
  • Checks if the input string is a valid ID card format .
  • Dialog with a custom view .
  • Request network .
  • register UI change events
  • Sets application .
  • Sends a download file

MVVMHabit Key Features

👕基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合Okhttp+RxJava+Retrofit+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发一个高质量、易维护的Android应用。

1.1、启用databinding

copy iconCopydownload iconDownload
dataBinding {
    enabled true
}

1.2、依赖Library

copy iconCopydownload iconDownload
allprojects {
    repositories {
		...
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

1.3、配置config.gradle

copy iconCopydownload iconDownload
apply from: "config.gradle"

1.4、配置AndroidManifest

copy iconCopydownload iconDownload
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

2.1、第一个Activity

copy iconCopydownload iconDownload
<layout>
    <data>
        <variable
            type="com.goldze.mvvmhabit.ui.login.LoginViewModel"
            name="viewModel"
        />
    </data>
    .....

</layout>

2.2、数据绑定

copy iconCopydownload iconDownload
//用户名的绑定
public ObservableField<String> userName = new ObservableField<>("");

2.3、网络请求

copy iconCopydownload iconDownload
api "com.squareup.okhttp3:okhttp:3.10.0"
api "com.squareup.retrofit2:retrofit:2.4.0"
api "com.squareup.retrofit2:converter-gson:2.4.0"
api "com.squareup.retrofit2:adapter-rxjava2:2.4.0"

3.1、事件总线

copy iconCopydownload iconDownload
//订阅者
private Disposable mSubscription;
//注册RxBus
@Override
public void registerRxBus() {
    super.registerRxBus();
    mSubscription = RxBus.getDefault().toObservable(String.class)
        .subscribe(new Consumer<String>() {
            @Override
            public void accept(String s) throws Exception {

            }
        });
    //将订阅者加入管理站
    RxSubscriptions.add(mSubscription);
}

//移除RxBus
@Override
public void removeRxBus() {
    super.removeRxBus();
    //将订阅者从管理站中移除
    RxSubscriptions.remove(mSubscription);
}

3.2、文件下载

copy iconCopydownload iconDownload
String loadUrl = "你的文件下载路径";
String destFileDir = context.getCacheDir().getPath();  //文件存放的路径
String destFileName = System.currentTimeMillis() + ".apk";//文件存放的名称
DownLoadManager.getInstance().load(loadUrl, new ProgressCallBack<ResponseBody>(destFileDir, destFileName) {
    @Override
    public void onStart() {
        //RxJava的onStart()
    }

    @Override
    public void onCompleted() {
        //RxJava的onCompleted()
    }

    @Override
    public void onSuccess(ResponseBody responseBody) {
        //下载成功的回调
    }

    @Override
    public void progress(final long progress, final long total) {
        //下载中的回调 progress:当前进度 ,total:文件总大小
    }

    @Override
    public void onError(Throwable e) {
        //下载错误回调
    }
});

3.3、ContainerActivity

copy iconCopydownload iconDownload
startContainerActivity(你的Fragment类名.class.getCanonicalName())

3.4、6.0权限申请

copy iconCopydownload iconDownload
//请求打开相机权限
RxPermissions rxPermissions = new RxPermissions((Activity) context);
rxPermissions.request(Manifest.permission.CAMERA)
    .subscribe(new Consumer<Boolean>() {
        @Override
        public void accept(Boolean aBoolean) throws Exception {
            if (aBoolean) {
                ToastUtils.showShort("权限已经打开,直接跳入相机");
            } else {
                ToastUtils.showShort("权限被拒绝");
            }
        }
    });

3.5、图片压缩

copy iconCopydownload iconDownload
String filePath = "mnt/sdcard/1.png";
ImageUtils.compressWithRx(filePath, new Consumer<File>() {
    @Override
    public void accept(File file) throws Exception {
        //将文件放入RequestBody
        ...
    }
});

License

copy iconCopydownload iconDownload
Copyright 2017 goldze(曾宪泽)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Cannot find symbol class ActivityEngageBindingImpl

copy iconCopydownload iconDownload
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:2.2.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:2.2.0'
-----------------------
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:2.2.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:2.2.0'

Community Discussions

Trending Discussions on MVVMHabit
  • Cannot find symbol class ActivityEngageBindingImpl
Trending Discussions on MVVMHabit

QUESTION

Cannot find symbol class ActivityEngageBindingImpl

Asked 2022-Feb-08 at 17:57

I'm using rxjava2 + mvvvmhabit library. How to fix this issue?

Cannot find symbol class ActivityEngageBindingImpl
[databinding] {"msg":"Cannot resolve type \u0027LayoutManagers\u0027",
"file":"app/src/main/res/layout/activity_engage.xml",
"pos":[{"line0":34,"col0":37,"line1":34,"col1":50}]}

My activity_engage.xml file

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    xmlns:binding="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>
        <import type="me.tatarka.bindingcollectionadapter2.LayoutManagers" />
        <import type="me.goldze.mvvmhabit.binding.viewadapter.recyclerview.LineManagers" />
        <variable
            name="viewModel"
            type="com.founicy.analy.ui.activity.engage.EngageViewModel" />

    </data>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/tb_engage"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorBackground"
            android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
            app:titleTextAppearance="@style/CustomToolbar" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_engage_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@+id/tb_engage"
            binding:itemBinding="@{viewModel.itemBinding}"
            binding:items="@{viewModel.observableList}"
            binding:layoutManager="@{LayoutManagers.linear()}"
            binding:lineManager="@{LineManagers.horizontal()}"
            android:scrollbarSize="3dp"
            android:scrollbarThumbVertical="@drawable/scroll_bar_color"
            android:scrollbars="vertical" />

        <LinearLayout
            android:id="@+id/ll_empty_engage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:orientation="vertical"
            android:visibility="@{viewModel.llEmptyEngageVisible}">

            <ImageView
                android:layout_width="56dp"
                android:layout_height="56dp"
                android:src="@drawable/ic_data_empty" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/date_empty"
                android:textColor="@color/textGrey"
                android:textSize="@dimen/engage_card_text" />
        </LinearLayout>

        <ProgressBar
            android:id="@+id/pb_engage"
            style="@style/Widget.AppCompat.ProgressBar.Horizontal"
            android:layout_width="match_parent"
            android:layout_height="3dp"
            android:layout_alignParentTop="true"
            android:visibility="gone" />
    </RelativeLayout>
</layout>

ANSWER

Answered 2022-Feb-08 at 17:57

Please use the previous version of library. You should remove 4.0.0 and use 2.2.0

implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:4.0.0'

Use 2.2.0 version

implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:2.2.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:2.2.0'

Source https://stackoverflow.com/questions/71023258

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

Vulnerabilities

No vulnerabilities reported

Install MVVMHabit

You can download it from GitHub.
You can use MVVMHabit 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 MVVMHabit 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
Consider Popular Reactive Programming Libraries
Compare Reactive Programming Libraries with Highest Support
Compare Reactive Programming Libraries with Highest Quality
Compare Reactive Programming Libraries with Highest Security
Compare Reactive Programming Libraries with Permissive License
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.