app/src/main/java/net/nashlegend/sourcewall/data/ChannelHelper.java

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package net.nashlegend.sourcewall.data;

import net.nashlegend.sourcewall.App;
import net.nashlegend.sourcewall.R;
import net.nashlegend.sourcewall.data.database.AskTagHelper;
import net.nashlegend.sourcewall.data.database.BasketHelper;
import net.nashlegend.sourcewall.data.database.GroupHelper;
import net.nashlegend.sourcewall.model.SubItem;
import net.nashlegend.sourcewall.request.api.UserAPI;

import java.util.ArrayList;
import java.util.Collections;

/**
 * Created by NashLegend on 2015/1/9 0009
 * 用户操作读取主题站、小组、问答的频道
 */
public class ChannelHelper {

    public static SubItem getBasketGroup() {
        return new SubItem(SubItem.Section_Favor, SubItem.Type_Group, App.getApp().getResources().getString(R.string.baskets), "Baskets");
    }

    public static ArrayList<SubItem> getSections() {
        SubItem[] items = {
                new SubItem(SubItem.Section_Article, SubItem.Type_Group, App.getApp().getResources().getString(R.string.article), "Article"),
                new SubItem(SubItem.Section_Post, SubItem.Type_Group, App.getApp().getResources().getString(R.string.post), "Post"),
                new SubItem(SubItem.Section_Question, SubItem.Type_Group, App.getApp().getResources().getString(R.string.question), "Question")
        };
        ArrayList<SubItem> subItems = new ArrayList<>();
        Collections.addAll(subItems, items);
        return subItems;
    }

    public static ArrayList<SubItem> getArticles() {
        SubItem[] items = {
                new SubItem(SubItem.Section_Article, SubItem.Type_Collections, "科学人", ""),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "热点", "hot"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "前沿", "frontier"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "评论", "review"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "专访", "interview"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "视觉", "visual"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "速读", "brief"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "谣言粉碎机", "fact"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Single_Channel, "商业科技", "techb"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "物理", "physics"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "生物", "biology"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "环境", "environment"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "天文", "astronomy"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "医学", "medicine"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "食物", "food"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "法证", "forensic"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "性情", "sex"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "地学", "earth"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "心理", "psychology"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "化学", "chemistry"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "科幻", "sci-fiction"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "数学", "math"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "DIY", "diy"),
                new SubItem(SubItem.Section_Article, SubItem.Type_Subject_Channel, "农学", "agronomy"),
后面还有 98 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。