共 26 篇文章 |
|
Android动画学习笔记。<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="true"> <item android:drawable="@drawable/rocket_thrust1" android:duration="200" /> <item android:drawable="@drawable/rocket_thrust2" android:... 阅42 转0 评0 公众公开 15-11-09 10:34 |
以下是可以使用的通用屏幕尺寸的一些值:1.320,针对以下屏幕配置的设备: 240x320ldpi(QVGA手持设备) 320x480mdpi(手持设备) 480x800hdpi(高分辨率手持设备)2.480,针对480x800mdpi的屏幕(平板或手持设备)3.600,针对600x1024mdip的屏幕(7英寸平板)4.720,针对720x1280mdip的屏幕(10英寸平板)当应用程序提供了多个带有不同值的... 阅134 转0 评0 公众公开 15-11-06 14:45 |
Android开发:shape和selector和layer.<shape>和<selector>在Android UI设计中经常用到。比如我们要自定义一个圆角Button,点击Button有些效果的变化,就要用到<shape>和<selector>。XML中:Android:background="@drawable/文件的名称"属性:<shape> Android:shape=["rectangle" | "o... 阅69 转1 评0 公众公开 15-11-03 10:42 |
Android的selector,背景选择器首先android的selector是在drawable/xxx.xml中配置的,相关图片放在同目录下。相关属性:android:state_selected是选中android:state_focused是获得焦点android:state_pressed是点击android:state_enabled是设置是否响应事件,指所有事件 根据这些状态同样可以设置button的selector效果。 阅49 转0 评0 公众公开 15-10-30 14:15 |
ImageTextButton2 android:id="@+id/bt2" android:layout_marginTop="10dp" android:text="hello" android:textSize="15dp" android:textColor="#000000" android:layout_width="60dp" android:layout_height="70dp" android:background="@drawable/button_bg&quo... 阅27 转0 评0 公众公开 15-10-29 14:12 |
} /* 弹出提示框 */ private void promptDialogTestCase(){ PromptDialogFragment pdf = PromptDialogFragment.newInstance("This is a Prompt Dialog!"); FragmentTransaction ft = getFragmentManager().beginTransaction(); pdf.show(ft, PROMPT_DIALOG_TAG); } /* 此为用户按对话框... 阅1 转自dmw_zgl 公众公开 15-10-23 10:02 |
public abstract View getChildView (int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) 获取一个视图对象,显示指定组中的指定子元素数据。public abstract boolean onChildClick (ExpandableListView parent, View v, int groupPosition, int childPosition, long id)public abstract boole... 阅1 转自dmw_zgl 公众公开 15-10-21 15:59 |
Android的AlertDialog详解[java] package com.tianjf;import android.app.import android.content.import android.os.Dialog alertDialog = new AlertDialog.@Override public void onClick(DialogInterface dialog, int which) { StringBuilder stringBuilder = new StringBuilder(); 阅12 转0 评0 公众公开 15-10-20 14:18 |
Android系统自带样式(android:theme)详解。android:theme="@android:style/Theme.NoTitleBar" :不显示应用程序标题栏。android:theme="@android:style/Theme.NoTitleBar.Fullscreen" :不显示应用程序标题栏,并全屏。android:theme="Theme.Light.NoTitleBar.Fullscreen" :白色背景,无标题栏,全屏。android:th... 阅12 转0 评0 公众公开 15-10-13 09:32 |