我很难搞清楚如何在android中实现更复杂的主题/风格情况.
我已经研究过Android提供的不同的造型/主题教程,但是在我的情况下它们不符合要求.
该(蒸馏)情况如下:我创建了一个应用程序的定制tabwidget,我需要能够以品牌不同风格的应用程序(主题).
该XML的tabwidget(基于http://joshclemm.com/blog/?p=136):
布局/ tabs_bg.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabsLayout" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@drawable/tab_bg_selector"
android:padding="10dip" android:gravity="center" android:orientation="vertical">
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:orientation="horizontal"
android:gravity="center">
<ImageView
android:src="@drawable/star_fav_empty"
android:layout_height="24px"
android:layout_width="24px"
android:id="@+id/tabsImage"
android:paddingRight="5dip"></ImageView>
<TextView
android:id="@+id/tabsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hallowaaaaa"
android:textSize="15dip"
android:textColor="?android:textColorTertiary"/>
</LinearLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
绘制/ tab_bg_selector.xml:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Active tab -->
<item android:state_selected="true" android:state_focused="false"
android:state_pressed="false" android:drawable="@drawable/tab_bg_selected" />
<!-- Inactive tab -->
<item android:state_selected="false" android:state_focused="false"
android:state_pressed="false" android:drawable="@drawable/tab_bg_unselected" />
<!-- Pressed tab -->
<item android:state_pressed="true" android:state_enabled="false" android:drawable="@android:color/transparent" /> …Run Code Online (Sandbox Code Playgroud) 有谁知道正则表达式来验证MSISDN格式的手机号码?
我查看了http://charlvn.blogspot.com/2010/06/msisdn-regular-expressions.html上发布的解决方案,但我认为这不是通用的解决方案.
我正在寻找可以验证任何MSISDN标准手机号码的验证正则表达式. http://en.wikipedia.org/wiki/MSISDN
其次,我正在寻找检查有效MSISDN手机号码是否来自特定国家的方法,例如"31628000000"是来自荷兰的号码,因为它以netnumber"31"开头.
我将在Python中实现验证部分.
提前致谢!
这真让我抓狂!我不能让PayPal快递(Payflow?)api工作....
paypal沙箱告诉我:
测试帐号:AAAA.B_CCCCCCCCCC_biz@XXXXX.com
API用户名:AAAA.B_CCCCCCCCCC_biz_api1.XXXXX.com
API密码:DDDDDDDDDD
签名:ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
在paypayfunctions.php我写道:
$ API_User = "AAAA.B_CCCCCCCCCC_biz@XXXXX.com";
$ API_Password = "DDDDDDDDDD";
$ API_Vendor = "AAAA.B_CCCCCCCCCC_biz@XXXXX.com";
$ API_Partner = "贝宝";
...
当我测试服务时,我得到的是" SetExpressCheckoutDetails API调用失败.错误消息:无效的供应商帐户错误代码:26 "
PayPal文档和示例非常复杂,我想要做的就是有一个简单的按钮链接到paypal,开始支付XXX欧元到账户YYYY ....
谁能帮我?
提前致谢!
我想使用ViewFlow(参见http://viewflow.io/)进行用户注册过程,我要求用户输入密码(以及密码2进行确认).我不想存储普通密码,但我想立即创建用户并分配密码,而不是将该数据存储在Process中.