Пример #1
0
  public static SqliteUtility getTimelineSqlite() {
    if (SqliteUtility.getInstance("sina_timeline_db") == null)
      new SqliteUtilityBuilder()
          .configDBName("sina_timeline_db")
          .build(GlobalContext.getInstance());

    return SqliteUtility.getInstance("sina_timeline_db");
  }
Пример #2
0
 @Override
 protected HttpConfig configHttpConfig() {
   HttpConfig httpConfig = new HttpConfig();
   //		httpConfig.baseUrl = getSetting("meizt_base_url").getValue();
   httpConfig.contentType = "application/x-www-form-urlencoded";
   httpConfig.cookie =
       String.format("pck=%s;", GlobalContext.getInstance().getPackageName().replace(".", "_"));
   return httpConfig;
 }
Пример #3
0
  public static ABaseFragment newInstance() {
    FavoritesFragment fragment = new FavoritesFragment();

    TimelineGroupBean bean = new TimelineGroupBean();
    bean.setGroup("7");
    bean.setTitle(GlobalContext.getInstance().getResources().getString(R.string.draw_fav_title));
    bean.setType("7");

    Bundle args = new Bundle();
    args.putSerializable("bean", bean);
    fragment.setArguments(args);

    return fragment;
  }
Пример #4
0
 public static void login() {
   Intent intent = new Intent(GlobalContext.getInstance(), MainActivity.class);
   intent.setAction(ACTION_LOGIN);
   intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
   GlobalContext.getInstance().startActivity(intent);
 }