コード例 #1
0
ファイル: Main.java プロジェクト: cpm2710/cellbank
  // ** Called when the activity is first created. *//*
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE); // 隐藏标题
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN); // 设置全屏

    nameHeaderUrlList = new ArrayList<NameHeaderUrlPair>();

    if (apiKey == null || apiSecret == null) {
      Util.showAlert(this, "警告", "人人应用的apiKey和apiSecret必须提供!");
    }

    setContentView(R.layout.main);

    ratingBar = (RatingBar) findViewById(R.id.levelBar);
    ratingBar.setMax(6);
    ratingBar.setNumStars(3);
    ratingBar.setStepSize((float) 0.5);
    ratingBar.setRating((float) 1.5);
    initialRenRen();
    /*Spinner s = (Spinner) findViewById(R.id.friendNumerSpin);
    String []friendNumber=new String[]{"好友人数:10","好友人数:20","好友人数:50","所有好友"};
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
    		android.R.layout.simple_spinner_item, friendNumber);
    s.setAdapter(adapter);*/

  }
コード例 #2
0
 @Override
 public void onHttpError(int errorCode, String description, String failingUrl) {
   super.onHttpError(errorCode, description, failingUrl);
   Util.showAlert(
       example,
       "Feed HttpError 提示",
       "HttpError errorCode: "
           + errorCode
           + " errorMsg:"
           + description
           + " failurl:"
           + failingUrl);
 }
コード例 #3
0
 @Override
 public void onCancel(Bundle values) {
   super.onCancel(values);
   Util.showAlert(example, "Feed Cancel 提示", "用户放弃发新鲜事");
 }
コード例 #4
0
 @Override
 public void onRenrenError(RenrenError renrenError) {
   super.onRenrenError(renrenError);
   Util.showAlert(example, "Feed RenrenError 提示", "RenrenError:" + renrenError);
 }
コード例 #5
0
 @Override
 public void onComplete(Bundle values) {
   super.onComplete(values);
   Util.showAlert(example, "Feed Complete 提示", "发新鲜事完成");
 }