package com.phlx.wool.ui.sync.activity;

import android.os.Bundle;

import androidx.lifecycle.ViewModelProviders;

import com.phlx.wool.BR;
import com.phlx.wool.R;
import com.phlx.wool.data.VMFactory;
import com.phlx.wool.databinding.ActivityUploadBinding;
import com.phlx.wool.ui.base.BaseActivity;
import com.phlx.wool.ui.sync.vm.UploadVM;


/**
 * <pre>
 *     author : lei
 *     e-mail : 18600395998@163.com
 *     time   : 2020/04/29
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class UploadActivity extends BaseActivity<ActivityUploadBinding, UploadVM> {
    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_upload;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }


    @Override
    public UploadVM initViewModel() {
        VMFactory factory = VMFactory.getInstance(getApplication());
        return ViewModelProviders.of(this, factory).get(UploadVM.class);
    }

    @Override
    public void initData() {
        super.initData();
        setSupportActionBar(binding.include.toolbar);
        viewModel.initToolbar();
    }
}
