99)canvas.drawText("99+",badgeSize/2,baseline,mTextPaint);
84 | else canvas.drawText(badgeNum+"",badgeSize/2,baseline,mTextPaint);
85 | }
86 |
87 | public void setBadgeNum(int number){
88 | badgeNum = number;
89 | postInvalidate();
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/app/src/main/java/io/dongyue/gitlabandroid/view/CircleTransformation.java:
--------------------------------------------------------------------------------
1 | package io.dongyue.gitlabandroid.view;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.BitmapShader;
5 | import android.graphics.Canvas;
6 | import android.graphics.Matrix;
7 | import android.graphics.Paint;
8 |
9 | import com.squareup.picasso.Transformation;
10 |
11 | /**
12 | * Copyright (C) 2015 Wasabeef
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | */
26 |
27 | /**
28 | * https://github.com/wasabeef/picasso-transformations/blob/master/transformations/src/main/java/jp/wasabeef/picasso/transformations/CropCircleTransformation.java
29 | */
30 | public class CircleTransformation implements Transformation {
31 |
32 | @Override
33 | public Bitmap transform(Bitmap source) {
34 | if (source == null || (source.getWidth() == 0 && source.getHeight() == 0)) {
35 | return source;
36 | }
37 | int size = Math.min(source.getWidth(), source.getHeight());
38 |
39 | int width = (source.getWidth() - size) / 2;
40 | int height = (source.getHeight() - size) / 2;
41 |
42 | Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
43 |
44 | Canvas canvas = new Canvas(bitmap);
45 | Paint paint = new Paint();
46 | BitmapShader shader =
47 | new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP);
48 | if (width != 0 || height != 0) {
49 | // source isn't square, move viewport to center
50 | Matrix matrix = new Matrix();
51 | matrix.setTranslate(-width, -height);
52 | shader.setLocalMatrix(matrix);
53 | }
54 | paint.setShader(shader);
55 | paint.setAntiAlias(true);
56 |
57 | float r = size / 2f;
58 | canvas.drawCircle(r, r, r, paint);
59 |
60 | source.recycle();
61 |
62 | return bitmap;
63 | }
64 |
65 | @Override
66 | public String key() {
67 | return "CropCircleTransformation()";
68 | }
69 | }
--------------------------------------------------------------------------------
/app/src/main/java/io/dongyue/gitlabandroid/view/GitlabNavigationView.java:
--------------------------------------------------------------------------------
1 | package io.dongyue.gitlabandroid.view;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.support.design.widget.NavigationView;
6 | import android.util.AttributeSet;
7 | import android.view.MenuItem;
8 | import android.view.View;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import butterknife.Bind;
13 | import butterknife.ButterKnife;
14 | import io.dongyue.gitlabandroid.R;
15 | import io.dongyue.gitlabandroid.model.api.UserFull;
16 | import io.dongyue.gitlabandroid.network.GitlabClient;
17 | import io.dongyue.gitlabandroid.network.GitlabSubscriber;
18 | import io.dongyue.gitlabandroid.utils.NavigationManager;
19 | import io.dongyue.gitlabandroid.utils.eventbus.RxBus;
20 | import io.dongyue.gitlabandroid.utils.eventbus.events.CloseDrawerEvent;
21 | import rx.Observable;
22 | import rx.Subscription;
23 | import rx.android.schedulers.AndroidSchedulers;
24 | import rx.schedulers.Schedulers;
25 |
26 | /**
27 | * Created by Brotherjing on 2016/3/6.
28 | */
29 | public class GitlabNavigationView extends NavigationView {
30 |
31 | @Bind(R.id.imageView)
32 | ImageView imageView;
33 | @Bind(R.id.name)
34 | TextView name;
35 | @Bind(R.id.email)
36 | TextView email;
37 |
38 | Subscription subscription;
39 |
40 | public GitlabNavigationView(Context context) {
41 | super(context);
42 | init(context);
43 | }
44 |
45 | public GitlabNavigationView(Context context, AttributeSet attrs) {
46 | super(context, attrs);
47 | init(context);
48 | }
49 |
50 | public GitlabNavigationView(Context context, AttributeSet attrs, int defStyleAttr) {
51 | super(context, attrs, defStyleAttr);
52 | }
53 |
54 | public void init(Context context){
55 | inflateMenu(R.menu.activity_home_drawer);
56 | View header = inflateHeaderView(R.layout.nav_header_home);
57 | ButterKnife.bind(this, header);
58 | subscription = GitlabClient.getInstance().getThisUser()
59 | .subscribeOn(Schedulers.io())
60 | .observeOn(AndroidSchedulers.mainThread())
61 | .subscribe(new GitlabSubscriber() {
62 | @Override
63 | public void onNext(UserFull userFull) {
64 | name.setText(userFull.getName());
65 | email.setText(userFull.getEmail());
66 | GitlabClient.getPicasso().with(context)
67 | .load(userFull.getAvatarUrl())
68 | .resize(100, 100) //图片大小还未确定
69 | .centerCrop()
70 | .into(imageView);
71 | }
72 | });
73 | header.setOnClickListener(new OnClickListener() {
74 | @Override
75 | public void onClick(View v) {
76 | NavigationManager.toUserInfo(getContext());
77 | }
78 | });
79 |
80 | setNavigationItemSelectedListener(onNavigationItemSelectedListener);
81 | //setSelectedItem();
82 | }
83 |
84 | @Override
85 | protected void onDetachedFromWindow (){
86 | super.onDetachedFromWindow();
87 | if(subscription!=null){
88 | subscription.unsubscribe();
89 | }
90 | }
91 |
92 |
93 | private OnNavigationItemSelectedListener onNavigationItemSelectedListener = new OnNavigationItemSelectedListener() {
94 | @Override
95 | public boolean onNavigationItemSelected(MenuItem item) {
96 | switch (item.getItemId()){
97 | case R.id.nav_activity:
98 | NavigationManager.toMyActivities(getContext());break;
99 | case R.id.nav_issue:
100 | NavigationManager.toIssueList(getContext());break;
101 | case R.id.nav_settings:
102 | NavigationManager.toSettings(getContext());break;
103 | case R.id.nav_quit:
104 | ((Activity)getContext()).finish();break;
105 | default:break;
106 | }
107 | RxBus.getBus().post(new CloseDrawerEvent());
108 | return true;
109 | }
110 | };
111 | }
112 |
--------------------------------------------------------------------------------
/app/src/main/java/io/dongyue/gitlabandroid/view/GitlabSwipeRefreshLayout.java:
--------------------------------------------------------------------------------
1 | package io.dongyue.gitlabandroid.view;
2 |
3 | import android.content.Context;
4 | import android.support.v4.widget.SwipeRefreshLayout;
5 | import android.util.AttributeSet;
6 |
7 | import io.dongyue.gitlabandroid.R;
8 |
9 | /**
10 | * Created by Brotherjing on 2016/3/5.
11 | */
12 | public class GitlabSwipeRefreshLayout extends SwipeRefreshLayout {
13 |
14 | public GitlabSwipeRefreshLayout(Context context) {
15 | super(context);
16 | init();
17 | }
18 |
19 | public GitlabSwipeRefreshLayout(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | init();
22 | }
23 |
24 | private void init() {
25 | setColorSchemeResources(R.color.colorPrimary, R.color.colorAccent);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/io/dongyue/gitlabandroid/view/NoScrollViewPager.java:
--------------------------------------------------------------------------------
1 | package io.dongyue.gitlabandroid.view;
2 |
3 | import android.content.Context;
4 | import android.support.v4.view.ViewPager;
5 | import android.util.AttributeSet;
6 | import android.view.MotionEvent;
7 |
8 | /**
9 | * Created by Brotherjing on 2015-11-19.
10 | */
11 | public class NoScrollViewPager extends ViewPager {
12 |
13 | private boolean isCanScroll = false;
14 |
15 | public NoScrollViewPager(Context context) {
16 | super(context);
17 | }
18 |
19 | public NoScrollViewPager(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | }
22 |
23 | public void setScanScroll(boolean isCanScroll) {
24 | this.isCanScroll = isCanScroll;
25 | }
26 |
27 | @Override
28 | public void scrollTo(int x, int y) {
29 | super.scrollTo(x, y);
30 | }
31 |
32 | @Override
33 | public boolean onTouchEvent(MotionEvent arg0) {
34 | // TODO Auto-generated method stub
35 | if (isCanScroll) {
36 | return super.onTouchEvent(arg0);
37 | } else {
38 | return false;
39 | }
40 |
41 | }
42 |
43 | @Override
44 | public void setCurrentItem(int item, boolean smoothScroll) {
45 | // TODO Auto-generated method stub
46 | super.setCurrentItem(item, smoothScroll);
47 | }
48 |
49 | @Override
50 | public void setCurrentItem(int item) {
51 | // TODO Auto-generated method stub
52 | super.setCurrentItem(item);
53 | }
54 |
55 | @Override
56 | public boolean onInterceptTouchEvent(MotionEvent arg0) {
57 | // TODO Auto-generated method stub
58 | if (isCanScroll) {
59 | return super.onInterceptTouchEvent(arg0);
60 | } else {
61 | return false;
62 | }
63 |
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/do_nothing.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_file_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_folder_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-hdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_repo_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-hdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_unknown_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-mdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-mdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_info_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_sync_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xhdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xxhdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/drawable-xxxhdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_issue.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
13 |
14 |
16 |
17 |
19 |
20 |
22 |
23 |
27 |
28 |
29 |
30 |
32 |
33 |
39 |
40 |
41 |
42 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_my_activites.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_project.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
35 |
38 |
39 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_user_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_welcome.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
9 |
13 |
14 |
16 |
18 |
19 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
11 |
12 |
15 |
16 |
17 |
18 |
23 |
24 |
27 |
28 |
32 |
33 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_issue.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
19 |
20 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_my_activites.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_user_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_activities.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_overview.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
14 |
15 |
19 |
20 |
21 |
25 |
26 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_project.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_project_commits.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_projects.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_entry.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
28 |
29 |
37 |
38 |
46 |
47 |
55 |
56 |
57 |
58 |
59 |
60 |
65 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_issue.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
22 |
30 |
31 |
35 |
45 |
46 |
47 |
56 |
57 |
62 |
63 |
68 |
69 |
75 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
92 |
93 |
94 |
95 |
100 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_project.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
25 |
26 |
32 |
33 |
34 |
35 |
43 |
44 |
54 |
55 |
65 |
66 |
67 |
68 |
73 |
74 |
75 |
76 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_project_commit.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
24 |
25 |
31 |
32 |
33 |
34 |
42 |
43 |
53 |
54 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
76 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
15 |
16 |
20 |
21 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_issue.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
15 |
16 |
19 |
20 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/simple_list_item_1_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tab_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
17 |
18 |
24 |
25 |
26 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activity_home_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
9 |
11 |
12 |
13 | -
14 |
15 |
17 |
19 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/home.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_project.xml:
--------------------------------------------------------------------------------
1 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_user_info.xml:
--------------------------------------------------------------------------------
1 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 | >
2 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #cccccc
8 |
9 | #66000000
10 | #ffffff
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 | 16dp
7 | 160dp
8 | 16dp
9 | 8dp
10 | 180dp
11 | 16dp
12 |
13 | 40dp
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 网络没有连接
5 | 无法连接到服务器
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
15 |
16 |
17 |
18 |
25 |
26 |
30 |
31 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_data_sync.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_general.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
20 |
21 |
23 |
24 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
13 |
14 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_notification.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/test/java/io/dongyue/gitlabandroid/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package io.dongyue.gitlabandroid;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.0'
9 |
10 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
11 | classpath 'me.tatarka:gradle-retrolambda:3.2.0'
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | jcenter()
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/gitlab-android.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dyweb/gitlab-android/bd8286ecbd69c3393e1968ce600df158cdbf1ecc/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Mar 04 22:48:55 CST 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------