File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
java/io/neurolab/activities Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 7
7
import android .support .v7 .app .AppCompatActivity ;
8
8
import android .support .v7 .widget .LinearLayoutManager ;
9
9
import android .support .v7 .widget .RecyclerView ;
10
+ import android .view .Menu ;
11
+ import android .view .MenuItem ;
10
12
import android .view .View ;
11
13
import android .widget .TextView ;
12
14
import java .io .File ;
@@ -87,6 +89,22 @@ private void showLoggedDataList(File appDir) {
87
89
}
88
90
}
89
91
92
+ @ Override
93
+ public boolean onCreateOptionsMenu (Menu menu ) {
94
+ getMenuInflater ().inflate (R .menu .share_menu , menu );
95
+ return true ;
96
+ }
97
+
98
+ @ Override
99
+ public boolean onOptionsItemSelected (MenuItem item ) {
100
+ switch (item .getItemId ()) {
101
+ case R .id .share :
102
+ startActivity (new Intent (this ,ShareDataActivity .class ));
103
+ default :
104
+ return super .onOptionsItemSelected (item );
105
+ }
106
+ }
107
+
90
108
public void clearRedundantFiles () {
91
109
filesList .clear ();
92
110
fileList .clear ();
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <menu xmlns : android =" http://schemas.android.com/apk/res/android"
3
+ xmlns : app =" http://schemas.android.com/apk/res-auto" >
4
+ <item
5
+ android : id =" @+id/share"
6
+ android : icon =" @android:drawable/ic_menu_share"
7
+ android : title =" Share"
8
+ app : showAsAction =" always"
9
+ app : actionProviderClass =" android.support.v4.view.ActionProvider" />
10
+ </menu >
You can’t perform that action at this time.
0 commit comments