mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
string list as book path (only first element can be set from preferences)
This commit is contained in:
parent
56d7de4620
commit
9b5718e104
7 changed files with 82 additions and 15 deletions
|
@ -19,6 +19,9 @@
|
|||
|
||||
package org.geometerplus.android.fbreader.crash;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -56,7 +59,12 @@ public class FixBooksDirectoryActivity extends Activity {
|
|||
okButton.setText(buttonResource.getResource("ok").getValue());
|
||||
okButton.setOnClickListener(new Button.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
Paths.BooksDirectoryOption().setValue(directoryView.getText().toString());
|
||||
final List<String> bookPath =
|
||||
new LinkedList<String>(Paths.BookPathOption().getValue());
|
||||
final String newDirectory = directoryView.getText().toString();
|
||||
bookPath.remove(newDirectory);
|
||||
bookPath.add(0, newDirectory);
|
||||
Paths.BookPathOption().setValue(bookPath);
|
||||
startActivity(new Intent(FixBooksDirectoryActivity.this, FBReader.class));
|
||||
finish();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue