aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-01-04 22:37:26 -0800
committerScott Jackson <daneren2005@gmail.com>2016-01-04 22:37:26 -0800
commit2ff02bf125d1f85517fde35d3a8bd927b87f1771 (patch)
treed5f10fd74bc6684580e066723c5ce61c78d85a56 /app/src/main
parent16e81b24b0e502ee8a57b347e464cbf7e59855c4 (diff)
downloaddsub-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')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/view/CacheLocationPreference.java7
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 {