Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c025df7
update
sofakeer Dec 13, 2016
3833c3a
筛选UI
sofakeer Dec 13, 2016
b0b10a8
整理下 build.gradle
thinaaron Dec 13, 2016
311e082
项目外任务筛选UI
sofakeer Dec 13, 2016
da1d73b
冒泡列表由 listview 改为 recyclerview
thinaaron Dec 14, 2016
c401f92
冒泡列表由 listview 改为 recyclerview
thinaaron Dec 14, 2016
32c49a0
修改了任务的 "加载中" 出现位置
thinaaron Dec 14, 2016
3b2829e
调整任务的显示
thinaaron Dec 15, 2016
8ee33c5
下载图片文件添加进度条
thinaaron Dec 15, 2016
16f0992
去除 jazzList 依赖,已经用 recyclerview 代替
thinaaron Dec 15, 2016
586ecfa
更换图标
thinaaron Dec 15, 2016
8dce3f7
搜索界面添加默认显示界面
thinaaron Dec 15, 2016
396ca4c
feedback topic 不能显示的问题
thinaaron Dec 15, 2016
5bd84f8
修改了下拉刷新的颜色
thinaaron Dec 15, 2016
ac5c1df
项目外任务筛选
sofakeer Dec 15, 2016
0cedc4c
升级到 sdk 23
thinaaron Dec 16, 2016
5252a8f
项目外任务增加,标签,状态,关键字筛选
sofakeer Dec 16, 2016
eedabe5
项目外任务增加,标签,状态,关键字筛选
sofakeer Dec 16, 2016
5d6d8df
Merge remote-tracking branch 'origin/master'
sofakeer Dec 16, 2016
9929c15
升级到 sdk 23
thinaaron Dec 16, 2016
d33ba7f
target SDK 升级到 23
thinaaron Dec 16, 2016
81ffb2f
项目内外,任务筛选,标签,状态,关键字筛选
sofakeer Dec 16, 2016
2526da9
改文案
thinaaron Dec 17, 2016
d22eba0
Merge branch 'master' into v410
thinaaron Dec 19, 2016
e79937b
merge 图标
thinaaron Dec 19, 2016
3916fe6
去除4.0提示
thinaaron Dec 19, 2016
9f66668
删除之前对码市分享过来的 url 的兼容
thinaaron Dec 19, 2016
b0f3a66
完成手机验证弹出奖励码币提示
thinaaron Dec 19, 2016
25a2be4
修改项目内标题
sofakeer Dec 19, 2016
d13f357
调整弹框样式
sofakeer Dec 19, 2016
49a3bb4
全局调样式 左右间距由 12dp 改为 15dp
thinaaron Dec 20, 2016
6d208a5
全局调样式 左右间距由 12dp 改为 15dp
thinaaron Dec 20, 2016
ba7d68d
全局调样式 左右间距由 12dp 改为 15dp
thinaaron Dec 20, 2016
2af23d4
调整弹框样式,drawerlayout 替换dialog
sofakeer Dec 20, 2016
9e04766
update
sofakeer Dec 13, 2016
2b7114c
筛选UI
sofakeer Dec 13, 2016
300a95f
项目外任务筛选UI
sofakeer Dec 13, 2016
b7db60a
项目外任务筛选
sofakeer Dec 15, 2016
733a951
项目外任务增加,标签,状态,关键字筛选
sofakeer Dec 16, 2016
ab28ff7
项目内外,任务筛选,标签,状态,关键字筛选
sofakeer Dec 16, 2016
ee27b3c
修改项目内标题
sofakeer Dec 19, 2016
1094317
调整弹框样式
sofakeer Dec 19, 2016
ffc5a8a
调整弹框样式,drawerlayout 替换dialog
sofakeer Dec 20, 2016
f2c4503
Merge remote-tracking branch 'origin/master'
thinaaron Dec 20, 2016
05af846
Accept Pull Request #787 : (ashuo:merged -> coding:merge410)
cxc0618 Dec 20, 2016
6724ea8
添加 checknetwork.aar
thinaaron Dec 20, 2016
f893d4e
解决冲突
thinaaron Dec 20, 2016
6c664a5
登出关闭主界面
thinaaron Dec 21, 2016
d9ccbaa
添加 jgit 依赖
thinaaron Dec 21, 2016
834f634
升级 asynchttpclient
thinaaron Dec 21, 2016
88c5c6c
修复筛选UI bug
sofakeer Dec 21, 2016
7d70789
更新依赖
thinaaron Dec 22, 2016
ea26d31
样式问题
sofakeer Dec 22, 2016
fdc597c
update
sofakeer Dec 22, 2016
5a913cf
Accept Pull Request #792 : (ashuo:merged -> coding:merge410)
cxc0618 Dec 22, 2016
efbf521
Merge branch 'v410' into merge410
thinaaron Dec 22, 2016
43070aa
merge 完成
thinaaron Dec 22, 2016
52afaa4
添加 PagerSlidingTabStrip
thinaaron Dec 22, 2016
b24ecee
文档改为文件
thinaaron Dec 22, 2016
8ac103f
修改搜索的样式
thinaaron Dec 22, 2016
767a9cf
去除码币提示
thinaaron Dec 22, 2016
20fd117
不能搜索 merge 的 bug
thinaaron Dec 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Android Studio 2.2.3,用gradle引用的许多第三方库,第一次加载会

##一些觉得有必要提一下的
因为不想写一堆绑定函数,所以项目用了 [androidannotations](https://github.com/excilys/androidannotations),如果以前没用过最好先看看。
显示图片用的[universal-image-loader](https://github.com/nostra13/Android-Universal-Image-Loader),网络库用的[android-async-http](https://github.com/loopj/android-async-http),因为登录以后保存的cookie都在[android-async-http](https://github.com/loopj/android-async-http),有些图片需要登录后的cookie才能取到(例如项目文档里面的图片),这种情况就会用先用[android-async-http](https://github.com/loopj/android-async-http)下载图片(AttachmentimagePagerFragment.java)。
显示图片用的[universal-image-loader](https://github.com/nostra13/Android-Universal-Image-Loader),网络库用的[android-async-http](https://github.com/loopj/android-async-http),因为登录以后保存的cookie都在[android-async-http](https://github.com/loopj/android-async-http),有些图片需要登录后的cookie才能取到(例如项目文件里面的图片),这种情况就会用先用[android-async-http](https://github.com/loopj/android-async-http)下载图片(AttachmentimagePagerFragment.java)。

- Application用的是MyApp.java,用静态变量保存了用户信息,屏幕长宽等信息(理论上来说不是好的做法,但是这些基本都是只读的数据,而且并不大,所以就这么做了)。

Expand Down
17 changes: 13 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
renderscriptTargetApi 19
multiDexEnabled true
minSdkVersion 15
targetSdkVersion 22
targetSdkVersion 23
}

productFlavors {
Expand Down Expand Up @@ -55,7 +55,7 @@ dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
Expand Down Expand Up @@ -86,16 +86,17 @@ dependencies {
compile project(':social_sdk_library_project')
compile 'com.bigkoo:convenientbanner:1.0.8'
compile 'com.android.support:design:23.1.1'
compile project(':scrollanimationlibrary')
compile files('libs/pinyin4j-2.5.0.jar')
compile files('libs/jg_filter_sdk_1.1.jar')
compile files('libs/wup-1.0.0.E-SNAPSHOT.jar')
compile files('libs/Xg_sdk_v2.42_20160111_1539.jar')
compile files('libs/Xg_sdk_v2.45_20160510_1845.jar')
compile project(':bottom-bar')

compile 'com.alibaba:fastjson:1.1.44.android'
compile 'com.flyco.roundview:FlycoRoundView_Lib:1.1.4@aar'
compile 'com.marshalchen.ultimaterecyclerview:library:0.7.0'

compile 'org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r'
}

buildscript {
Expand Down Expand Up @@ -125,3 +126,11 @@ apt {
androidManifestFile variant.outputs[0]?.processResources?.manifestFile
}
}
repositories {
flatDir {
dirs 'libs' //this way we can find the .aar file in libs folder
}
}
dependencies {
compile(name:'checknetwork', ext:'aar')
}
Binary file added app/libs/checknetwork.aar
Binary file not shown.
8 changes: 7 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@


<!-- 百度LBS检索 -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!--READ_PHONE_STATE 是必须的,感觉有点流氓-->
<!--<uses-permission android:name="android.permission.GET_ACCOUNTS" />-->
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
Expand Down Expand Up @@ -214,6 +215,8 @@
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustPan|stateAlwaysVisible|adjustUnspecified|stateHidden"
android:theme="@style/ActionbarSpannerTheme1" />
<activity
android:name=".LoginActivity_"
Expand All @@ -226,6 +229,9 @@
android:name=".project.detail.ProjectActivity_"
android:icon="@drawable/ic_lancher"
android:label="@string/title_activity_project"
android:theme="@style/ThemeProject"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="adjustPan|stateAlwaysVisible|adjustUnspecified|stateHidden"
android:screenOrientation="portrait" />
<activity
android:name=".EntranceActivity_"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/net/coding/program/AllThirdKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ public class AllThirdKeys {
public static final String geotable = "";
public static final String ak = "";
public static final String sk = "";

}

21 changes: 16 additions & 5 deletions app/src/main/java/net/coding/program/FootUpdate.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.coding.program;

import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;

Expand Down Expand Up @@ -36,6 +37,10 @@ public void init(Object listView, LayoutInflater inflater, final LoadMore loadMo
init(listView, inflater, loadMore, "addFooterView");
}

public void initToRecycler(Object listView, LayoutInflater inflater, final LoadMore loadMore) {
init(listView, inflater, loadMore, null);
}

private void init(Object listView, LayoutInflater inflater, final LoadMore loadMore, String callMethod) {
View v = inflater.inflate(R.layout.listview_foot, null, false);

Expand All @@ -52,16 +57,22 @@ private void init(Object listView, LayoutInflater inflater, final LoadMore loadM

mLoading = v.findViewById(R.id.progressBar);

try {
Method method = listView.getClass().getMethod(callMethod, View.class);
method.invoke(listView, v);
} catch (Exception e) {
Global.errorLog(e);
if (!TextUtils.isEmpty(callMethod)) {
try {
Method method = listView.getClass().getMethod(callMethod, View.class);
method.invoke(listView, v);
} catch (Exception e) {
Global.errorLog(e);
}
}

mLayout.setVisibility(View.GONE);
}

public View getView() {
return mLayout;
}

public void showLoading() {
show(true, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.FragmentArg;
import org.androidannotations.annotations.ViewById;
import org.apache.http.Header;
import cz.msebera.android.httpclient.Header;
import org.json.JSONException;
import org.json.JSONObject;

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/net/coding/program/LoginActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import org.androidannotations.annotations.FocusChange;
import org.androidannotations.annotations.OnActivityResult;
import org.androidannotations.annotations.ViewById;
import org.apache.http.Header;
import cz.msebera.android.httpclient.Header;
import org.json.JSONException;
import org.json.JSONObject;

Expand Down
64 changes: 55 additions & 9 deletions app/src/main/java/net/coding/program/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.GravityCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
Expand All @@ -29,14 +31,17 @@
import com.tencent.android.tpush.XGPushManager;
import com.tencent.android.tpush.service.XGPushService;

import net.coding.program.common.Global;
import net.coding.program.common.LoginBackground;
import net.coding.program.common.Unread;
import net.coding.program.common.UnreadNotify;
import net.coding.program.common.htmltext.URLSpanNoUnderline;
import net.coding.program.common.network.MyAsyncHttpClient;
import net.coding.program.common.network.util.Login;
import net.coding.program.common.ui.BaseActivity;
import net.coding.program.common.ui.GlobalUnit;
import net.coding.program.event.EventFilter;
import net.coding.program.event.EventMessage;
import net.coding.program.event.EventNotifyBottomBar;
import net.coding.program.event.EventPosition;
import net.coding.program.event.EventShowBottom;
Expand All @@ -61,8 +66,9 @@
import java.util.List;

import de.greenrobot.event.EventBus;
import network.coding.net.checknetwork.CheckNetworkIntentService;

@EActivity(R.layout.activity_main)
@EActivity(R.layout.activity_main_parent)
public class MainActivity extends BaseActivity {

public static final String TAG = "MainActivity";
Expand Down Expand Up @@ -123,6 +129,7 @@ protected void onCreate(Bundle savedInstanceState) {
// qq push
updateNotifyService();
pushInXiaomi();
startNetworkCheckService();

LoginBackground loginBackground = new LoginBackground(this);
loginBackground.update();
Expand All @@ -148,6 +155,18 @@ protected void onCreate(Bundle savedInstanceState) {
EventBus.getDefault().register(this);
}

private void startNetworkCheckService() {
Intent intent = new Intent(this, CheckNetworkIntentService.class);
String extra = Global.getExtraString(this);
intent.putExtra("PARAM_APP", extra);

intent.putExtra("PARAM_GK", MyApp.sUserObject.global_key);
String sid = MyAsyncHttpClient.getCookie(this, Global.HOST);
intent.putExtra("PARAM_COOKIE", sid);

startService(intent);
}

@Override
protected void onStart() {
super.onStart();
Expand Down Expand Up @@ -271,15 +290,13 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long

FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
Log.d("", ft == null ? "is null" : "is good");
Log.d(TAG, ft == null ? "is null" : "is good");
ft.replace(R.id.container, fragment, strings[position]);
ft.commit();

}

@Override
public void onNothingSelected(AdapterView<?> parent) {

}
});

Expand Down Expand Up @@ -331,7 +348,7 @@ public void onNavigationDrawerItemSelected(int position) {
}

updateNotifyFromService();

isOpenDrawerLayout(false);
switch (position) {
case 0://防止重复加载数据
// fragment = new ProjectFragment_();
Expand All @@ -354,6 +371,7 @@ public void onNavigationDrawerItemSelected(int position) {
case 1:
// bottomBar.getTabWithId(R.id.tabProject).setBadgeCount(20);
fragment = new TaskFragment_();
isOpenDrawerLayout(true);
break;
case 2:
// 进入冒泡页面,单独处理
Expand Down Expand Up @@ -386,7 +404,14 @@ public void onNavigationDrawerItemSelected(int position) {
}

visibleTitle(toolbarMaopaoTitle);
} else if (position == 0) {
} else if (position == 0 || position == 1) {
if (position == 0) {
toolbarProjectTitle.setText("我的项目");
}
if (position == 1) {
toolbarProjectTitle.setText("我的任务");
}
toolbarProjectTitle.setTag(position);
visibleTitle(toolbarProjectTitle);
} else {
toolbarTitle.setVisibility(View.VISIBLE);
Expand Down Expand Up @@ -432,7 +457,7 @@ protected void onRestoreInstanceState(Bundle savedInstanceState) {

public void restoreActionBar() {
mTitle = drawer_title[mSelectPos];
if (mSelectPos == 0) {
if (mSelectPos == 0 || mSelectPos == 1) {
visibleTitle(toolbarProjectTitle);
} else if (mSelectPos == 2) {
visibleTitle(toolbarMaopaoTitle);
Expand Down Expand Up @@ -466,12 +491,28 @@ protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
}

private void isOpenDrawerLayout(boolean isOpen) {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer == null) return;
if (isOpen) {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
} else {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}
}

@Override
public void onBackPressed() {
exitApp();
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer != null && drawer.isDrawerOpen(GravityCompat.END)) {
drawer.closeDrawer(GravityCompat.END);
} else {
exitApp();
}
}

private void exitApp() {

if ((System.currentTimeMillis() - exitTime) > 2000) {
showButtomToast("再按一次退出Coding");
exitTime = System.currentTimeMillis();
Expand All @@ -481,7 +522,7 @@ private void exitApp() {
}

private View.OnClickListener clickProjectTitle = v -> {
EventBus.getDefault().post(new EventFilter());
EventBus.getDefault().post(new EventFilter(v.getTag()));
};

class MaopaoTypeAdapter extends BaseAdapter {
Expand Down Expand Up @@ -565,6 +606,11 @@ public void onEventMainThread(Object object) {
} else if (object instanceof EventPosition) {
EventPosition eventPosition = (EventPosition) object;
toolbarProjectTitle.setText(eventPosition.title);
} else if (object instanceof EventMessage) {
EventMessage eventMessage = (EventMessage) object;
if (eventMessage.type == EventMessage.Type.loginOut) {
finish();
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/net/coding/program/UpdateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import net.coding.program.common.network.MyAsyncHttpClient;
import net.coding.program.setting.UpdateTipActivity;

import org.apache.http.Header;
import cz.msebera.android.httpclient.Header;
import org.json.JSONObject;

import java.io.File;
Expand Down Expand Up @@ -83,7 +83,6 @@ public int onStartCommand(Intent intent, int flags, int startId) {
private void downloadApp() {
try {
if (enqueue == 0) {

DownloadManager.Request request = new DownloadManager.Request(Uri.parse(mUpdateInfo.url))
.setTitle("Coding")
.setDescription("下载Coding" + mUpdateInfo.versionName)
Expand Down
Loading