Skip to content

Commit

Permalink
新增分享奖励和英雄榜
Browse files Browse the repository at this point in the history
  • Loading branch information
csuyzb committed Jul 10, 2014
1 parent 99aa4db commit 64b750d
Show file tree
Hide file tree
Showing 19 changed files with 536 additions and 61 deletions.
8 changes: 7 additions & 1 deletion Linkup/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
android:keepScreenOn="true"
android:screenOrientation="portrait"
android:theme="@style/FullscreenTheme" />
<activity
android:name="com.znv.linkup.TopActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:keepScreenOn="true"
android:screenOrientation="portrait"
android:theme="@style/FullscreenTheme" >
</activity>

<service android:name="com.znv.linkup.sound.MusicService" >
<intent-filter>
Expand Down Expand Up @@ -131,7 +138,6 @@
android:name="api_key"
android:value="YfBUoGO0hYg5t7ayNrzXmGSi" />
<!-- Baidu push End -->

</application>

</manifest>
Binary file added Linkup/res/drawable-mdpi/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/toplist.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 129 additions & 0 deletions Linkup/res/layout/activity_top.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toplist"
android:orientation="vertical"
tools:context=".TopActivity" >

<LinearLayout
android:id="@+id/topUsers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="140dp"
android:orientation="vertical" >
</LinearLayout>

<RelativeLayout
android:id="@+id/searchMax"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical" >

<TextView
android:id="@+id/tvModeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="游戏模式" />

<TextView
android:id="@+id/tvMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_toRightOf="@id/tvModeTitle"
android:text="闯关" />

<TextView
android:id="@+id/tvRankTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tvModeTitle"
android:layout_margin="5dp"
android:text="游戏等级" />

<TextView
android:id="@+id/tvRank"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tvMode"
android:layout_margin="5dp"
android:layout_toRightOf="@id/tvRankTitle"
android:text="经典" />

<TextView
android:id="@+id/tvLevelTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tvRankTitle"
android:layout_margin="5dp"
android:text="游戏关卡" />

<TextView
android:id="@+id/tvLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tvRank"
android:layout_margin="5dp"
android:layout_toRightOf="@id/tvLevelTitle"
android:text="111" />

<Button
android:id="@+id/btnSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_marginTop="40dp"
android:drawableLeft="@drawable/search"
android:onClick="search" />
</RelativeLayout>

<LinearLayout
android:id="@+id/searchMini"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical"
android:visibility="gone" >

<TextView
android:id="@+id/tvCurLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前关卡[]" />

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

<Button
android:id="@+id/btnPreLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="searchPre"
android:text="上一关" >
</Button>

<Button
android:id="@+id/btnNextLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="searchNext"
android:text="下一关" >
</Button>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="showSearchMax"
android:text="高级查询" >
</Button>
</LinearLayout>
</LinearLayout>

</LinearLayout>
10 changes: 6 additions & 4 deletions Linkup/res/layout/level_top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tvUser"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_toRightOf="@id/ivIcon"
android:orientation="horizontal" >

<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/diamond"
tools:ignore="contentDescription" />

Expand All @@ -102,8 +104,8 @@
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/coins"
tools:ignore="contentDescription" />

Expand Down
85 changes: 85 additions & 0 deletions Linkup/res/layout/topitem.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<TextView
android:id="@+id/order"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:text="10"
android:textColor="#FFFF3333"
android:textSize="20sp" />

<ImageView
android:id="@+id/icon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:layout_margin="2dp"
android:src="@drawable/icon_default"
tools:ignore="contentDescription" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >

<TextView
android:id="@+id/score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:text="550"
android:textColor="#FFFF3333"
android:textSize="15sp" />

<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:text="白杨"
android:textColor="#FFFF3333"
android:textSize="12sp" />
</LinearLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_weight="1"
android:orientation="vertical" >

<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_margin="2dp"
android:layout_weight="1"
android:gravity="right"
android:text="2014-06-14"
android:textColor="#88888888"
android:textSize="14sp" />

<!-- <TextView -->
<!-- android:id="@+id/time" -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:layout_gravity="right|center_vertical" -->
<!-- android:layout_marginLeft="2dp" -->
<!-- android:layout_marginRight="2dp" -->
<!-- android:gravity="right" -->
<!-- android:text="00:00:00" -->
<!-- android:textColor="#88888888" -->
<!-- android:textSize="14sp" /> -->
</LinearLayout>

</LinearLayout>
4 changes: 4 additions & 0 deletions Linkup/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<string name="login_award">获得每日登录奖励10钻石100金币</string>
<string name="unlock_title">强制解锁</string>
<string name="unlock_msg">\n您确认消耗[5]钻石强制解锁关卡[%s]吗?</string>
<string name="unlock_success_msg">关卡解锁成功!</string>
<string name="share">分享</string>
<string name="share_success">分享成功,奖励5钻石!</string>
<string name="top_net_error">获取数据失败,请检查网络设置!</string>
<string name="top_data_error">获取或解析数据失败!</string>

</resources>
6 changes: 1 addition & 5 deletions Linkup/src/com/znv/linkup/RankActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void onResume() {
public void handleMessage(Message msg) {
switch (msg.what) {
case ViewSettings.MSG_UPDATE_GOLD: {
onUpdateAward();
Toast.makeText(RankActivity.this, R.string.unlock_success_msg, Toast.LENGTH_SHORT).show();
}
break;
case ViewSettings.MSG_NETWORK_EXCEPTION: {
Expand All @@ -119,10 +119,6 @@ public void handleMessage(Message msg) {
}
};

public void onUpdateAward() {

}

/**
* 异步加载关卡
*
Expand Down
Loading

0 comments on commit 64b750d

Please sign in to comment.