diff options
author | Iain Billett <Iain@Iains-MacBook-Pro.local> | 2012-06-15 23:18:39 +0100 |
---|---|---|
committer | Iain Billett <Iain@Iains-MacBook-Pro.local> | 2012-06-15 23:18:39 +0100 |
commit | 907ad314fb05a06cfeb233bd4265a461e7a5e0e5 (patch) | |
tree | 51846784305fba95c99edcf1a576539e3aaa1697 /android/experimental | |
parent | 889ff81df60fd13a4e121536e86d84147fc29b02 (diff) |
Some UI tweeks - trying to get long filenames to display nicely.
Diffstat (limited to 'android/experimental')
3 files changed, 23 insertions, 14 deletions
diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml index a53bc1b57b2b..ce42e577fa95 100644 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml +++ b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml @@ -21,7 +21,9 @@ android:paddingLeft="10dp" android:paddingRight="10dp" android:layout_gravity="center" - android:textSize="15dp" > + android:textSize="15dp" + android:textStyle="bold" + android:maxLines="2"> </TextView> </LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml index 1a424ee0a950..0bff445659a0 100644 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml +++ b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml @@ -12,31 +12,30 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="48dp" - android:orientation="horizontal" - android:layout_weight="3"> + android:orientation="horizontal"> <TextView android:id="@+id/file_list_item_name" android:layout_height="48dp" - android:layout_width="match_parent" - android:textSize="16dp" + android:layout_width="0dp" + android:textSize="15dp" android:textStyle="bold" - android:layout_weight="1" + android:layout_weight="2" android:gravity="center"/> <TextView android:id="@+id/file_list_item_size" android:layout_height="48dp" - android:layout_width="match_parent" - android:textSize="16dp" + android:layout_width="0dp" + android:textSize="15dp" android:textStyle="bold" android:layout_weight="1" android:gravity="center"/> <TextView android:id="@+id/file_list_item_date" android:layout_height="48dp" - android:layout_width="match_parent" - android:textSize="16dp" + android:layout_width="0dp" + android:textSize="15dp" android:textStyle="bold" - android:layout_weight="1" + android:layout_weight="2" android:gravity="center"/> </LinearLayout> </LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java index 7b178f107f35..330ffc54aab2 100644 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -74,11 +74,17 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe homeDirectory = new File(Environment.getExternalStorageDirectory(),"LibreOffice"); homeDirectory.mkdirs(); + currentDirectory = homeDirectory; Intent i = this.getIntent(); if( i.hasExtra( currentDirectoryKey ) ){ currentDirectory = new File( i.getStringExtra( currentDirectoryKey ) ); }else{ - currentDirectory = homeDirectory; + if( savedInstanceState != null){ + if( savedInstanceState.getString( currentDirectoryKey ) != null ){ + currentDirectory = new File( + savedInstanceState.getString( currentDirectoryKey ) ); + } + } } if( i.hasExtra( filterModeKey ) ){ @@ -88,7 +94,7 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe actionBar.setDisplayHomeAsUpEnabled(true); } - + //createDummyFileSystem(); createUI(); } @@ -251,6 +257,7 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe File regularDirectory = new File( currentDirectory , "Folder" ); regularDirectory.mkdir(); new File( regularDirectory , "yetAnotherDoc.odt" ).createNewFile(); + new File( regularDirectory , "some really long file name.ods" ).createNewFile(); File anotherRegularDirectory = new File( regularDirectory , "AnotherFolder" ); anotherRegularDirectory.mkdir(); new File( anotherRegularDirectory , "yetAnotherDoc2.odt" ).createNewFile(); @@ -293,7 +300,8 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe openDirectory( currentDirectory );// Uses filter mode return true; } - class ListItemAdapter implements ListAdapter{ + +class ListItemAdapter implements ListAdapter{ private Context mContext; private File[] filePaths; private final long KB = 1024; |