利用Drawable资源 定制改变外观的Seekbar
来源:互联网 发布:在线域名批量查询 编辑:程序博客网 时间:2024/06/08 08:42
package com.test.layerdrawable;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); }}
布局文件
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="com.test.layerdrawable.MainActivity"> <SeekBar android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:max="100" android:progressDrawable="@drawable/my_bar" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/layout_logo" /></LinearLayout>
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!--定义轨道背景色--> <item android:id="@android:id/background" android:drawable="@drawable/grow" /> <!--定义轨道上已完成的外观--> <item android:id="@android:id/progress" android:drawable="@drawable/ok" /></layer-list>
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <bitmap android:gravity="center" android:src="@drawable/ic_launcher" /> </item> <item android:top="25dp" android:left="25dp" > <bitmap android:src="@drawable/ic_launcher" android:gravity="center" /> </item> <item android:top="50dp" android:left="50dp" > <bitmap android:src="@drawable/ic_launcher" android:gravity="center" /> </item></layer-list>
0 0
- 利用Drawable资源 定制改变外观的Seekbar
- 利用LayerDrawable一次加载多张图片和改变SeekBar的外观
- Android 使用LayerDrawable自定制SeekBar的外观
- 自定义SeekBar的外观
- 定制DataGrid的外观
- 定制DataGrid的外观
- 控制台程序的外观定制
- Lesson9: 定制应用程序的外观
- Lesson9: 定制应用程序的外观
- android的Drawable资源
- android修改控件外观(使用drawable资源)
- 改变WEBBROWSER的外观问题
- 改变滚动条的外观
- QtWidget: 改变应用程序的外观
- 定义xml为drawable文件并根据状态改变显示的图片资源
- 利用Span实现TextView/EditText的灵活表现--改变字体外观,添加点击,超链接
- android Seekbar改变thumb图片的位置
- android seekBar改变样式-非圆角的实现
- 关键词权重计算算法 - TF-IDF
- 虚拟现实-VR-UE4-认识UE4
- SLF4J日志类库
- [剑指Offer] 第4章课后题详解
- system表空间用满解决办法
- 利用Drawable资源 定制改变外观的Seekbar
- hive 窗口函数 应用场景与实战详解
- 为Elasticsearch添加中文分词,对比分词器效果
- GitHub上README.md使用指南
- 小试文件(2)
- 用CSS样式制作导航菜单
- 手把手教你使用Git
- 4------关于在Cocos2dx中注册触摸事件——Lua(单点触摸)
- 《一个操作系统的实现》error: mount 您必须指定文件系统的类型