1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.exoplatform.ui;
20
21 import org.exoplatform.R;
22 import org.exoplatform.controller.document.DocumentActionAdapter;
23 import org.exoplatform.model.ExoFile;
24
25 import android.annotation.SuppressLint;
26 import android.app.Dialog;
27 import android.view.Window;
28 import android.widget.ListView;
29 import android.widget.TextView;
30
31
32 public class DocumentActionDialog extends Dialog {
33
34 private ListView _listViewFileAction;
35
36
37 private TextView _txtvFileName;
38
39
40 public ExoFile myFile;
41
42
43 public DocumentActionAdapter _documentActionAdapter;
44
45
46 @SuppressLint("Instantiatable")
47 public DocumentActionDialog(DocumentActivity context, ExoFile file, boolean isActBar) {
48
49 super(context);
50
51 requestWindowFeature(Window.FEATURE_NO_TITLE);
52 setContentView(R.layout.exofileaction);
53
54 setCanceledOnTouchOutside(true);
55
56 myFile = file;
57
58 _documentActionAdapter = new DocumentActionAdapter(context, this, myFile, isActBar);
59
60 init();
61
62 setTileForDialog(myFile.name);
63
64 }
65
66 public void setTileForDialog(String title) {
67 _txtvFileName.setText(title);
68 }
69
70 private void init() {
71
72 _listViewFileAction = (ListView) findViewById(R.id.ListView0_FileAction);
73
74 _txtvFileName = (TextView) findViewById(R.id.TextView_Title);
75
76 setDocumentActionAdapter();
77
78 }
79
80 public void setDocumentActionAdapter() {
81 _listViewFileAction.setAdapter(_documentActionAdapter);
82 }
83
84 }