Giter Site home page Giter Site logo

notes's Introduction

Notes

Create a repository for myself.Mainly record some of my study notes.

Demo apk下载地址

####扫描二维码下载demo


###全文目录

版权声明:原创作品,每个控件都是自己辛辛苦苦写出来的,如需转载,请注明出处!

高仿ios底部弹窗 高仿京东头条 广告倒计时控件 点赞列表 可以悬浮在屏幕边缘的控件
刮刮卡 广告栏无限循环 美拍点赞效果

高仿IOS底部弹窗(扩展性较高)

返回目录 Demo apk下载 博客原文

  

使用方法

IosBottomDialog.Builder builder = new IosBottomDialog.Builder(context);
//1个标题+2个操作
builder.setTitle("标题",Color.RED)
    .addOption("操作1",Color.DKGRAY,new IosBottomDialog.OnOptionClickListener(){
        @Override
        public void onOptionClick(){
            ToastUtils.show("操作1");
        }
    })
    .addOption("操作2",Color.DKGRAY,new IosBottomDialog.OnOptionClickListener(){
        @Override
        public void onOptionClick(){
            ToastUtils.show("操作2");
        }
    }).create().show();

淘宝头条控件

返回目录 Demo apk下载 博客原文

使用方法

List<HeadlineBean> data = new ArrayList<>();
data.add(new HeadlineBean("热门", "袜子裤子只要998~只要998~"));
data.add(new HeadlineBean("推荐", "秋冬上心,韩流服饰,一折起"));
data.add(new HeadlineBean("好货", "品牌二手车"));
data.add(new HeadlineBean("省钱", "MadCatz MMO7 游戏鼠标键盘套装"));

taobaoHeadline = (TaobaoHeadline) view.findViewById(R.id.fragment_taobao_headline_headline);
taobaoHeadline.setData(data);
taobaoHeadline.setHeadlineClickListener(new TaobaoHeadline.HeadlineClickListener() {
    @Override
    public void onHeadlineClick(HeadlineBean bean) {
        ToastUtils.show(bean.getTitle() + ":" + bean.getContent());
    }

    @Override
    public void onMoreClick() {
        ToastUtils.show("更多");
    }
});

广告倒计时View

返回目录 Demo apk下载 博客原文

使用方法

_布局文件中使用_
<com.wuzhanglao.niubi.widget.CountDownView
    android:id="@+id/fragment_count_down"
    android:layout_width="50dp"
    android:layout_height="50dp"
    android:layout_alignParentRight="true"
    android:layout_margin="5dp"
    app:background_color="@color/gray_aaa"
    app:border_color="@color/blue_6eb"
    app:border_width="2dp"
    app:text="跳过广告"
    app:text_color="@color/white"
    app:text_size="14dp" />

_代码中使用_
countDownView.setCountDownTimerListener(new CountDownView.CountDownTimerListener() {
    @Override
    public void onStartCount() {
        ToastUtils.show("开始了");
    }

    @Override
    public void onFinishCount() {
        ToastUtils.show("结束了");
    }
});
countDownView.start();

点赞列表

返回目录 Demo apk下载 博客原文

使用方法

_布局中使用_
<com.wuzhanglao.niubi.widget.ApproveListLayout
    android:id="@+id/approve_list_layout"
    android:layout_width="match_parent"
    android:layout_height="50dp" />

_代码中使用_
approveList = new ArrayList<>();
approveList.add(R.drawable.demo);
approveList.add(R.drawable.demo);
approveList.add(R.drawable.demo);
approveList.add(R.drawable.demo);
approveList.add(R.drawable.demo);

approveListLayout = (ApproveListLayout) view.findViewById(R.id.approve_list_layout);
approveListLayout.updateApproveList(approveList);

可以悬浮在屏幕边缘的控件

返回目录 Demo apk下载 博客原文

使用方法:直接将DragLayout包裹在你想要悬浮的控件外面就好了,任何控件都阔以

<com.wuzhanglao.niubi.widget.FloatViewLayout
    android:id="@+id/fragment_drag_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:background="@color/black_444444"
        android:padding="20dp"
        android:text="我是一个可以拖动的View"
        android:textColor="@color/white" />
    <com.wuzhanglao.niubi.widget.CircleImageView
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginTop="80dp"
        android:src="#22000000" />
    <ImageView
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_marginTop="140dp"
        android:scaleType="centerCrop"
        android:src="@drawable/demo" />
    <com.wuzhanglao.niubi.widget.CustomClock
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:layout_marginTop="200dp" />
</com.wuzhanglao.niubi.widget.FloatViewLayout>

刮刮卡

返回目录 Demo apk下载 博客原文

使用方法

<com.wuzhanglao.niubi.widget.GuaGuaKa
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

广告栏无限循环

返回目录 Demo apk下载 博客原文

  

使用方法

banner = (Banner) view.findViewById(R.id.fragment_viewpager_imagebanner);
banner.addImage(getImageView(R.drawable.mv1));
banner.addImage(getImageView(R.drawable.mv2));
banner.addImage(getImageView(R.drawable.mv3));
banner.addImage(getImageView(R.drawable.mv4));

private ImageView getImageView(int resId) {
    ImageView image = new ImageView(context);
    image.setImageResource(resId);
    return image;
}

美拍点赞效果

返回目录 Demo apk下载 博客原文

使用方法

<com.wuzhanglao.niubi.widget.BezierView
    android:layout_width="100dp"
    android:layout_height="match_parent"
    android:layout_alignParentRight="true"
    android:layout_marginTop="200dp" />

notes's People

Contributors

elder-wu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.