diff --git a/app/build.gradle b/app/build.gradle index 3ff7fb8..b7953fc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' + compile 'com.android.support:appcompat-v7:22.2.0' + compile 'com.android.support:design:22.2.0' compile 'com.jayfeng:lesscode-core:0.4.4' compile 'in.srain.cube:ultra-ptr:1.0.10' compile('com.octo.android.robospice:robospice-google-http-client:1.4.14') { @@ -57,7 +58,7 @@ dependencies { exclude(group: 'junit', module: 'junit') //by both name and group exclude(group: 'com.google.android', module: 'android') //by both name and group } - compile 'com.facebook.fresco:fresco:0.5.1+' + compile 'com.facebook.fresco:fresco:0.5.2+' compile 'com.umeng:fb:5.1.0' compile 'com.umeng.analytics:analytics:latest.integration' debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d6318c6..fcc395a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,9 +2,9 @@ - - - + + + @@ -17,11 +17,11 @@ + android:name="UMENG_APPKEY" + android:value="5527fcbbfd98c5d7d2000383" /> + android:name="UMENG_CHANNEL" + android:value="official" /> - - - - - - + android:name=".activity.SettingsActivity" + android:label="@string/settings_title" /> + + + + + diff --git a/app/src/main/java/com/jayfeng/androiddigest/activity/BaseActivity.java b/app/src/main/java/com/jayfeng/androiddigest/activity/BaseActivity.java index d5aa5b8..52c393f 100644 --- a/app/src/main/java/com/jayfeng/androiddigest/activity/BaseActivity.java +++ b/app/src/main/java/com/jayfeng/androiddigest/activity/BaseActivity.java @@ -2,6 +2,7 @@ import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.Toolbar; +import android.text.TextUtils; import android.view.View; import com.jayfeng.androiddigest.R; @@ -12,7 +13,14 @@ public class BaseActivity extends ActionBarActivity { protected Toolbar toolbar; protected void showToolbar() { + showToolbar(null); + } + + protected void showToolbar(String title) { toolbar = (Toolbar) findViewById(R.id.toolbar); + if (!TextUtils.isEmpty(title)) { + toolbar.setTitle(title); + } toolbar.setTitleTextColor(getResources().getColor(android.R.color.white)); toolbar.showOverflowMenu(); setSupportActionBar(toolbar); diff --git a/app/src/main/java/com/jayfeng/androiddigest/activity/DeveloperActivity.java b/app/src/main/java/com/jayfeng/androiddigest/activity/DeveloperActivity.java new file mode 100644 index 0000000..eadd3c2 --- /dev/null +++ b/app/src/main/java/com/jayfeng/androiddigest/activity/DeveloperActivity.java @@ -0,0 +1,16 @@ +package com.jayfeng.androiddigest.activity; + +import android.os.Bundle; + +import com.jayfeng.androiddigest.R; + +public class DeveloperActivity extends BaseActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_developer); + + showToolbar(); + } +} diff --git a/app/src/main/java/com/jayfeng/androiddigest/activity/MainActivity.java b/app/src/main/java/com/jayfeng/androiddigest/activity/MainActivity.java index 0e35a27..17258bd 100644 --- a/app/src/main/java/com/jayfeng/androiddigest/activity/MainActivity.java +++ b/app/src/main/java/com/jayfeng/androiddigest/activity/MainActivity.java @@ -58,10 +58,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - showToolbar(); - toolbar.setNavigationIcon(R.mipmap.ic_launcher); - toolbar.setSubtitle(R.string.app_description); - toolbar.setSubtitleTextColor(getResources().getColor(android.R.color.white)); + showToolbar(getString(R.string.app_description)); //set navigationBar color for Android 5.0 or above if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { @@ -161,8 +158,14 @@ public boolean onMenuItemClick(MenuItem item) { agent.startFeedbackActivity(); break; case R.id.more_menu_setting: - Intent intent = new Intent(MainActivity.this, SettingsActivity.class); - startActivity(intent); + Intent settingsIntent = new Intent(MainActivity.this, SettingsActivity.class); + startActivity(settingsIntent); + break; + case R.id.more_menu_developers: + Intent developerIntent = new Intent(MainActivity.this, DeveloperActivity.class); + startActivity(developerIntent); + break; + default: break; } return true; diff --git a/app/src/main/res/layout/activity_about_us.xml b/app/src/main/res/layout/activity_about_us.xml index 67eddb9..5f118ac 100644 --- a/app/src/main/res/layout/activity_about_us.xml +++ b/app/src/main/res/layout/activity_about_us.xml @@ -8,8 +8,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="left" - android:background="#008AC4" - android:minHeight="?attr/actionBarSize" /> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_joke_detail.xml b/app/src/main/res/layout/activity_joke_detail.xml index 54c0f61..37207e9 100644 --- a/app/src/main/res/layout/activity_joke_detail.xml +++ b/app/src/main/res/layout/activity_joke_detail.xml @@ -8,8 +8,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="left" - android:background="#008AC4" - android:minHeight="?attr/actionBarSize" /> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> + android:background="@color/primary" + android:title="@string/app_description" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material"> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> + android:background="@color/primary" + android:minHeight="@dimen/abc_action_bar_default_height_material" /> \ No newline at end of file diff --git a/app/src/main/res/menu/more_popup_menu.xml b/app/src/main/res/menu/more_popup_menu.xml index 1e22a50..83688e9 100644 --- a/app/src/main/res/menu/more_popup_menu.xml +++ b/app/src/main/res/menu/more_popup_menu.xml @@ -12,4 +12,7 @@ android:id="@+id/more_menu_setting" android:title="@string/tab_more_menu_setting"/> + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index cde69bc..62bb916 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index c133a0c..ef60586 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index bfa42f0..190e49c 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 324e72c..2a8bd61 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 0000000..63fc816 --- /dev/null +++ b/app/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,6 @@ + + + 64dp + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index c6ff4d4..8427139 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -3,9 +3,9 @@ #FF939393 #FF257DB8 - #2196F3 - #1976D2 - #BBDEFB + #009588 + #00796b + #da793e #03A9F4 #212121 #727272 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e4a276c..827a3b0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -14,6 +14,7 @@ 工具箱 更多 设置 + 开发小组 正文 正文 离线列表 @@ -50,5 +51,17 @@ 关于 关于干柴 + 冯建 + 昵称:谦虚的天下 + 博客地址:http://cnblogs.com/qianxudetianxia + QQ:673592063 + 微博地址:http://weibo.com/xiaofengjian?from=profile&wvr=6 + + 高建武 + 昵称:Gracker + 博客地址:http://androidperformance.com + QQ:553000664 + 微博地址:http://www.weibo.com/u/1315612820?from=feed&loc=nickname + 关于 diff --git a/server/blog/list.json b/server/blog/list.json new file mode 100644 index 0000000..e353894 --- /dev/null +++ b/server/blog/list.json @@ -0,0 +1,123 @@ +[{ + "title" : "开发社区(每日更新)", + "type" : "header" +},{ + "title" : "Android开发 - 博客园", + "description":"代码改变世界", + "type" : "html", + "url" : "http://www.cnblogs.com/cate/android/" +},{ + "title" : "Android热门博客列表 - ITeye博客频道", + "type" : "html", + "url" : "http://www.iteye.com/blogs/tag/Android" +},{ + "title" : "Android开发专区 - 开源中国", + "type" : "html", + "url" : "http://www.oschina.net/android/1/android?type=3&sort=time" +},{ + "title" : "AndroidCN:Android专业中文社区", + "type" : "html", + "url" : "http://www.androidcn.org" +},{ + "title" : "android周报(每周更新)", + "type" : "header" +},{ + "title" : "Android开发技术周报", + "type" : "html", + "url" : "http://www.androidweekly.cn" +},{ + "title" : "Android周报", + "description":"Coding, thoughts. @Android笔记", + "type" : "html", + "url" : "http://www.race604.com" +},{ + "title" : "Android开发技术前线", + "type" : "html", + "url" : "https://github.com/bboyfeiyu/android-tech-frontier" +},{ + "title" : "App开发日报", + "type" : "html", + "url" : "http://app.memect.com" +},{ + "title" : "电子书", + "type" : "header" +},{ + "title" : "皮皮书屋 - 备份", + "type" : "html", + "url" : "http://bt8.nl/ebook.php?book=android" +},{ + "title" : "知名博客(不定时更新)", + "type" : "header" +},{ + "title" : "codeKK 开源项目源码分析", + "type" : "html", + "url" : "http://www.codekk.com" +},{ + "title" : "代码家", + "description":"我想写个好的App…", + "type" : "html", + "url" : "http://blog.daimajia.com" +},{ + "title" : "Android 科学院 - 知乎专栏", + "type" : "html", + "url" : "http://zhuanlan.zhihu.com/andlib" +},{ + "title" : "Android开源项目分类汇总", + "type" : "html", + "url" : "https://github.com/Trinea/android-open-project" +},{ + "title" : "郭霖的专栏", + "description":"每当你在感叹,如果有这样一个东西就好了的时候,请注意,其实这是你的机会", + "type" : "html", + "url" : "http://blog.csdn.net/guolin_blog" +},{ + "title" : "Drakeet的个人博客", + "description":"平平凡凡的,追求优雅的代码", + "type" : "html", + "url" : "http://drakeet.me" +},{ + "title" : "老罗的Android之旅", + "description":"爱生活,爱Android", + "type" : "html", + "url" : "http://blog.csdn.net/luoshengyang" +},{ + "title" : "Android Performance", + "description":"Android,Performance", + "type" : "html", + "url" : "http://androidperformance.com" +},{ + "title" : "云在千峰", + "description":"About Java Android Web Dart etc …", + "type" : "html", + "url" : "http://blog.chengyunfeng.com/" +},{ + "title" : "宋宝华的blog", + "type" : "html", + "url" : "http://blog.csdn.net/21cnbao" +},{ + "title" : "谦虚的天下", + "type" : "html", + "url" : "http://www.cnblogs.com/qianxudetianxia/" +},{ + "title" : "设计交互", + "type" : "header" +},{ + "title" : "materialup", + "type" : "html", + "url" : "http://www.materialup.com" +},{ + "title" : "国外网站", + "type" : "header" +},{ + "title" : "Stack Overflow", + "description":"Newest 'android' Questions - Stack Overflow", + "type" : "html", + "url" : "http://stackoverflow.com/questions/tagged/android" +},{ + "title" : "Android Weekly", + "description":"Android Weekly is a free newsletter that helps you to stay cutting-edge with your Android Development.", + "type" : "html", + "url" : "http://androidweekly.net" +} + +] diff --git a/server/digest/add.php b/server/digest/add.php new file mode 100644 index 0000000..b0ff897 --- /dev/null +++ b/server/digest/add.php @@ -0,0 +1,59 @@ + + + +New a android digest + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
标题:
摘要:
内容:
图片:
网址:
类型: + +
是否显示更多: + +
+ +
+
+ + diff --git a/server/digest/detail.php b/server/digest/detail.php new file mode 100644 index 0000000..68e91a7 --- /dev/null +++ b/server/digest/detail.php @@ -0,0 +1,26 @@ +getData($sql); + +if (count($data) > 0) { + echo json_encode($data[0]); +} else { + echo "{}"; +} + +$mysql->closeDb(); + +function decodeUnicode($str) { + return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', + create_function( '$matches', 'return mb_convert_encoding(pack("H*", $matches[1]), "UTF-8", "UCS-2BE");' ), + $str); +} + +?> diff --git a/server/digest/list.php b/server/digest/list.php new file mode 100644 index 0000000..f350d12 --- /dev/null +++ b/server/digest/list.php @@ -0,0 +1,39 @@ +getData($sql); + +echo json_encode($data); + +$mysql->closeDb(); + +function decodeUnicode($str) { + return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', + create_function( '$matches', 'return mb_convert_encoding(pack("H*", $matches[1]), "UTF-8", "UCS-2BE");' ), + $str); +} + +?> diff --git a/server/digest/post.php b/server/digest/post.php new file mode 100644 index 0000000..a9a5166 --- /dev/null +++ b/server/digest/post.php @@ -0,0 +1,30 @@ +runSql($sql); +if ($mysql->errno() != 0) +{ + die("Error:" . $mysql->errmsg()); +} else { + echo "插入成功"; +} + +$mysql->closeDb(); +?> diff --git a/server/digest/review_post.php b/server/digest/review_post.php new file mode 100644 index 0000000..4ea69a7 --- /dev/null +++ b/server/digest/review_post.php @@ -0,0 +1,40 @@ +runSql($sql); +if ($mysql->errno() != 0) { + die("{\"s_status\": \"ERROR\",\"s_message\": \"" . $mysql->errmsg() . "\",\"s_code\": 1}"); +} else { + die("{\"s_status\": \"OK\",\"s_message\": \"\",\"s_code\": 200}"); +} + +$mysql->closeDb(); +?> diff --git a/server/digest/search.php b/server/digest/search.php new file mode 100644 index 0000000..7e20d31 --- /dev/null +++ b/server/digest/search.php @@ -0,0 +1,35 @@ +getData($sql); + +echo json_encode($data); + +$mysql->closeDb(); + +function decodeUnicode($str) { + return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', + create_function( '$matches', 'return mb_convert_encoding(pack("H*", $matches[1]), "UTF-8", "UCS-2BE");' ), + $str); +} + +?> diff --git a/server/latest.json b/server/latest.json new file mode 100644 index 0000000..088c815 --- /dev/null +++ b/server/latest.json @@ -0,0 +1,6 @@ +{ + "vercode":4, + "vername":"0.5", + "download":"http://jayfeng-files.stor.sinaapp.com/androiddigest/android_digest_release_v0.5.apk", + "log":"1. [增加]设置模块\n2. [增加]搜索功能\n3. [增加]集成了友盟统计\n4. [修复]重构了网络请求的代码,极大的精简优化了SpiceRequest的使用方式\n5. [修复]改善了工具箱的UI\n6. [修复]优化了列表中图片的展示效果\n7. [修复]修复了大量的其他bug" +} diff --git a/server/tool/add.php b/server/tool/add.php new file mode 100644 index 0000000..b32b2d2 --- /dev/null +++ b/server/tool/add.php @@ -0,0 +1,58 @@ + + + +Import a android tool + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
标题:
简介:
图片:
官网:
Apk下载地址:
网址:
分类: + +
+ +
+
+ + diff --git a/server/tool/list.php b/server/tool/list.php new file mode 100644 index 0000000..fc67a7f --- /dev/null +++ b/server/tool/list.php @@ -0,0 +1,39 @@ +getData($sql); + +echo json_encode($data); + +$mysql->closeDb(); + +function decodeUnicode($str) { + return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', + create_function( '$matches', 'return mb_convert_encoding(pack("H*", $matches[1]), "UTF-8", "UCS-2BE");' ), + $str); +} + +?> diff --git a/server/tool/post.php b/server/tool/post.php new file mode 100644 index 0000000..16e5497 --- /dev/null +++ b/server/tool/post.php @@ -0,0 +1,30 @@ +runSql($sql); +if ($mysql->errno() != 0) +{ + die("Error:" . $mysql->errmsg()); +} else { + echo "插入成功"; +} + +$mysql->closeDb(); +?> diff --git a/server/tool/search.php b/server/tool/search.php new file mode 100644 index 0000000..120a4bb --- /dev/null +++ b/server/tool/search.php @@ -0,0 +1,35 @@ +getData($sql); + +echo json_encode($data); + +$mysql->closeDb(); + +function decodeUnicode($str) { + return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', + create_function( '$matches', 'return mb_convert_encoding(pack("H*", $matches[1]), "UTF-8", "UCS-2BE");' ), + $str); +} + +?>