Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Shorten FolderBrowserItem's method 'isValidItem()' into 'is…
…Valid()' makes more sense and less redundancy in terms of 'item.isValidItem()' -> 'item.isValid()'
  • Loading branch information
lioncash committed Aug 17, 2013
1 parent 5047eeb commit 9149b30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -95,15 +95,15 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
{
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();
Expand Down
Expand Up @@ -50,7 +50,7 @@ public View getView(int position, View convertView, ViewGroup parent)
{
mainText.setText(item.getName());

if (!item.isValidItem())
if (!item.isValid())
{
mainText.setTextColor(0xFFFF0000);
}
Expand Down
Expand Up @@ -86,7 +86,7 @@ public String getPath()
* by this FolderBrowserItem is supported
* and can be handled correctly.
*/
public boolean isValidItem()
public boolean isValid()
{
return isValid;
}
Expand Down

0 comments on commit 9149b30

Please sign in to comment.