Merge branch 'bug_hunting' into feature_previews
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / FailedUploadActivity.java
1 package com.owncloud.android.ui.activity;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5 import android.view.View;
6 import android.view.View.OnClickListener;
7 import android.widget.Button;
8 import android.widget.TextView;
9
10 import com.owncloud.android.R;
11
12 /**
13 * This Activity is used to display a detail message for failed uploads
14 *
15 * The entry-point for this activity is the 'Failed upload Notification"
16 *
17 *
18 * @author andomaex / Matthias Baumann
19 *
20 * This program is free software: you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation, either version 3 of the License, or (at
23 * your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful, but
26 * WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * General Public License for more de/
29 */
30 public class FailedUploadActivity extends Activity {
31
32 public static final String MESSAGE = "message";
33
34 @Override
35 public void onCreate(Bundle savedInstanceState) {
36 super.onCreate(savedInstanceState);
37 setContentView(R.layout.failed_upload_message_view);
38 String message = getIntent().getStringExtra(MESSAGE);
39 TextView textView = (TextView) findViewById(R.id.faild_upload_message);
40 textView.setText(message);
41 Button close_button = (Button) findViewById(R.id.failed_uploadactivity_close_button);
42 close_button.setOnClickListener(new OnClickListener() {
43 @Override
44 public void onClick(View v) {
45 finish();
46 }
47 });
48 }
49 }