Merge pull request #1415 from reicast/ac/theme-a-palooza
[DO NOT MERGE] Continuation of (I don't know the numbers)
|
@ -259,24 +259,33 @@ public class FileBrowser extends Fragment {
|
|||
|
||||
@Override
|
||||
protected void onPostExecute(List<File> items) {
|
||||
if (items != null && !items.isEmpty()) {
|
||||
LinearLayout list = (LinearLayout) browser.get().getActivity().findViewById(R.id.game_list);
|
||||
if (list.getChildCount() > 0) {
|
||||
list.removeAllViews();
|
||||
}
|
||||
LinearLayout list = (LinearLayout) browser.get().getActivity().findViewById(R.id.game_list);
|
||||
if (list.getChildCount() > 0) {
|
||||
list.removeAllViews();
|
||||
}
|
||||
|
||||
String heading = browser.get().getActivity().getString(R.string.games_listing);
|
||||
browser.get().createListHeader(heading, list, array == R.array.images);
|
||||
String heading = browser.get().getActivity().getString(R.string.games_listing);
|
||||
browser.get().createListHeader(heading, list, array == R.array.images);
|
||||
if (items != null && !items.isEmpty()) {
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
browser.get().createListItem(list, items.get(i), i, array == R.array.images);
|
||||
}
|
||||
list.invalidate();
|
||||
} else if (browser.get().searchQuery == null) {
|
||||
|
||||
} else if (browser.get().searchQuery != null) {
|
||||
final View childview = browser.get().getActivity().getLayoutInflater().inflate(
|
||||
R.layout.browser_fragment_item, null, false);
|
||||
((TextView) childview.findViewById(R.id.item_name)).setText(R.string.no_games);
|
||||
((ImageView) childview.findViewById(R.id.item_icon))
|
||||
.setImageResource(R.mipmap.disk_missing);
|
||||
list.addView(childview);
|
||||
|
||||
} else {
|
||||
browser.get().browseStorage(array == R.array.images);
|
||||
}
|
||||
list.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void browseStorage(boolean images) {
|
||||
if (images) {
|
||||
(new navigate(this)).executeOnExecutor(
|
||||
|
@ -285,15 +294,15 @@ public class FileBrowser extends Fragment {
|
|||
if (game_directory.equals(sdcard.getAbsolutePath())) {
|
||||
HashSet<String> extStorage = FileBrowser.getExternalMounts();
|
||||
if (extStorage != null && !extStorage.isEmpty()) {
|
||||
for (String sd : extStorage) {
|
||||
String sdCardPath = sd.replace("mnt/media_rw", "storage");
|
||||
if (!sdCardPath.equals(sdcard.getAbsolutePath())) {
|
||||
if (new File(sdCardPath).canRead()) {
|
||||
(new navigate(this)).execute(new File(sdCardPath));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String sd : extStorage) {
|
||||
String sdCardPath = sd.replace("mnt/media_rw", "storage");
|
||||
if (!sdCardPath.equals(sdcard.getAbsolutePath())) {
|
||||
if (new File(sdCardPath).canRead()) {
|
||||
(new navigate(this)).execute(new File(sdCardPath));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
(new navigate(this)).executeOnExecutor(
|
||||
|
|
|
@ -198,6 +198,17 @@ public class MainActivity extends AppCompatActivity implements
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
String versionName = getPackageManager()
|
||||
.getPackageInfo(getPackageName(), 0).versionName;
|
||||
int versionCode = getPackageManager()
|
||||
.getPackageInfo(getPackageName(), 0).versionCode;
|
||||
((TextView) navigationView.findViewById(R.id.version)).setText(
|
||||
getString(R.string.revision_text, versionName, String.valueOf(versionCode)));
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void generateErrorLog() {
|
||||
|
|
|
@ -20,6 +20,22 @@
|
|||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main"/>
|
||||
app:menu="@menu/activity_main">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.design.widget.NavigationView>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.6 KiB |
|
@ -2,7 +2,7 @@
|
|||
|
||||
<string name="app_name" translatable="false">reicast</string>
|
||||
|
||||
<string name="app_site" translatable="false">http://reicast.com</string>
|
||||
<string name="app_site" translatable="false">reicast.com</string>
|
||||
|
||||
<string-array name="depth">
|
||||
<item>16</item>
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
<string name="games_listing">Game List</string>
|
||||
<string name="search_hint">Game (ie. Crazy Taxi)</string>
|
||||
<string name="clear_search">Clear Search Results</string>
|
||||
<string name="no_games">No games found for current search</string>
|
||||
|
||||
<string name="game_details">Game Info - %1$s</string>
|
||||
<string name="info_unavailable">Game Info Unavailable</string>
|
||||
|
|