[Android] Shorten FolderBrowserItem's method 'isValidItem()' into 'isValid()' makes more sense and less redundancy in terms of 'item.isValidItem()' -> 'item.isValid()'

This commit is contained in:
Lioncash 2013-08-17 10:55:13 -04:00
parent 5047eeb263
commit 9149b30237
3 changed files with 6 additions and 6 deletions

View File

@ -95,15 +95,15 @@ public final class FolderBrowser extends Fragment
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
FolderBrowserItem o = adapter.getItem(position);
if(o.isDirectory() || o.getSubtitle().equalsIgnoreCase(getString(R.string.parent_directory)))
FolderBrowserItem item = adapter.getItem(position);
if(item.isDirectory() || item.getSubtitle().equalsIgnoreCase(getString(R.string.parent_directory)))
{
currentDir = new File(o.getPath());
currentDir = new File(item.getPath());
Fill(currentDir);
}
else
{
if (o.isValidItem())
if (item.isValid())
FolderSelected();
else
Toast.makeText(m_activity, getString(R.string.cant_use_compressed_filetypes), Toast.LENGTH_LONG).show();

View File

@ -50,7 +50,7 @@ public final class FolderBrowserAdapter extends ArrayAdapter<FolderBrowserItem>
{
mainText.setText(item.getName());
if (!item.isValidItem())
if (!item.isValid())
{
mainText.setTextColor(0xFFFF0000);
}

View File

@ -86,7 +86,7 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
* by this FolderBrowserItem is supported
* and can be handled correctly.
*/
public boolean isValidItem()
public boolean isValid()
{
return isValid;
}