Reformat code

This commit is contained in:
Boris Timofeev 2017-01-19 17:35:00 +03:00
parent 1e634ec86e
commit c7754a562f
48 changed files with 399 additions and 363 deletions

View file

@ -11,11 +11,11 @@
<application
android:allowBackup="false"
android:extractNativeLibs="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="false"
android:extractNativeLibs="false"
android:theme="@style/AppTheme.NoActionBar">
<activity
android:name=".ui.activity.MainActivity"
@ -61,10 +61,6 @@
android:name=".ui.activity.HelpActivity"
android:label="@string/help_activity_title"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".ui.activity.DonateActivity"
android:label="@string/donate_activity_title"/>
@ -73,6 +69,10 @@
android:name=".WorkerService"
android:exported="false"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
</application>
</manifest>

View file

@ -42,8 +42,7 @@ int Java_org_emunix_unipatcher_patch_XDelta_xdelta3apply(JNIEnv *env,
jobject this,
jstring patchPath,
jstring romPath,
jstring outputPath)
{
jstring outputPath) {
int ret = 0;
const char *patchName = (*env)->GetStringUTFChars(env, patchPath, NULL);
const char *romName = (*env)->GetStringUTFChars(env, romPath, NULL);
@ -57,19 +56,16 @@ int Java_org_emunix_unipatcher_patch_XDelta_xdelta3apply(JNIEnv *env,
(*env)->ReleaseStringUTFChars(env, romPath, romName);
(*env)->ReleaseStringUTFChars(env, outputPath, outputName);
if (!patchFile)
{
if (!patchFile) {
return ERR_UNABLE_OPEN_PATCH;
}
if (!romFile)
{
if (!romFile) {
fclose(patchFile);
return ERR_UNABLE_OPEN_ROM;
}
if (!outputFile)
{
if (!outputFile) {
fclose(patchFile);
fclose(romFile);
return ERR_UNABLE_OPEN_OUTPUT;
@ -83,8 +79,7 @@ int Java_org_emunix_unipatcher_patch_XDelta_xdelta3apply(JNIEnv *env,
return ret;
}
int apply(FILE *patch, FILE *in, FILE *out)
{
int apply(FILE *patch, FILE *in, FILE *out) {
int BUFFER_SIZE = 32768;
int r, ret;
@ -115,11 +110,9 @@ int apply(FILE *patch, FILE *in, FILE *out)
Input_Buf = malloc(BUFFER_SIZE);
fseek(patch, 0, SEEK_SET);
do
{
do {
Input_Buf_Read = fread(Input_Buf, 1, BUFFER_SIZE, patch);
if (Input_Buf_Read < BUFFER_SIZE)
{
if (Input_Buf_Read < BUFFER_SIZE) {
xd3_set_flags(&stream, XD3_FLUSH | stream.flags);
}
xd3_avail_input(&stream, Input_Buf, Input_Buf_Read);
@ -128,8 +121,7 @@ int apply(FILE *patch, FILE *in, FILE *out)
ret = xd3_decode_input(&stream);
switch (ret)
{
switch (ret) {
case XD3_INPUT:
continue;

View file

@ -73,17 +73,20 @@ public class Utils {
public static long getFreeSpace(File file) {
StatFs stat = new StatFs(file.getPath());
long bytesAvailable;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
bytesAvailable = stat.getAvailableBytes();
else
} else
//noinspection deprecation
{
bytesAvailable = (long) stat.getBlockSize() * (long) stat.getAvailableBlocks();
}
return bytesAvailable;
}
public static void copyFile(Context context, File from, File to) throws IOException {
if (Utils.getFreeSpace(to.getParentFile()) < from.length())
if (Utils.getFreeSpace(to.getParentFile()) < from.length()) {
throw new IOException(context.getString(R.string.notify_error_not_enough_space));
}
try {
FileUtils.copyFile(from, to);
@ -148,17 +151,21 @@ public class Utils {
}
public static boolean isPatch(File file) {
String[] patches = {"ips", "ups", "bps", "aps", "ppf", "dps", "ebp", "xdelta", "xdelta3", "vcdiff"};
String[] patches =
{"ips", "ups", "bps", "aps", "ppf", "dps", "ebp", "xdelta", "xdelta3", "vcdiff"};
String ext = FilenameUtils.getExtension(file.getName()).toLowerCase(Locale.getDefault());
for (String patch : patches) {
if (ext.equals(patch))
return true;
if (ext.equals(patch)) return true;
}
return false;
}
public static boolean isArchive(String path) {
String ext = FilenameUtils.getExtension(path).toLowerCase(Locale.getDefault());
return ext.equals("zip") || ext.equals("rar") || ext.equals("7z") || ext.equals("gz") || ext.equals("tgz");
return ext.equals("zip")
|| ext.equals("rar")
|| ext.equals("7z")
|| ext.equals("gz")
|| ext.equals("tgz");
}
}

View file

@ -47,9 +47,11 @@ public class APS extends Patch {
Patch aps = null;
switch (checkAPS(patchFile)) {
case APS_N64_PATCH:
aps = new APS_N64(context, patchFile, romFile, outputFile); break;
aps = new APS_N64(context, patchFile, romFile, outputFile);
break;
case APS_GBA_PATCH:
aps = new APS_GBA(context, patchFile, romFile, outputFile); break;
aps = new APS_GBA(context, patchFile, romFile, outputFile);
break;
case NOT_APS_PATCH:
throw new PatchException(context.getString(R.string.notify_error_not_aps_patch));
}

View file

@ -32,7 +32,6 @@ import java.util.Arrays;
public class PPF extends Patch {
// private static final String LOG_TAG = "PPF";
private static final byte[] MAGIC_NUMBER = {0x50, 0x50, 0x46}; // "PPF" without version
private RandomAccessFile patchStream;
@ -75,10 +74,17 @@ public class PPF extends Patch {
}
switch (getPPFVersion(patchFile)) {
case 1: applyPPF1(); break;
case 2: applyPPF2(); break;
case 3: applyPPF3(); break;
default: throw new PatchException(context.getString(R.string.notify_error_not_ppf_patch));
case 1:
applyPPF1();
break;
case 2:
applyPPF2();
break;
case 3:
applyPPF3();
break;
default:
throw new PatchException(context.getString(R.string.notify_error_not_ppf_patch));
}
}

View file

@ -38,6 +38,7 @@ import java.util.zip.CRC32;
public class UPS extends Patch {
private static final byte[] MAGIC_NUMBER = {0x55, 0x50, 0x53, 0x31}; // "UPS1"
public UPS(Context context, File patch, File rom, File output) {
super(context, patch, rom, output);
}

View file

@ -359,8 +359,7 @@ public class FilePickerActivity extends AppCompatActivity implements FilePickerA
}
}
private HashMap<String, String> getFileChecksums(File file) throws IOException, NoSuchAlgorithmException, IllegalArgumentException
{
private HashMap<String, String> getFileChecksums(File file) throws IOException, NoSuchAlgorithmException, IllegalArgumentException {
if (file.isDirectory())
throw new IllegalArgumentException("Unable calculate checksum for directory");

View file

@ -156,9 +156,14 @@ public class MainActivity extends AppCompatActivity
// update the main content by replacing fragments
Fragment fragment;
switch (position) {
case 1: fragment = new SmdFixChecksumFragment(); break;
case 2: fragment = new SnesSmcHeaderFragment(); break;
default: fragment = new PatchingFragment();
case 1:
fragment = new SmdFixChecksumFragment();
break;
case 2:
fragment = new SnesSmcHeaderFragment();
break;
default:
fragment = new PatchingFragment();
}
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();

View file

@ -38,6 +38,7 @@ public class FilePickerAdapter extends RecyclerView.Adapter<FilePickerAdapter.Vi
public interface OnItemClickListener {
void onItemClick(View v, int position);
void onItemLongClick(View v, int position);
}

View file

@ -58,7 +58,8 @@ public class PatchingFragment extends ActionFragment implements View.OnClickList
private String patchPath = null;
private String outputPath = null;
public PatchingFragment() {}
public PatchingFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {

View file

@ -49,7 +49,8 @@ public class SmdFixChecksumFragment extends ActionFragment implements View.OnCli
private TextView fixChecksumInfoTextview;
private String romPath = null;
public SmdFixChecksumFragment() {}
public SmdFixChecksumFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {

View file

@ -55,7 +55,8 @@ public class SnesSmcHeaderFragment extends ActionFragment implements View.OnClic
private int action = 0;
public SnesSmcHeaderFragment() {}
public SnesSmcHeaderFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {

View file

@ -68,6 +68,7 @@ public abstract class Notify {
}
public abstract void setCompleted();
public abstract void setFailed(String message);
public void setProgress(boolean isEnabled) {

View file

@ -3,8 +3,8 @@
android:interpolator="@android:anim/decelerate_interpolator">
<translate
android:duration="500"
android:fromYDelta="100%"
android:toYDelta="0"
android:duration="500" />
android:toYDelta="0"/>
</set>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"

View file

@ -6,14 +6,15 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.activity.FilePickerActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/appbar"
android:layout_alignParentTop="true"
android:theme="@style/AppTheme.AppBarOverlay">
@ -26,12 +27,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/appbar"
android:layout_margin="@dimen/activity_horizontal_margin"
android:gravity="center"
android:includeFontPadding="false"
android:layout_margin="@dimen/activity_horizontal_margin"
android:visibility="gone"
android:text="@string/permissions_storage_error_info"
android:textStyle="bold"
android:text="@string/permissions_storage_error_info" />
android:visibility="gone"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/list"

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"

View file

@ -47,8 +47,8 @@
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer"
app:itemIconTint="@color/colorDrawerText"
app:itemTextColor="@color/colorDrawerText"
app:itemIconTint="@color/colorDrawerText" />
app:menu="@menu/activity_main_drawer"/>
</android.support.v4.widget.DrawerLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -10,25 +11,25 @@
<ImageView
android:id="@+id/row_image"
android:contentDescription="@string/icon"
android:layout_alignParentLeft="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_alignParentLeft="true"
android:layout_marginBottom="8dp"
android:layout_marginLeft="@dimen/keyline_one">
android:layout_marginLeft="@dimen/keyline_one"
android:layout_marginTop="8dp"
android:contentDescription="@string/icon">
</ImageView>
<TextView
android:id="@+id/row_text"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginBottom="8dp"
android:layout_marginLeft="@dimen/keyline_two"
android:layout_marginRight="@dimen/keyline_one"
android:layout_marginTop="8dp"
android:textSize="20sp">
</TextView>

View file

@ -1,4 +1,6 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -19,13 +21,13 @@
<ImageView
android:id="@+id/appIcon"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="16dp"
android:src="@mipmap/ic_launcher"
android:contentDescription="@string/app_name"
android:adjustViewBounds="false"
android:contentDescription="@string/app_name"
android:cropToPadding="false"
android:layout_height="64dp" />
android:src="@mipmap/ic_launcher"/>
<LinearLayout
android:layout_width="match_parent"
@ -46,10 +48,10 @@
android:text="@string/help_activity_about_tab_version"/>
<TextView
android:text="@string/help_activity_about_tab_license"
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView" />
android:text="@string/help_activity_about_tab_license"/>
<TextView
android:id="@+id/copyright"

View file

@ -1,4 +1,6 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -1,4 +1,6 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
@ -11,19 +12,19 @@
android:orientation="horizontal">
<TextView
android:id="@+id/name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:text="@string/file_properties_dialog_name"
android:id="@+id/name_label"
android:textSize="@dimen/material_text_subhead"/>
<TextView
android:id="@+id/name_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/name_value"
android:textSize="@dimen/material_text_subhead"
android:textIsSelectable="true" />
android:textIsSelectable="true"
android:textSize="@dimen/material_text_subhead"/>
</LinearLayout>
<LinearLayout
@ -33,19 +34,19 @@
android:orientation="horizontal">
<TextView
android:id="@+id/path_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:text="@string/file_properties_dialog_path"
android:id="@+id/path_label"
android:textSize="@dimen/material_text_subhead"/>
<TextView
android:id="@+id/path_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/path_value"
android:textSize="@dimen/material_text_subhead"
android:textIsSelectable="true" />
android:textIsSelectable="true"
android:textSize="@dimen/material_text_subhead"/>
</LinearLayout>
@ -56,19 +57,19 @@
android:orientation="horizontal">
<TextView
android:id="@+id/size_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:text="@string/file_properties_dialog_size"
android:id="@+id/size_label"
android:textSize="@dimen/material_text_subhead"/>
<TextView
android:id="@+id/size_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/size_value"
android:textSize="@dimen/material_text_subhead"
android:textIsSelectable="true" />
android:textIsSelectable="true"
android:textSize="@dimen/material_text_subhead"/>
</LinearLayout>
@ -79,20 +80,20 @@
android:orientation="horizontal">
<TextView
android:id="@+id/crc32_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:text="@string/file_properties_dialog_crc32"
android:id="@+id/crc32_label"
android:textSize="@dimen/material_text_subhead"/>
<TextView
android:id="@+id/crc32_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/file_properties_dialog_wait_message"
android:id="@+id/crc32_value"
android:textSize="@dimen/material_text_subhead"
android:textIsSelectable="true" />
android:textIsSelectable="true"
android:textSize="@dimen/material_text_subhead"/>
</LinearLayout>
<LinearLayout
@ -102,20 +103,20 @@
android:orientation="horizontal">
<TextView
android:id="@+id/SHA1_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:text="@string/file_properties_dialog_sha1"
android:id="@+id/SHA1_label"
android:textSize="@dimen/material_text_subhead"/>
<TextView
android:id="@+id/sha1_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/file_properties_dialog_wait_message"
android:id="@+id/sha1_value"
android:textSize="@dimen/material_text_subhead"
android:textIsSelectable="true" />
android:textIsSelectable="true"
android:textSize="@dimen/material_text_subhead"/>
</LinearLayout>
<LinearLayout
@ -124,20 +125,20 @@
android:orientation="horizontal">
<TextView
android:id="@+id/md5_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:text="@string/file_properties_dialog_md5"
android:id="@+id/md5_label"
android:textSize="@dimen/material_text_subhead"/>
<TextView
android:id="@+id/md5_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/file_properties_dialog_wait_message"
android:id="@+id/md5_value"
android:textSize="@dimen/material_text_subhead"
android:textIsSelectable="true" />
android:textIsSelectable="true"
android:textSize="@dimen/material_text_subhead"/>
</LinearLayout>
</LinearLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@drawable/drawer_header"

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
@ -18,30 +19,30 @@
android:padding="@dimen/card_padding">
<TextView
android:id="@+id/patchLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/patchLabel"
android:padding="8dp"
android:text="@string/main_activity_patch_file"
android:textColor="@color/colorCardHeaderText"
android:textSize="24sp"/>
<View
android:layout_marginTop="@dimen/card_line_margin"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_width="match_parent"
android:layout_height="@dimen/card_line_height"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_marginTop="@dimen/card_line_margin"
android:background="@color/colorCardLine"/>
<TextView
android:id="@+id/patchNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/patchNameTextView"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/main_activity_tap_to_select"
android:textSize="20sp"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"/>
android:textSize="20sp"/>
</LinearLayout>
@ -58,30 +59,30 @@
android:padding="@dimen/card_padding">
<TextView
android:id="@+id/romLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/romLabel"
android:padding="8dp"
android:text="@string/main_activity_rom_file"
android:textColor="@color/colorCardHeaderText"
android:textSize="24sp"/>
<View
android:layout_marginTop="@dimen/card_line_margin"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_width="match_parent"
android:layout_height="@dimen/card_line_height"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_marginTop="@dimen/card_line_margin"
android:background="@color/colorCardLine"/>
<TextView
android:id="@+id/romNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/romNameTextView"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/main_activity_tap_to_select"
android:textSize="20sp"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"/>
android:textSize="20sp"/>
</LinearLayout>
@ -98,30 +99,30 @@
android:padding="@dimen/card_padding">
<TextView
android:id="@+id/outputLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/outputLabel"
android:padding="8dp"
android:text="@string/main_activity_output_file"
android:textColor="@color/colorCardHeaderText"
android:textSize="24sp"/>
<View
android:layout_marginTop="@dimen/card_line_margin"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_width="match_parent"
android:layout_height="@dimen/card_line_height"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_marginTop="@dimen/card_line_margin"
android:background="@color/colorCardLine"/>
<TextView
android:id="@+id/outputNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/outputNameTextView"
android:padding="8dp"
android:textSize="20sp"
android:text="@string/main_activity_tap_to_rename"
android:drawableLeft="@drawable/ic_edit_grey600_24dp"
android:drawablePadding="8dp"/>
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/main_activity_tap_to_rename"
android:textSize="20sp"/>
</LinearLayout>
</android.support.v7.widget.CardView>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
@ -18,9 +19,9 @@
android:padding="@dimen/card_padding">
<TextView
android:id="@+id/romLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/romLabel"
android:padding="8dp"
android:text="@string/main_activity_rom_file"
android:textColor="@color/colorCardHeaderText"
@ -28,21 +29,21 @@
<View
android:id="@+id/romLine"
android:layout_marginTop="@dimen/card_line_margin"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_width="match_parent"
android:layout_height="@dimen/card_line_height"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_marginTop="@dimen/card_line_margin"
android:background="@color/colorCardLine"/>
<TextView
android:id="@+id/romNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/romNameTextView"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/main_activity_tap_to_select"
android:textSize="20sp"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"/>
android:textSize="20sp"/>
</LinearLayout>
@ -53,12 +54,12 @@
style="@style/Card">
<TextView
android:padding="@dimen/card_padding"
android:id="@+id/fixChecksumInfoTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/fixChecksumInfoTextView"
android:textSize="16sp"
android:text="@string/smd_fix_checksum_help"/>
android:padding="@dimen/card_padding"
android:text="@string/smd_fix_checksum_help"
android:textSize="16sp"/>
</android.support.v7.widget.CardView>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
@ -18,9 +19,9 @@
android:padding="@dimen/card_padding">
<TextView
android:id="@+id/romLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/romLabel"
android:padding="8dp"
android:text="@string/main_activity_rom_file"
android:textColor="@color/colorCardHeaderText"
@ -28,21 +29,21 @@
<View
android:id="@+id/romLine"
android:layout_marginTop="@dimen/card_line_margin"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_width="match_parent"
android:layout_height="@dimen/card_line_height"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_marginTop="@dimen/card_line_margin"
android:background="@color/colorCardLine"/>
<TextView
android:id="@+id/romNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/romNameTextView"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/main_activity_tap_to_select"
android:textSize="20sp"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"/>
android:textSize="20sp"/>
</LinearLayout>
@ -53,12 +54,12 @@
style="@style/Card">
<TextView
android:padding="@dimen/card_padding"
android:id="@+id/headerInfoTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/headerInfoTextView"
android:textSize="16sp"
android:text="@string/snes_smc_header_help"/>
android:padding="@dimen/card_padding"
android:text="@string/snes_smc_header_help"
android:textSize="16sp"/>
</android.support.v7.widget.CardView>
@ -74,9 +75,9 @@
android:padding="@dimen/card_padding">
<TextView
android:id="@+id/headerLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/headerLabel"
android:padding="8dp"
android:text="@string/main_activity_header_file"
android:textColor="@color/colorCardHeaderText"
@ -84,21 +85,21 @@
<View
android:id="@+id/headerLine"
android:layout_marginTop="@dimen/card_line_margin"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_width="match_parent"
android:layout_height="@dimen/card_line_height"
android:layout_marginBottom="@dimen/card_line_margin"
android:layout_marginTop="@dimen/card_line_margin"
android:background="@color/colorCardLine"/>
<TextView
android:id="@+id/headerNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/headerNameTextView"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/main_activity_tap_to_select"
android:textSize="20sp"
android:drawableLeft="@drawable/ic_folder_grey600_24dp"
android:drawablePadding="8dp"/>
android:textSize="20sp"/>
</LinearLayout>

View file

@ -4,14 +4,16 @@
xmlns:tools="http://schemas.android.com/tools"
tools:context=".ui.activity.HelpActivity">
<item android:id="@+id/action_send_feedback"
android:title="@string/help_activity_action_send_feedback"
<item
android:id="@+id/action_send_feedback"
android:orderInCategory="100"
android:title="@string/help_activity_action_send_feedback"
app:showAsAction="never"/>
<item android:id="@+id/action_visit_website"
android:title="@string/help_activity_action_visit_site"
<item
android:id="@+id/action_visit_website"
android:orderInCategory="200"
android:title="@string/help_activity_action_visit_site"
app:showAsAction="never"/>
</menu>

View file

@ -2,8 +2,8 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group
android:checkableBehavior="single"
android:id="@+id/grp_action">
android:id="@+id/grp_action"
android:checkableBehavior="single">
<item
android:id="@+id/nav_apply_patch"
android:icon="@drawable/ic_healing_grey600_24dp"
@ -19,8 +19,8 @@
</group>
<group
android:checkableBehavior="none"
android:id="@+id/grp_other">
android:id="@+id/grp_other"
android:checkableBehavior="none">
<item
android:id="@+id/nav_settings"
android:icon="@drawable/ic_settings_grey600_24dp"

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This

View file

@ -2,35 +2,35 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/settings_interface_header">
<ListPreference
android:key="theme"
android:title="@string/settings_theme"
android:summary="@string/settings_theme_description"
android:defaultValue="light"
android:dialogTitle="@string/settings_theme_dialog_title"
android:entries="@array/theme_names"
android:entryValues="@array/theme_values"
android:defaultValue="light" />
android:key="theme"
android:summary="@string/settings_theme_description"
android:title="@string/settings_theme"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_directories_header">
<CheckBoxPreference
android:key="remember_last_directories"
android:defaultValue="true"
android:disableDependentsState="true"
android:key="remember_last_directories"
android:title="@string/settings_remember_last_directories"/>
<EditTextPreference
android:defaultValue="/"
android:dependency="remember_last_directories"
android:key="rom_directory"
android:title="@string/settings_rom_directory"
android:defaultValue="/" />
android:title="@string/settings_rom_directory"/>
<EditTextPreference
android:defaultValue="/"
android:dependency="remember_last_directories"
android:key="patch_directory"
android:title="@string/settings_patch_directory"
android:defaultValue="/" />
android:title="@string/settings_patch_directory"/>
<EditTextPreference
android:defaultValue=""
android:key="output_directory"
android:title="@string/settings_output_directory"
android:summary="@string/settings_output_directory_description"
android:defaultValue="" />
android:title="@string/settings_output_directory"/>
</PreferenceCategory>
</PreferenceScreen>