Skip to content

Commit 828392b

Browse files
committed
结构调整
1 parent 3b33708 commit 828392b

10 files changed

Lines changed: 102 additions & 9 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2017 GcsSloop
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* Last modified 2017-04-09 21:20:23
17+
*
18+
* GitHub: https://github.com/GcsSloop
19+
* Website: http://www.gcssloop.com
20+
* Weibo: http://weibo.com/GcsSloop
21+
*/
22+
23+
package com.gcssloop.diycode.fragment;
24+
25+
import android.content.Context;
26+
import android.support.annotation.NonNull;
27+
import android.support.v7.widget.RecyclerView;
28+
29+
import com.gcssloop.diycode.fragment.base.SimpleRefreshRecyclerFragment;
30+
import com.gcssloop.diycode_sdk.api.notifications.bean.Notification;
31+
import com.gcssloop.diycode_sdk.api.notifications.event.GetNotificationsListEvent;
32+
import com.gcssloop.recyclerview.adapter.multitype.HeaderFooterAdapter;
33+
34+
public class NotificationsFragment extends SimpleRefreshRecyclerFragment<Notification,
35+
GetNotificationsListEvent> {
36+
@Override public void initData(HeaderFooterAdapter adapter) {
37+
38+
}
39+
40+
@Override
41+
protected void setRecyclerViewAdapter(Context context, RecyclerView recyclerView,
42+
HeaderFooterAdapter adapter) {
43+
44+
}
45+
46+
@NonNull @Override protected String request(int offset, int limit) {
47+
return mDiycode.getNotificationsList(offset, limit);
48+
}
49+
}

diycode-app/src/main/java/com/gcssloop/diycode/fragment/SitesListFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
import android.support.v7.widget.RecyclerView;
3030

3131
import com.gcssloop.diycode.fragment.base.RefreshRecyclerFragment;
32-
import com.gcssloop.diycode.fragment.provider.SiteItem;
32+
import com.gcssloop.diycode.fragment.bean.SiteItem;
3333
import com.gcssloop.diycode.fragment.provider.SiteProvider;
34-
import com.gcssloop.diycode.fragment.provider.SitesItem;
34+
import com.gcssloop.diycode.fragment.bean.SitesItem;
3535
import com.gcssloop.diycode.fragment.provider.SitesProvider;
3636
import com.gcssloop.diycode_sdk.api.sites.bean.Sites;
3737
import com.gcssloop.diycode_sdk.api.sites.event.GetSitesEvent;

diycode-app/src/main/java/com/gcssloop/diycode/fragment/base/RefreshRecyclerFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
import com.gcssloop.diycode.R;
3333
import com.gcssloop.diycode.base.app.ViewHolder;
34-
import com.gcssloop.diycode.fragment.provider.Footer;
34+
import com.gcssloop.diycode.fragment.bean.Footer;
3535
import com.gcssloop.diycode.fragment.provider.FooterProvider;
3636
import com.gcssloop.diycode_sdk.api.base.event.BaseEvent;
3737
import com.gcssloop.recyclerview.adapter.multitype.HeaderFooterAdapter;

diycode-app/src/main/java/com/gcssloop/diycode/fragment/provider/Footer.java renamed to diycode-app/src/main/java/com/gcssloop/diycode/fragment/bean/Footer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*
16-
* Last modified 2017-04-08 21:53:28
16+
* Last modified 2017-04-09 21:22:33
1717
*
1818
* GitHub: https://github.com/GcsSloop
1919
* Website: http://www.gcssloop.com
2020
* Weibo: http://weibo.com/GcsSloop
2121
*/
2222

23-
package com.gcssloop.diycode.fragment.provider;
23+
package com.gcssloop.diycode.fragment.bean;
2424

2525
public class Footer {
2626
}

diycode-app/src/main/java/com/gcssloop/diycode/fragment/provider/SiteItem.java renamed to diycode-app/src/main/java/com/gcssloop/diycode/fragment/bean/SiteItem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*
16-
* Last modified 2017-04-09 14:31:47
16+
* Last modified 2017-04-09 21:22:37
1717
*
1818
* GitHub: https://github.com/GcsSloop
1919
* Website: http://www.gcssloop.com
2020
* Weibo: http://weibo.com/GcsSloop
2121
*/
2222

23-
package com.gcssloop.diycode.fragment.provider;
23+
package com.gcssloop.diycode.fragment.bean;
2424

2525
import java.io.Serializable;
2626

diycode-app/src/main/java/com/gcssloop/diycode/fragment/provider/SitesItem.java renamed to diycode-app/src/main/java/com/gcssloop/diycode/fragment/bean/SitesItem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*
16-
* Last modified 2017-04-09 14:31:47
16+
* Last modified 2017-04-09 21:22:43
1717
*
1818
* GitHub: https://github.com/GcsSloop
1919
* Website: http://www.gcssloop.com
2020
* Weibo: http://weibo.com/GcsSloop
2121
*/
2222

23-
package com.gcssloop.diycode.fragment.provider;
23+
package com.gcssloop.diycode.fragment.bean;
2424

2525
import java.io.Serializable;
2626

diycode-app/src/main/java/com/gcssloop/diycode/fragment/provider/FooterProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import android.widget.TextView;
2929

3030
import com.gcssloop.diycode.R;
31+
import com.gcssloop.diycode.fragment.bean.Footer;
3132
import com.gcssloop.recyclerview.adapter.base.RecyclerViewHolder;
3233
import com.gcssloop.recyclerview.adapter.multitype.BaseViewProvider;
3334

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2017 GcsSloop
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* Last modified 2017-04-09 21:22:01
17+
*
18+
* GitHub: https://github.com/GcsSloop
19+
* Website: http://www.gcssloop.com
20+
* Weibo: http://weibo.com/GcsSloop
21+
*/
22+
23+
package com.gcssloop.diycode.fragment.provider;
24+
25+
import android.content.Context;
26+
import android.support.annotation.NonNull;
27+
28+
import com.gcssloop.diycode.R;
29+
import com.gcssloop.diycode_sdk.api.notifications.bean.Notification;
30+
import com.gcssloop.recyclerview.adapter.base.RecyclerViewHolder;
31+
import com.gcssloop.recyclerview.adapter.multitype.BaseViewProvider;
32+
33+
public class NotificationsProvider extends BaseViewProvider<Notification> {
34+
public NotificationsProvider(@NonNull Context context) {
35+
super(context, R.layout.item_notification);
36+
}
37+
38+
@Override public void onBindView(RecyclerViewHolder holder, Notification bean) {
39+
40+
}
41+
}

diycode-app/src/main/java/com/gcssloop/diycode/fragment/provider/SiteProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import com.bumptech.glide.Glide;
3131
import com.gcssloop.diycode.R;
32+
import com.gcssloop.diycode.fragment.bean.SiteItem;
3233
import com.gcssloop.diycode.utils.IntentUtil;
3334
import com.gcssloop.recyclerview.adapter.base.RecyclerViewHolder;
3435
import com.gcssloop.recyclerview.adapter.multitype.BaseViewProvider;

diycode-app/src/main/java/com/gcssloop/diycode/fragment/provider/SitesProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import android.support.annotation.NonNull;
2727

2828
import com.gcssloop.diycode.R;
29+
import com.gcssloop.diycode.fragment.bean.SitesItem;
2930
import com.gcssloop.recyclerview.adapter.base.RecyclerViewHolder;
3031
import com.gcssloop.recyclerview.adapter.multitype.BaseViewProvider;
3132

0 commit comments

Comments
 (0)