

Import lcrapiddeveloplibrary into the project
In the dependencies of build.gradle add:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
....
compile project(':lcrapiddeveloplibrary')
}
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);
}
}
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));
}
}
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 |
$ claude mcp add LCRapidDevelop \
-- python -m otcore.mcp_server <graph>