Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ Notes Public
forked from Elder-Wu/Notes

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

Notifications You must be signed in to change notification settings

Sforllln/Notes

Repository files navigation

Notes

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

Demo下载地址

扫描二维码下载

###高仿IOS:从底部弹出的Dialog,拓展性比较高

使用方法

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();

###"淘宝头条-京东头条"控件

使用方法

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

使用方法

_布局文件中使用_
<com.example.customview.widget.CountDownView
 android:id="@+id/fragment_count_down"
 android:layout_width="200dp"
 android:layout_height="200dp"
 android:layout_centerInParent="true"
 app:background_color="@color/gray_aaa"
 app:border_color="@color/blue_6eb"
 app:border_width="3dp"
 app:text="跳过广告"
 app:text_color="@color/white"
 app:text_size="55dp" />
_代码中使用_
countDownView.setCountDownTimerListener(new CountDownView.CountDownTimerListener() {
 @Override
 public void onStartCount() {
 ToastUtils.show("开始了");
 }
 @Override
 public void onFinishCount() {
 ToastUtils.show("结束了");
 }
});
countDownView.start();

###点赞头像列表

使用方法

_布局中使用_
<com.example.customview.widget.ApproveListLayout
 android:id="@+id/approve_list_layout"
 android:layout_width="match_parent"
 android:layout_height="50dp"
 app:pic_count="9"
 app:pic_offset="0.3f"
 app:pic_size="20dp"/>
_代码中使用_
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);

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

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

<com.example.notes.widget.DragLayout
 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:background="@color/black_444444"
 android:padding="20dp"
 android:text="我是一个可以拖动的View"
 android:textColor="@color/white" />
 <de.hdodenhof.circleimageview.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.example.notes.widget.CustomClock
 android:layout_width="150dp"
 android:layout_height="150dp"
 android:layout_marginTop="200dp" />
</com.example.notes.widget.DragLayout>

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%

AltStyle によって変換されたページ (->オリジナル) /