MCPcopy Index your code
hub / github.com/80945540/LCRapidDevelop

github.com/80945540/LCRapidDevelop @2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.0 ↗ · + Follow
1,089 symbols 2,534 edges 113 files 244 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RapidDevelop-Android Rapid development framework

  • The framework is continually being updated
  • This framework is from the usual project used in the framework of more integrated from
  • Interested in this project can be like to study a friend welcome star
  • Also welcome your valuable comments
  • If you are interested in MVP mode of development of network crawler and cache strategy can look at my latest writing Freebook
  • API地址
  • E-mail: mychinalance@gmail.com
  • Download APK

中文


Function Description

  • retrofit rxjava okhttp rxcache ------------------------------ Network requests and network caching
  • Demo using MVP mode development ------------------------------------ data logical multiplexing, easy maintenance upgrade
  • Pull-down and pull-up loading and auto-loading --------------------------- Implementation of fast and easy monitoring
  • RecyclerView Adapter ------------------------------------------ No longer required Write ViewHolder
  • RecyclerView item loading animation -------------------------------- A variety of animation effects a line of code to solve
  • page status unified management load no data no network ------------- all pages can be added
  • Picture display and cache GIF picture display
  • Tab + Fragment fast implementation
  • Video playback (imitation QQ space, seconds, etc. List playback)

Renderings show

下拉刷新 动画 多布局 视频播放状态页面


Instructions for use

Import lcrapiddeveloplibrary into the project

In the dependencies of build.gradle add:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
....
compile project(':lcrapiddeveloplibrary')
}

Easy to implement state page drop-down refresh automatically load item animation

First layout.xml inside the preparation of the list of pages are basically the routine


<com.xiaochao.lcrapiddeveloplibrary.viewtype.ProgressActivity
    xmlns:progressActivity="http://schemas.android.com/apk/res-auto"
    android:id="@+id/progress"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        >

        <com.xiaochao.lcrapiddeveloplibrary.widget.SpringView
            android:id="@+id/springview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#FFFFFF"
            >
            <android.support.v7.widget.RecyclerView
                android:id="@+id/rv_list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#eeeeee"/>
        </com.xiaochao.lcrapiddeveloplibrary.widget.SpringView>

    </LinearLayout>
</com.xiaochao.lcrapiddeveloplibrary.viewtype.ProgressActivity>

And then there is the Activity of the preparation of the use of this example to write MVP model interested in the latest I writeFreebook

public class ListvViewActivity extends AppCompatActivity implements BaseQuickAdapter.RequestLoadMoreListener,SpringView.OnFreshListener,SchoolListView {

    RecyclerView mRecyclerView;
    ProgressActivity progress;
    private Toolbar toolbar;
    private BaseQuickAdapter mQuickAdapter;
    private int PageIndex=1;
    private SpringView springView;
    private SchoolListPresent present;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_listv_view);
        initView();
    }


    private void initView() {
        present = new SchoolListPresent(this);
        mRecyclerView = (RecyclerView) findViewById(R.id.rv_list);
        springView = (SpringView) findViewById(R.id.springview);
        //Set the drop-down listener
        springView.setListener(this);
        //Sets the drop-down refresh style
        springView.setHeader(new RotationHeader(this));
        progress = (ProgressActivity) findViewById(R.id.progress);
        mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
        //If the Item height is fixed, increasing this property will increase the efficiency
        mRecyclerView.setHasFixedSize(true);
        //sets adapter
        mQuickAdapter = new ListViewAdapter(R.layout.list_view_item_layout,null);
        //Sets the loading animation
        mQuickAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
        //Set whether to automatically load and load the number
        mQuickAdapter.openLoadMore(6,true);
        //Add the adapter to the RecyclerView
        mRecyclerView.setAdapter(mQuickAdapter);
        //Sets the auto-load listener
        mQuickAdapter.setOnLoadMoreListener(this);
        //Requests network data
        present.LoadData(PageIndex,12,false);
    }
   // Load automatically
    @Override
    public void onLoadMoreRequested() {
        PageIndex++;
        present.LoadData(PageIndex,12,true);
    }
    //Pull down to refresh
    @Override
    public void onRefresh() {
        PageIndex=1;
        present.LoadData(PageIndex,12,false);
    }

    /*
    * MVP mode of the relevant state
    *
    * */
    @Override
    public void showProgress() {
        progress.showLoading();
    }

    @Override
    public void hideProgress() {
        progress.showContent();
    }

    @Override
    public void newDatas(List<UniversityListDto> newsList) {
        // Enter the initial data for the display or pull down to refresh the displayed data
        mQuickAdapter.setNewData(newsList); // Add data
        mQuickAdapter.openLoadMore(10,true);/ / set whether it can load and load the number of pull-down
        springView.onFinishFreshAndLoad();// Refresh done
    }

    @Override
    public void addDatas(List<UniversityListDto> addList) {
        // Add automatically loaded data
        mQuickAdapter.notifyDataChangedAfterLoadMore(addList, true);
    }

    @Override
    public void showLoadFailMsg() {
        // Set the load error page display
        progress.showError(getResources().getDrawable(R.mipmap.monkey_cry), Constant.ERROR_TITLE, Constant.ERROR_CONTEXT, Constant.ERROR_BUTTON, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PageIndex=1;
                present.LoadData(PageIndex,12,false);
            }
        });
    }

    @Override
    public void showLoadCompleteAllData() {
        // Displayed after all data is loaded
        mQuickAdapter.notifyDataChangedAfterLoadMore(false);
        View view = getLayoutInflater().inflate(R.layout.not_loading, (ViewGroup) mRecyclerView.getParent(), false);
        mQuickAdapter.addFooterView(view);
    }

    @Override
    public void showNoData() {
        //Set the no data display page
        progress.showEmpty(getResources().getDrawable(R.mipmap.monkey_cry),Constant.EMPTY_TITLE,Constant.EMPTY_CONTEXT);
    }
}

# Easy to play video list

The list of parts and the above is not the same, I am here to describe the main part of the video player is not know how to clone to the local warehouse side of the run

item_layout.xml

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="5dp"
        android:orientation="vertical">
        <com.xiaochao.lcrapiddeveloplibrary.Video.JCVideoPlayerStandard
            android:id="@+id/video_list_item_playr"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            android:padding="5dp"
            android:gravity="center_vertical">
            <ImageView
                android:id="@+id/video_list_item_image"
                android:layout_width="100dp"
                android:layout_height="70dp"
                android:src="https://github.com/80945540/LCRapidDevelop/raw/2.0/@mipmap/def_head"/>
            <LinearLayout
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="5dp"
                android:layout_marginRight="10dp"
                android:orientation="vertical">
                <TextView
                    android:id="@+id/video_list_item_text_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#66666"
                    android:textSize="15dp"/>
                <TextView
                    android:id="@+id/video_list_item_text_context"
                    android:layout_width="wrap_content"
                    android:layout_marginTop="5dp"
                    android:textColor="#999999"
                    android:textSize="13dp"
                    android:lines="3"
                    android:ellipsize="end"
                    android:layout_height="wrap_content"/>
            </LinearLayout>
        </LinearLayout>

    </LinearLayout>

Then there is the adapter inside the video control assignment

public class VideoLisViewAdapter extends BaseQuickAdapter<VideoListDto> {

    public VideoLisViewAdapter(int layoutResId, List<VideoListDto> data) {
        super(layoutResId, data);
    }

    public VideoLisViewAdapter(List<VideoListDto> data) {
        super(data);
    }

    public VideoLisViewAdapter(View contentView, List<VideoListDto> data) {
        super(contentView, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, VideoListDto item) {
        helper.setText(R.id.video_list_item_text_title,item.getTitle()).setText(R.id.video_list_item_text_context,item.getIntroduction());
        Glide.with(mContext)
                .load(item.getPictureUrl())
                .crossFade()
                .placeholder(R.mipmap.def_head)
                .into((ImageView) helper.getView(R.id.video_list_item_image));
        // Add to the video video playback address (using the original address. Mp4 like this to pay attention) and the title
        ((JCVideoPlayerStandard)helper.getView(R.id.video_list_item_playr)).setUp(item.getAppVideoUrl(),item.getTitle());
        Glide.with(mContext)
                .load(item.getPictureUrl())
                .crossFade()
                .placeholder(R.mipmap.main_mini_m)
                .into((((JCVideoPlayerStandard) helper.getView(R.id.video_list_item_playr)).thumbImageView));
    }
}

Tab + Fragment fast implementation

Or the original recipe layout.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    tools:context="com.xiaochao.lcrapiddevelop.UI.Tab.TabActivity">
    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/AppTheme.PopupOverlay" />
    <FrameLayout
        android:id="@+id/tab"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#fff"
        />
    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
</LinearLayout>

Then is the head of the xml prepared

<com.xiaochao.lcrapiddeveloplibrary.SmartTab.SmartTabLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/viewpagertab"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:background="#FFFFFF"

    app:stl_defaultTabTextColor="@color/custom_tab"
    app:stl_distributeEvenly="true"
    app:stl_defaultTabTextHorizontalPadding="5dp"
    app:stl_indicatorColor="@color/title_bag"
    app:stl_indicatorCornerRadius="0dp"
    app:stl_indicatorInterpolation="smart"
    app:stl_indicatorThickness="3dp"
    app:stl_defaultTabTextSize="13dp"
    app:stl_dividerColor="@color/bag_gray"
    app:stl_dividerThickness="1dp"
    app:stl_overlineColor="@color/bag_gray"
    app:stl_underlineColor="#00000000"
    app:stl_defaultTabBackground="@color/bag_gray_transparent"
    />

Can play according to their own style to play the following table can be set to the property


attr description
stl_indicatorAlwaysInCenter If set to true, active tab is always displayed in center (Like Newsstand google app), default false
stl_indicatorWithoutPadding If set to true, draw the indicator without padding of tab, default false
stl_indicatorInFront Draw the indicator in front of the underline, default false
stl_indicatorInterpolation Behavior of the indicator: 'linear' or 'smart'
stl_indicatorGravity Drawing position of the indicator: 'bottom' or 'top' or 'center', default 'bottom'
stl_indicatorColor Color of the indicator
stl_indicatorColors Multiple colors of the indicator, can set the color for each tab
stl

Extension points exported contracts — how you extend this code

BookListView (Interface)
Created by Administrator on 2016/9/26. [6 implementers]
app/src/main/java/com/xiaochao/lcrapiddevelop/MVP/View/BookListView.java
BaseAnimation (Interface)
https://github.com/CymChad/BaseRecyclerViewAdapterHelper [12 implementers]
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/animation/BaseAnimation.java
VideoListView (Interface)
Created by Administrator on 2016/9/26. [5 implementers]
app/src/main/java/com/xiaochao/lcrapiddevelop/MVP/View/VideoListView.java
OnRecyclerViewItemClickListener (Interface)
(no doc) [5 implementers]
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseQuickAdapter.java
OnLoadDataListListener (Interface)
Created by XY on 2016/9/17. [2 implementers]
app/src/main/java/com/xiaochao/lcrapiddevelop/MVP/Listener/OnLoadDataListListener.java
RequestLoadMoreListener (Interface)
(no doc) [4 implementers]
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseQuickAdapter.java
MovieService (Interface)
API接口 因为使用RxCache作为缓存策略 所以这里不需要写缓存信息
app/src/main/java/com/xiaochao/lcrapiddevelop/Data/APi/MovieService.java
OnFreshListener (Interface)
回调接口 [2 implementers]
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/widget/SpringView.java

Core symbols most depended-on inside this repo

instance
called by 61
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Video/JCMediaManager.java
setText
called by 54
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseViewHolder.java
getContext
called by 46
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Exception/core/Recovery.java
getView
called by 31
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseViewHolder.java
getInstance
called by 21
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Exception/core/Recovery.java
get
called by 20
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/SmartTab/UtilsV4/v4/Bundler.java
setDuration
called by 18
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseQuickAdapter.java
setImageResource
called by 17
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseViewHolder.java

Shape

Method 939
Class 128
Interface 20
Enum 2

Languages

Java100%

Modules by API surface

lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/widget/SpringView.java68 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseQuickAdapter.java59 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Video/JCVideoPlayer.java48 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/SmartTab/UtilsV4/v4/Bundler.java38 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/SmartTab/SmartTabLayout.java38 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Video/JCVideoPlayerStandard.java35 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/BaseViewHolder.java31 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Video/JCMediaManager.java29 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Exception/core/RecoveryActivity.java27 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Exception/tools/SharedPreferencesCompat.java25 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Exception/tools/Reflect.java25 symbols
lcrapiddeveloplibrary/src/main/java/com/xiaochao/lcrapiddeveloplibrary/Exception/core/RecoveryStore.java24 symbols

For agents

$ claude mcp add LCRapidDevelop \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact