1 /* ownCloud Android client application
2 * Copyright (C) 2012 Bartek Przybylski
3 * Copyright (C) 2012-2013 ownCloud Inc.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2,
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 package com
.owncloud
.android
.extensions
;
21 import com
.owncloud
.android
.Log_OC
;
22 import com
.owncloud
.android
.R
;
23 import android
.content
.Intent
;
24 import android
.os
.Bundle
;
25 import android
.support
.v4
.app
.DialogFragment
;
26 import android
.util
.Log
;
27 import android
.view
.LayoutInflater
;
28 import android
.view
.View
;
29 import android
.view
.ViewGroup
;
30 import android
.view
.View
.OnClickListener
;
31 import android
.widget
.Button
;
33 public class ExtensionsAvailableDialog
extends DialogFragment
implements
36 public ExtensionsAvailableDialog() {
40 public View
onCreateView(LayoutInflater inflater
, ViewGroup container
,
41 Bundle savedInstanceState
) {
42 View view
= inflater
.inflate(R
.layout
.extensions_available_dialog
,
44 Button btnYes
= (Button
) view
.findViewById(R
.id
.buttonYes
);
45 Button btnNo
= (Button
) view
.findViewById(R
.id
.buttonNo
);
46 btnYes
.setOnClickListener(this);
47 btnNo
.setOnClickListener(this);
48 getDialog().setTitle(R
.string
.extensions_avail_title
);
53 public void onClick(View v
) {
55 case R
.id
.buttonYes
: {
56 Intent i
= new Intent(getActivity(), ExtensionsListActivity
.class);
58 getActivity().finish();
62 getActivity().finish();
65 Log_OC
.e("EAD", "Button with unknown id clicked " + v
.getId());