2020/1/17

《デート》—RADWIMPS 下载链接
https://github.com/Yalantis/uCrop  一个非常nice 的图片剪裁库
https://www.jianshu.com/p/356619fe64d5 炫酷的控件
https://github.com/ybq/Android-SpinKit/issues  炫酷的加载控件
社畜1/10一个简单的Android studio系统相机项目:https://github.com/srf000001/TestCamera
社畜1/11 Android-Skin-support-Master,一个集成的安卓一键换肤包(还没看懂…)
https://github.com/ximsfei/Android-skin-support 原包
https://github.com/ximsfei/Skin-Demo  一个案例
https://www.jianshu.com/p/572822d9eff9  DataBinding使用方法
社畜 1/13 Android-Pandora
https://github.com/srf000001/pandora-master 转载到个人github
https://github.com/whataa/pandora 源

NavigationView实现侧滑栏

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
    tools:context=".MainActivity">

    <include
        layout="@layout/app_bar_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

<android.support.design.widget.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="left"
    app:headerLayout="@layout/nav_header"
    app:menu="@menu/menu"    />

</android.support.v4.widget.DrawerLayout>

ViewPager+Fragment+TableLayout 实现左右滑动与顶部栏目显示

1.最基础:继承PagerAdapter 然后在MainActivity中 显示。

public class MypagerAdapter extends PagerAdapter {
    private ArrayList<View> viewlists;
    public MypagerAdapter(){

    }
    public MypagerAdapter(ArrayList<View> viewlists){
        super();
        this.viewlists=viewlists;
    }
    @Override
    public int getCount() {
        return viewlists.size();
    }

    @Override
    public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
        return view==o;
    }

    @Override
    public Object instantiateItem(ViewGroup container, int position) {
        container.addView(viewlists.get(position));
        return viewlists.get(position);




    }

    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {

        container.removeView(viewlists.get(position));
    }
}
private ArrayList<View> alist=new ArrayList<View>();
LayoutInflater li=getLayoutInflater();
alist.add(li.inflate(R.layout.view1,null,false));
alist.add(li.inflate(R.layout.view2,null,false));
alist.add(li.inflate(R.layout.view3,null,false));

madapter=new MypagerAdapter(alist);
viewPager.setAdapter(madapter);

Toolbar NavigationIcon正确的使用姿势

//要把Toolbar和Navigationview关联起来

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
drawer = (DrawerLayout)findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
toolbar.setNavigationIcon(R.mipmap.nav_bar_menu);

《愛にできることはまだあるかい》 下载链接 仅作分享,侵权请联系站长。

鬼灭之刃漫画-漫客栈

备忘录:

湘ICP备19020872号-1