Fixed file opening.
This commit is contained in:
@@ -102,6 +102,8 @@ public class DocumentLoader
|
||||
ViewGroup.LayoutParams matchParent;
|
||||
|
||||
ViewFlipper flipper;
|
||||
|
||||
Bundle extras;
|
||||
|
||||
class GestureListener
|
||||
extends GestureDetector.SimpleOnGestureListener
|
||||
@@ -510,6 +512,8 @@ public class DocumentLoader
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
extras = getIntent().getExtras();
|
||||
|
||||
gestureDetector = new GestureDetector(this, new GestureListener());
|
||||
|
||||
try {
|
||||
@@ -591,6 +595,21 @@ public class DocumentLoader
|
||||
{
|
||||
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:
|
||||
|
@@ -167,7 +167,9 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe
|
||||
i.putExtra( EXPLORER_VIEW_TYPE_KEY , viewMode );
|
||||
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
|
||||
|
Reference in New Issue
Block a user