diff options
Diffstat (limited to 'app/src/main/java/github')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java b/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java index cc123089..35ce71bc 100644 --- a/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java +++ b/app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java @@ -117,11 +117,13 @@ public class CacheLocationPreference extends EditTextPreference { final File finalInternalDir = new File(internalDir, "music"); final File finalExternalDir = new File(externalDir, "music"); + final EditText editTextBox = (EditText)view.findViewById(android.R.id.edit); if(finalInternalDir != null && (finalInternalDir.exists() || finalInternalDir.mkdirs())) { internalLocation.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - setText(finalInternalDir.getPath()); + String path = finalInternalDir.getPath(); + editTextBox.setText(path); } }); } else { @@ -132,7 +134,8 @@ public class CacheLocationPreference extends EditTextPreference { externalLocation.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - setText(finalExternalDir.getPath()); + String path = finalExternalDir.getPath(); + editTextBox.setText(path); } }); } else { |