Giter Club home page Giter Club logo

android-kotlin-demo's Introduction

Android-Kolin-Demo

Kotlin 编写的Andrroid 小的 Demo,相信一个个的小知识点,终究会发挥无穷力量!

1、app

这个是默认的,什么也没有


2、Loading

以前我一直在用 ProgressDialog ,没在意 已弃用,今天突发奇想,点进去了,看到类上有这样一段注释:

 * @deprecated <code>ProgressDialog</code> is a modal dialog, which prevents the
 * user from interacting with the app. Instead of using this class, you should
 * use a progress indicator like {@link android.widget.ProgressBar}, which can
 * be embedded in your app's UI. Alternatively, you can use a
 * <a href="/guide/topics/ui/notifiers/notifications.html">notification</a>
 * to inform the user of the task's progress.

我又继续点android.widget.ProgressBar,然后上网搜一下,看到有很多教程,效果也还不错,虽然用ProgressDialog也能达到效果及目的,但有删除线,终归是不好看的,索性就尝试下吧!于是有了这个 Loading

但我想,应该还会有跟多的 Demo 吧!做个系列如何?

闲话少说,Loading正式开始

目录

从目录可以看到 ProgressBar 已经为我们提供了很多很好的功能了,足以满足我们的项目求了吧!

下面来看看模糊进度的示例: 模糊进度

这里值得一说的是,如果 API >= 21 那么支持这种样式,否则为 黑白

下面来看下进度条示例了 进度条

这是一个动画,不能演示效果,遗憾!

当然,我们还能自定义样式: 自定义样式

android-kotlin-demo's People

Contributors

fengwenyi avatar

Watchers

 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.