diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-01-04 22:37:26 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-01-04 22:37:26 -0800 |
commit | 2ff02bf125d1f85517fde35d3a8bd927b87f1771 (patch) | |
tree | d5f10fd74bc6684580e066723c5ce61c78d85a56 /app/src/main/java | |
parent | 16e81b24b0e502ee8a57b347e464cbf7e59855c4 (diff) | |
download | dsub-2ff02bf125d1f85517fde35d3a8bd927b87f1771.tar.gz dsub-2ff02bf125d1f85517fde35d3a8bd927b87f1771.tar.bz2 dsub-2ff02bf125d1f85517fde35d3a8bd927b87f1771.zip |
Only change user input for cache location instead of changing the preference itself on Internal/External button press
Diffstat (limited to 'app/src/main/java')
-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 { |