Skip to content

Commit

Permalink
新增点赞提醒,优化排行榜界面
Browse files Browse the repository at this point in the history
  • Loading branch information
csuyzb committed Sep 3, 2014
1 parent 94b1265 commit b99fe06
Show file tree
Hide file tree
Showing 27 changed files with 363 additions and 150 deletions.
90 changes: 46 additions & 44 deletions Linkup/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
android:minSdkVersion="14"
android:targetSdkVersion="19" />

<permission
android:name="com.znv.linkup.permission.MIPUSH_RECEIVE"
android:protectionLevel="signatureOrSystem" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand All @@ -19,8 +23,10 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.xiaomi.market.sdk.UPDATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="com.znv.linkup.permission.MIPUSH_RECEIVE" />

<application
android:name="com.znv.linkup.MyApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
Expand Down Expand Up @@ -118,52 +124,48 @@
</intent-filter>
</receiver>
<!-- 小米sdk end -->

<!-- 小米推送 begin -->
<service
android:name="com.xiaomi.push.service.XMPushService"
android:enabled="true"
android:process=":pushservice" />
<service
android:name="com.xiaomi.mipush.sdk.PushMessageHandler"
android:enabled="true"
android:exported="true" />
<service android:enabled="true"
android:name="com.xiaomi.mipush.sdk.MessageHandleService" />

<receiver
android:name="com.znv.linkup.push.MessageReceiver"
android:exported="true" >
<intent-filter>
<action android:name="com.xiaomi.mipush.RECEIVE_MESSAGE" />
</intent-filter>
<intent-filter>
<action android:name="com.xiaomi.mipush.ERROR" />
</intent-filter>
</receiver>
<receiver
android:name="com.xiaomi.push.service.receivers.NetworkStatusReceiver"
android:exported="true" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<receiver
android:name="com.xiaomi.push.service.receivers.PingReceiver"
android:exported="false"
android:process=":pushservice" >
<intent-filter>
<action android:name="com.xiaomi.push.PING_TIMER" />
</intent-filter>
</receiver>
<!-- 小米推送 end -->

<!-- For Baidu push -->
<!-- <receiver android:name="com.znv.linkup.push.LinkupPushReceiver" > -->
<!-- <intent-filter> -->
<!-- <action android:name="com.baidu.android.pushservice.action.MESSAGE" /> -->
<!-- <action android:name="com.baidu.android.pushservice.action.RECEIVE" /> -->
<!-- <action android:name="com.baidu.android.pushservice.action.notification.CLICK" /> -->
<!-- </intent-filter> -->
<!-- </receiver> -->
<!-- <receiver -->
<!-- android:name="com.baidu.android.pushservice.PushServiceReceiver" -->
<!-- android:process=":bdservice_v1" > -->
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.BOOT_COMPLETED" /> -->
<!-- <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> -->
<!-- <action android:name="com.baidu.android.pushservice.action.notification.SHOW" /> -->
<!-- <action android:name="com.baidu.android.pushservice.action.media.CLICK" /> -->
<!-- </intent-filter> -->
<!-- </receiver> -->
<!-- <receiver -->
<!-- android:name="com.baidu.android.pushservice.RegistrationReceiver" -->
<!-- android:process=":bdservice_v1" > -->
<!-- <intent-filter> -->
<!-- <action android:name="com.baidu.android.pushservice.action.METHOD" /> -->
<!-- <action android:name="com.baidu.android.pushservice.action.BIND_SYNC" /> -->
<!-- </intent-filter> -->
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.PACKAGE_REMOVED" /> -->


<!-- <data android:scheme="package" /> -->
<!-- </intent-filter> -->
<!-- </receiver> -->


<!-- <service -->
<!-- android:name="com.baidu.android.pushservice.PushService" -->
<!-- android:exported="true" -->
<!-- android:process=":bdservice_v1" /> -->


<!-- <meta-data -->
<!-- android:name="api_key" -->
<!-- android:value="YfBUoGO0hYg5t7ayNrzXmGSi" /> -->
<!-- Baidu push End -->
</application>

</manifest>
Binary file added Linkup/libs/MiPush_SDK_Client_2_2_8_sdk.jar
Binary file not shown.
Binary file added Linkup/res/drawable-mdpi/top_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_bj.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Linkup/res/drawable-mdpi/top_share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Linkup/res/drawable-mdpi/toplist.jpg
Binary file not shown.
Binary file modified Linkup/res/drawable-xhdpi/but_xx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
142 changes: 85 additions & 57 deletions Linkup/res/layout/activity_top.xml
Original file line number Diff line number Diff line change
@@ -1,110 +1,138 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rltTop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toplist"
android:background="@drawable/top_bj"
android:orientation="vertical"
tools:context=".TopActivity" >

<LinearLayout
android:id="@+id/topUsers"
android:id="@+id/lltMain"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_marginTop="140dp"
android:background="#8800ff00"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical" >
</LinearLayout>

<LinearLayout
android:id="@+id/searchMini"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/topUsers"
android:layout_gravity="bottom"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_margin="5dp"
android:layout_weight="2"
android:visibility="invisible" />

<TextView
android:id="@+id/tvCurLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:gravity="center"
android:textColor="#FFFF0000"
android:textSize="20sp" />

<LinearLayout
android:id="@+id/topUsers"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_weight="10"
android:gravity="center"
android:orientation="vertical" >
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >

<!-- <ImageView -->
<!-- android:id="@+id/ivPreLevel" -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:layout_marginLeft="5dp" -->
<!-- android:onClick="preLevel" -->
<!-- android:src="@drawable/top_back" -->
<!-- tools:ignore="contentDescription" /> -->

<TextView
android:id="@+id/tvCurLevel"
android:layout_width="0dp"
<ImageView
android:id="@+id/ivSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/top_search"
android:gravity="center"
android:textColor="#FFFFFF33"
android:textSize="20sp" />
android:onClick="showSearch"
android:textColor="#FFFF0000"
android:textSize="24sp"
tools:ignore="contentDescription" />

<!-- <ImageView -->
<!-- android:id="@+id/ivNextLevel" -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:layout_marginRight="5dp" -->
<!-- android:onClick="nextLevel" -->
<!-- android:src="@drawable/top_next" -->
<!-- tools:ignore="contentDescription" /> -->
<ImageView
android:id="@+id/ivShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/top_share"
android:gravity="center"
android:onClick="shareTop"
android:textColor="#FFFFFFFF"
android:textSize="24sp"
tools:ignore="contentDescription" />
</LinearLayout>
</LinearLayout>

<LinearLayout
android:id="@+id/lltSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#88888888"
android:gravity="bottom"
android:orientation="vertical" >

<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#88888888"
android:layout_gravity="center"
android:layout_margin="10dp"
android:gravity="center"
android:orientation="horizontal" >

<Spinner
android:id="@+id/spModes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="0dp"
android:entries="@array/modes"
android:gravity="center"
android:prompt="@string/select_mode" />

<Spinner
android:id="@+id/spRanks"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="0dp"
android:entries="@array/mode0ranks"
android:gravity="center"
android:prompt="@string/select_rank" />

<Spinner
android:id="@+id/spLevels"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="0dp"
android:entries="@array/levels"
android:gravity="center"
android:prompt="@string/select_level" />
</LinearLayout>
</LinearLayout>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="shareTop"
android:src="@drawable/share2"
tools:ignore="contentDescription" >
</ImageView>
</RelativeLayout>
<Button
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_margin="10dp"
android:background="@drawable/btn_cancel_back"
android:onClick="hideSearch"
android:text="@string/cancel"
android:textColor="#ffffffff"
android:textSize="20sp" />
</LinearLayout>

</RelativeLayout>
10 changes: 4 additions & 6 deletions Linkup/res/layout/topitem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@

<TextView
android:id="@+id/order"
android:layout_width="25dp"
android:layout_height="wrap_content"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:gravity="center"
android:textColor="#FFFF3333"
android:textSize="20sp" />
android:layout_margin="4dp"
android:gravity="center" />

<ImageView
android:id="@+id/icon"
Expand Down
20 changes: 10 additions & 10 deletions Linkup/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@
<string name="back">返回</string>
<string name="next">继续</string>
<string name="again">再来</string>
<string name="game_success">恭喜你,游戏已通关</string>
<string name="game_success">恭喜你,游戏已通关.</string>
<string name="game_level_record">记录:</string>
<string name="game_level_norecord">记录:无</string>
<string name="game_level_task">任务:</string>
<string name="game_score">游戏得分:</string>
<string name="game_level_lost">闯关失败</string>
<string name="game_level_success">闯关成功</string>
<string name="game_time_success">游戏胜利</string>
<string name="game_level_lost">闯关失败</string>
<string name="game_level_success">闯关成功</string>
<string name="game_time_success">游戏胜利</string>
<string name="game_time">游戏时间:</string>
<string name="game_time_min">最快记录:</string>
<string name="game_task_success">任务完成</string>
<string name="game_task_fail">任务失败</string>
<string name="game_task_success">任务完成</string>
<string name="game_task_fail">任务失败</string>
<string name="game_task_taskscore">游戏任务:</string>
<string name="game_ready_go">GO!</string>
<string name="game_prompt_none">已经不能消除了,请重排或按返回退出!</string>
<string name="login_with_sina_weibo">新浪微博登录</string>
<string name="login_with_qzone">QQ空间登录</string>
<string name="game_prompt_none">已经不能消除了,请重排或按返回退出.</string>
<string name="login_with_sina_weibo">新浪微博</string>
<string name="login_with_qzone">QQ空间</string>
<string name="network_exception">登录失败,请检查网络设置。</string>
<string name="logining">登录成功,欢迎回来!</string>
<string name="auth_cancel">授权操作已取消</string>
Expand Down Expand Up @@ -78,6 +78,6 @@
<string name="like_error">点赞失败,请检查网络设置。</string>
<string name="share_nologin_success">分享成功,登录分享奖励%s钻石!</string>
<string name="xxlogin_prompt">\n**开启星星模式需要用户登录,请登录后再来挑战。</string>
<string name="share_prompt">**点击分享按钮可以将排行榜分享到新浪微博、QQ空间或微信朋友圈。\n**关卡排名中左右滑动可以查看上一关/下一关排名.\n</string>
<string name="share_prompt">**点击分享按钮可以将排行榜分享到新浪微博、QQ空间或微信朋友圈。\n**关卡排名中左右滑动可以查看上一关/下一关排名。\n**点击心形图标可对玩家点赞。\n</string>

</resources>
Loading

0 comments on commit b99fe06

Please sign in to comment.