一:Notification 1.NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); 2. notification.setLatestEventInfo(this, "国安部给你发短信!", "你被通辑啦~~~", contentIntent); 2.1: PendingIntent contentIntent = PendingIntent.…
有的时候我们一个页面要用很多个textview,而且这些textview的样式非常相像,这种情况下我们可以把这些样式抽取出来,然后在每个textview中引用即可,这样修改起来也方便. 我们来看一个简单的例子,在一个页面中有三个textview,每个textview显示内容不同但是样式都相像,先来看看显示效果: 布局文件: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:…
一.Attr 属性,风格样式的最小单元: Attr 的定义 在自定义 View 的时候,在 res/attrs.xml 文件中声明属性,而Android 系统的属性也是以同样的方式定义的.比如 layout_width 属性对应到框架中的 attr 如下: <declare-styleable name="ViewGroup_Layout"> <attr name="layout_width" format="dimension"…
Android的styles资源文件中存在了我们在应用中定义的各种style,它们都是以style开始的元素,包含许多属性的集合.但我们一般般它们分为style和theme,那它们有什么区别呢? 一.Style or Theme what   theme是一种特殊的style,我们通常认为style是运用在一个view或者window上,而theme是运用在activity或者application上的.style在布局文件中通过style=@style/[style name]引入,注意这里没…
android中控件,假如我们把样式都写死在控件的配置文件上的话.一旦改动可谓牵一发而动千军.那么我们能够把样式写在style.xml文件里.然后引用,在API14以上版本号. 该文件位于values-v14目录下.低版本号的在values目录下. 比方,我们以一个textView为例,先在style.xml文件里定义好自己的样式: <resources> <!-- Base application theme for API 14+. This theme completely rep…
简单练习自定义样式和主题,样式是加在View上,主题是加在Application或者Activity上 styles.xml <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- 自定义样式 --> <style name=&quo…
今天来和大家分享一下android中UI设计里面常会用到的style和theme. 首先,style和theme都是资源,android提供了很多这样的默认资源.你可以来使用它们.同时你也可以自己定义style和theme.这非常的简单,只需要在res/values/这个路径里面新建一个.xml文件,而且他的根节点必须是<resources>.对每一个style和theme,给<style>element增加一个全局唯一的名字,也可以选择增加一个父类属性,我们写的style和the…
https://forum.ionicframework.com/t/actionsheets-android-ugly-styling-need-help/18462/10 想要修改ionic的样式, 记得修改sass文件, 不然一个build就还原了.…
应用场景: 在App开发中,对于信息的获取与演示.不可能所有将其获取与演示,为了在用户使用中,给予用户以友好.方便的用户体验,以滑动.下拉的效果动态载入数据的要求就会出现. 为此.该效果功能就须要应用到所须要的展示页面中. 知识点介绍: 本文主要依据开源项目android-pulltorefresh展开介绍. android-pulltorefresh  [一个强大的拉动刷新开源项目,支持各种控件下拉刷新 ListView.ViewPager.WevView.ExpandableListView…
1.对话框 package com.itheima.dialog; import android.os.Bundle; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.ProgressDialog; import android.content.DialogInterface; import android…