当前位置: 编程技术>移动开发
本页文章导读:
▪圆角 + 框子 + 渐变 Button 圆角 + 边框 + 渐变 Button
在Drawable下创建文件:
bg_alibuybutton_default.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shap.........
▪ 在一个应用程序中其余的应用,比如说网站,App Store等等 在一个应用程序中其他的应用,比如说网站,App Store等等
在一个应用程序中启动其他的服务是用方法: UIApplication:openURL
这里罗列了七种服务可以被启动:
1, Browse
2, Google Maps
3, Apple Mail
4, Pho.........
▪ ES轻便加密数据 ES轻松加密数据
看看这个吧.https://github.com/dev5tec/FBEncryptor
......
[1]圆角 + 框子 + 渐变 Button
来源: 互联网 发布时间: 2014-02-18
圆角 + 边框 + 渐变 Button
在Drawable下创建文件:
bg_alibuybutton_default.xml
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="@color/button_solid_color" /> <corners android:topLeftRadius="5dip" android:topRightRadius="5dip" android:bottomLeftRadius="5dip" android:bottomRightRadius="5dip" /> </shape> </item> <item android:top="1px" android:bottom="1px" android:left="1px" android:right="1px"> <shape> <gradient android:startColor="@color/button_defalut_start_color" android:endColor="@color/button_defalut_end_color" android:type="linear" android:angle="90" android:centerX="0.5" android:centerY="0.5" /> <corners android:topLeftRadius="5dip" android:topRightRadius="5dip" android:bottomLeftRadius="5dip" android:bottomRightRadius="5dip" /> </shape> </item> </layer-list>
bg_alibuybutton_pressed.xml
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="@color/button_solid_color" /> <corners android:topLeftRadius="5dip" android:topRightRadius="5dip" android:bottomLeftRadius="5dip" android:bottomRightRadius="5dip" /> </shape> </item> <item android:top="1px" android:bottom="1px" android:left="1px" android:right="1px"> <shape> <gradient android:startColor="@color/button_pressed_start_color" android:endColor="@color/button_pressed_end_color" android:type="linear" android:angle="90" android:centerX="0.5" android:centerY="0.5" /> <corners android:topLeftRadius="5dip" android:topRightRadius="5dip" android:bottomLeftRadius="5dip" android:bottomRightRadius="5dip" /> </shape> </item> </layer-list>
bg_alibuybutton_selected.xml
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="@color/button_solid_color" /> <corners android:topLeftRadius="5dip" android:topRightRadius="5dip" android:bottomLeftRadius="5dip" android:bottomRightRadius="5dip" /> </shape> </item> <item android:top="1px" android:bottom="1px" android:left="1px" android:right="1px"> <shape> <gradient android:startColor="@color/button_selected_start_color" android:endColor="@color/button_selected_end_color" android:type="linear" android:angle="90" android:centerX="0.5" android:centerY="0.5" /> <corners android:topLeftRadius="5dip" android:topRightRadius="5dip" android:bottomLeftRadius="5dip" android:bottomRightRadius="5dip" /> </shape> </item> </layer-list>
bg_alibuybutton_states.xml
<?xml version="1.0" encoding="UTF-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/bg_alibuybutton_pressed" /> <item android:state_focused="true" android:drawable="@drawable/bg_alibuybutton_selected" /> <item android:drawable="@drawable/bg_alibuybutton_default" /> </selector>
实际使用在Button的BackgroundDrawable引用最后的文件。
[2] 在一个应用程序中其余的应用,比如说网站,App Store等等
来源: 互联网 发布时间: 2014-02-18
在一个应用程序中其他的应用,比如说网站,App Store等等
在一个应用程序中启动其他的服务是用方法: UIApplication:openURL
这里罗列了七种服务可以被启动:
1, Browse
2, Google Maps
3, Apple Mail
4, Phone Call
5, SMS Application
6, App Store
1, Browse
NSURL * url = [ NSURL URLWithString: @ "http://www.iphonedevelopertips.com" ] ; [ [ UIApplication sharedApplication] openURL: url] ;
2, Google Maps
格式:http://maps.google.com/maps?q=${QUERY_STRING}
// Create your query ... NSString * searchQuery = @ "1 Infinite Loop, Cupertino, CA 95014" ; // Be careful to always URL encode things like spaces and other symbols that aren't URL friendly searchQuery = [ addressText stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding] ; // Now create the URL string ... NSString * urlString = [ NSString stringWithFormat: @ "http://maps.google.com/maps?q=%@" , searchQuery] ; // An the final magic ... openURL! [ [ UIApplication sharedApplication] openURL: [ NSURL URLWithString: urlText] ] ;
3, Apple Mail
格式:mailto://${EMAIL_ADDRESS}
[ [ UIApplication sharedApplication] openURL: [ NSURL URLWithString: @ "mailto://info@iphonedevelopertips.com" ] ] ;
4, Phone Call(只是对iPhone)
[ [ UIApplication sharedApplication] openURL: [ NSURL URLWithString: @ "tel://8004664411" ] ] ;
5, SMS Application
[ [ UIApplication sharedApplication] openURL: [ NSURL URLWithString: @ "sms:55555" ] ] ;
6, App Store
[3] ES轻便加密数据
来源: 互联网 发布时间: 2014-02-18
ES轻松加密数据
看看这个吧.https://github.com/dev5tec/FBEncryptor
最新技术文章: