Kaydet (Commit) a84eb85c authored tarafından Iain Billett's avatar Iain Billett

Fixed file opening.

üst cdea32dd
...@@ -102,6 +102,8 @@ public class DocumentLoader ...@@ -102,6 +102,8 @@ public class DocumentLoader
ViewGroup.LayoutParams matchParent; ViewGroup.LayoutParams matchParent;
ViewFlipper flipper; ViewFlipper flipper;
Bundle extras;
class GestureListener class GestureListener
extends GestureDetector.SimpleOnGestureListener extends GestureDetector.SimpleOnGestureListener
...@@ -510,6 +512,8 @@ public class DocumentLoader ...@@ -510,6 +512,8 @@ public class DocumentLoader
{ {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
extras = getIntent().getExtras();
gestureDetector = new GestureDetector(this, new GestureListener()); gestureDetector = new GestureDetector(this, new GestureListener());
try { try {
...@@ -591,6 +595,21 @@ public class DocumentLoader ...@@ -591,6 +595,21 @@ public class DocumentLoader
{ {
return gestureDetector.onTouchEvent(event); return gestureDetector.onTouchEvent(event);
} }
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// app icon in action bar clicked; go home
Intent intent = new Intent(this, LibreOfficeUIActivity.class);
intent.putExtras( extras );
//intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
} }
// vim:set shiftwidth=4 softtabstop=4 expandtab: // vim:set shiftwidth=4 softtabstop=4 expandtab:
...@@ -167,7 +167,9 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe ...@@ -167,7 +167,9 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe
i.putExtra( EXPLORER_VIEW_TYPE_KEY , viewMode ); i.putExtra( EXPLORER_VIEW_TYPE_KEY , viewMode );
startActivity( i ); startActivity( i );
*/ */
startActivity( new Intent( this , DocumentLoader.class ) ); Intent i = new Intent( this , DocumentLoader.class );
i.putExtra("input",new File( currentDirectory , file).getAbsolutePath() );
startActivity( i );
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment