Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Generally make the Android UI better.
- Loading branch information
1 parent
453fdff
commit bd72e13
Showing
17 changed files
with
705 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,4 @@ | |
|
|
||
| # Project target. | ||
| target=android-17 | ||
| android.library.reference.1=../../Externals/android-menudrawer/library | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:layout_width="fill_parent" | ||
| android:layout_height="fill_parent" | ||
| android:orientation="vertical" > | ||
|
|
||
| <LinearLayout | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" > | ||
|
|
||
| <LinearLayout | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical" > | ||
|
|
||
| <LinearLayout | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" > | ||
| </LinearLayout> | ||
|
|
||
| <TextView | ||
| android:id="@+id/TextView01" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginLeft="5dip" | ||
| android:layout_marginTop="5dip" | ||
| android:singleLine="true" | ||
| android:text="@+id/TextView01" | ||
| android:textStyle="bold" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/TextView02" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginLeft="10dip" | ||
| android:text="@+id/TextView02" /> | ||
|
|
||
| </LinearLayout> | ||
|
|
||
| </LinearLayout> | ||
|
|
||
|
|
||
|
|
||
| </LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical" > | ||
|
|
||
| </LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,42 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:layout_width="fill_parent" | ||
| android:layout_height="wrap_content" | ||
| android:layout_height="fill_parent" | ||
| android:orientation="vertical" > | ||
|
|
||
| <TextView | ||
| android:id="@+id/TextView01" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginLeft="5dip" | ||
| android:layout_marginTop="5dip" | ||
| android:singleLine="true" | ||
| android:text="@+id/TextView01" | ||
| android:textStyle="bold" > | ||
| </TextView> | ||
|
|
||
| <TextView | ||
| android:id="@+id/TextView02" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginLeft="10dip" | ||
| android:text="@+id/TextView02" > | ||
| </TextView> | ||
| <LinearLayout | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" > | ||
|
|
||
| <ImageView | ||
| android:id="@+id/imageView1" | ||
| android:layout_width="96dp" | ||
| android:layout_height="match_parent" /> | ||
|
|
||
| <LinearLayout | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical" > | ||
|
|
||
| <TextView | ||
| android:id="@+id/TextView01" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginLeft="5dip" | ||
| android:layout_marginTop="5dip" | ||
| android:singleLine="true" | ||
| android:text="@+id/TextView01" | ||
| android:textStyle="bold" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/TextView02" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginLeft="10dip" | ||
| android:text="@+id/TextView02" /> | ||
|
|
||
| </LinearLayout> | ||
|
|
||
| </LinearLayout> | ||
|
|
||
| </LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:layout_width="fill_parent" | ||
| android:layout_height="fill_parent" | ||
| android:gravity="left" | ||
| android:orientation="vertical" > | ||
|
|
||
| <LinearLayout | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" > | ||
|
|
||
| <LinearLayout | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical" > | ||
|
|
||
| <TextView | ||
| android:id="@+id/TextView01" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginLeft="5dip" | ||
| android:layout_marginTop="5dip" | ||
| android:singleLine="true" | ||
| android:text="@+id/TextView01" | ||
| android:textAppearance="?android:attr/textAppearanceLarge" | ||
| android:textStyle="bold" /> | ||
|
|
||
| </LinearLayout> | ||
| </LinearLayout> | ||
|
|
||
| </LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| package org.dolphinemu.dolphinemu; | ||
|
|
||
| import java.io.File; | ||
| import java.util.ArrayList; | ||
| import java.util.Collections; | ||
| import java.util.List; | ||
|
|
||
| import net.simonvt.menudrawer.MenuDrawer; | ||
|
|
||
| import android.app.Activity; | ||
| import android.app.ListActivity; | ||
| import android.content.Intent; | ||
| import android.os.Bundle; | ||
| import android.os.Environment; | ||
| import android.view.Gravity; | ||
| import android.view.LayoutInflater; | ||
| import android.view.MenuItem; | ||
| import android.view.View; | ||
| import android.view.ViewGroup; | ||
| import android.widget.AdapterView; | ||
| import android.widget.AdapterView.OnItemLongClickListener; | ||
| import android.widget.BaseAdapter; | ||
| import android.widget.LinearLayout; | ||
| import android.widget.ListView; | ||
| import android.widget.TextView; | ||
| import android.widget.Toast; | ||
|
|
||
| public class FolderBrowser extends ListActivity { | ||
| private GameListAdapter adapter; | ||
| private static File currentDir = null; | ||
| private void Fill(File f) | ||
| { | ||
| File[]dirs = f.listFiles(); | ||
| this.setTitle("Current Dir: " + f.getName()); | ||
| List<GameListItem>dir = new ArrayList<GameListItem>(); | ||
| List<GameListItem>fls = new ArrayList<GameListItem>(); | ||
|
|
||
| try | ||
| { | ||
| for(File ff: dirs) | ||
| { | ||
| if (ff.getName().charAt(0) != '.') | ||
| if(ff.isDirectory()) | ||
| dir.add(new GameListItem(getApplicationContext(), ff.getName(),"Folder",ff.getAbsolutePath())); | ||
| else | ||
| if (ff.getName().toLowerCase().contains(".gcm") || | ||
| ff.getName().toLowerCase().contains(".iso") || | ||
| ff.getName().toLowerCase().contains(".wbfs") || | ||
| ff.getName().toLowerCase().contains(".gcz") || | ||
| ff.getName().toLowerCase().contains(".dol") || | ||
| ff.getName().toLowerCase().contains(".elf")) | ||
| fls.add(new GameListItem(getApplicationContext(), ff.getName(),"File Size: "+ff.length(),ff.getAbsolutePath())); | ||
| } | ||
| } | ||
| catch(Exception e) | ||
| { | ||
| } | ||
|
|
||
| Collections.sort(dir); | ||
| Collections.sort(fls); | ||
| dir.addAll(fls); | ||
| if (!f.getName().equalsIgnoreCase("sdcard")) | ||
| dir.add(0, new GameListItem(getApplicationContext(), "..", "Parent Directory", f.getParent())); | ||
|
|
||
| adapter = new GameListAdapter(this,R.layout.folderbrowser,dir); | ||
| this.setListAdapter(adapter); | ||
| } | ||
|
|
||
| @Override | ||
| protected void onListItemClick(ListView l, View v, int position, long id) { | ||
| // TODO Auto-generated method stub | ||
| super.onListItemClick(l, v, position, id); | ||
| GameListItem o = adapter.getItem(position); | ||
| if(o.getData().equalsIgnoreCase("folder")||o.getData().equalsIgnoreCase("parent directory")){ | ||
| currentDir = new File(o.getPath()); | ||
| Fill(currentDir); | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public void onCreate(Bundle savedInstanceState) | ||
| { | ||
| super.onCreate(savedInstanceState); | ||
|
|
||
| if(currentDir == null) | ||
| currentDir = new File(Environment.getExternalStorageDirectory().getPath()); | ||
| Fill(currentDir); | ||
| } | ||
| @Override | ||
| public void onBackPressed() { | ||
| Intent intent = new Intent(); | ||
| intent.putExtra("Select", currentDir.getPath()); | ||
| setResult(Activity.RESULT_OK, intent); | ||
|
|
||
| this.finish(); | ||
| super.onBackPressed(); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.