论坛
门户
内部优惠
喜欢
话题
VIP会员
搜索
新浪微博
登录
注册
100%
100%
首页
>
软件开发
>
Android开发
>
android app首次进入的时候进行提醒操作
回复
« 返回列表
灯火互联
管理员
注册日期
2011-07-27
发帖数
41778
QQ
火币
41290枚
粉丝
1086
关注
100
加关注
写私信
打招呼
阅读:
3679
回复:
0
android app首次进入的时候进行提醒操作
楼主
#
更多
只看楼主
倒序阅读
发布于:2012-10-19 12:32
保存
100%
100%
[]
1
[html]
布局文件。外层用RelativeLayout 最后使用一张图片 并且android:keepScreenOn="true"
[html]
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/mycouponlisttoplayout"
android:background="@color/loginbgcolor"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/loadingmycouponLayout"
android:layout_width="fill_parent"
android:layout_height="30dp"
android:background="@color/loginbgcolor"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:id="@+id/mycouponfootprogress"
style="?android:progressBarStyleSmallInverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@drawable/spinner_small"
android:contentDescription="@string/contentdesption"
android:indeterminateBehavior="repeat" />
<TextView
android:id="@+id/mycouponTipMsg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:padding="3.0px"
android:text="@string/Loading"
android:textColor="#ff000000" />
</LinearLayout>
<com.ejoy.customcontrol.XListView
android:id="@+id/mycouponusalist"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/loginbgcolor"
android:cacheColorHint="#00000000"
android:scrollbars="none" >
</com.ejoy.customcontrol.XListView>
</LinearLayout>
<RelativeLayout
www.at
cpu
.com
android:id="@+id/mycouponlisttoplayout"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/black" >
<TextView
android:id="@+id/txtMyCouponTitle"
style="@style/TopBarTextStyle"
android:text="@string/mycentermyCoupon" />
<Button
android:id="@+id/mycoupondetails_normal_Btnreturn"
style="@style/TopBtnReturnStyle"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
</RelativeLayout>
<ImageView
android:id="@+id/mycouponhelpTip"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:contentDescription="@string/contentdesption"
android:keepScreenOn="true"
android:scaleType="fitXY"
android:src="@drawable/mycoupontip" />
</RelativeLayout>
相关代码
[
java
]
helpImageView = (ImageView) findViewById(R.id.mycouponhelpTip);
SharedPreferences sharedata = getSharedPreferences("fristrun", 0);
Boolean isSoupon = sharedata.getBoolean("isSoupon", true);
if (isSoupon) {
helpImageView.setVisibility(View.VISIBLE);
} else {
helpImageView.setVisibility(View.GONE);
}
helpImageView.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
helpImageView.setVisibility(View.GONE);
Editor sharedata = getSharedPreferences("fristrun", 0).edit();
sharedata.putBoolean("isSoupon", false);
sharedata.commit();
}
});
图片:20121018014312492.png
喜欢
0
评分
0
最新喜欢:
淘宝天猫隐藏优惠券地址
回复
100%
发帖
回复
« 返回列表
普通帖
您需要登录后才可以回帖,
登录
或者
注册
100%
返回顶部
关闭
最新喜欢