mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
missing file
This commit is contained in:
parent
354a805f50
commit
451b02b8a9
1 changed files with 72 additions and 0 deletions
|
@ -0,0 +1,72 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2007-2011 Geometer Plus <contact@geometerplus.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
* 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.geometerplus.android.fbreader.crash;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.*;
|
||||||
|
|
||||||
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
|
||||||
|
import org.geometerplus.fbreader.Paths;
|
||||||
|
|
||||||
|
import org.geometerplus.zlibrary.ui.android.R;
|
||||||
|
|
||||||
|
import org.geometerplus.android.fbreader.FBReader;
|
||||||
|
|
||||||
|
public class FixBooksDirectoryActivity extends Activity {
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle bundle) {
|
||||||
|
super.onCreate(bundle);
|
||||||
|
setContentView(R.layout.books_directory_fix);
|
||||||
|
|
||||||
|
final ZLResource resource = ZLResource.resource("crash").getResource("fixBooksDirectory");
|
||||||
|
final ZLResource buttonResource = ZLResource.resource("dialog").getResource("button");
|
||||||
|
|
||||||
|
setTitle(resource.getResource("title").getValue());
|
||||||
|
|
||||||
|
final TextView textView = (TextView)findViewById(R.id.books_directory_fix_text);
|
||||||
|
textView.setText(resource.getResource("text").getValue());
|
||||||
|
|
||||||
|
final EditText directoryView = (EditText)findViewById(R.id.books_directory_fix_directory);
|
||||||
|
directoryView.setText(Paths.BooksDirectoryOption().getValue());
|
||||||
|
|
||||||
|
final Button okButton = (Button)findViewById(R.id.books_directory_fix_ok_button);
|
||||||
|
okButton.setText(buttonResource.getResource("ok").getValue());
|
||||||
|
okButton.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
Paths.BooksDirectoryOption().setValue(directoryView.getText().toString());
|
||||||
|
startActivity(new Intent(FixBooksDirectoryActivity.this, FBReader.class));
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
final Button cancelButton = (Button)findViewById(R.id.books_directory_fix_cancel_button);
|
||||||
|
cancelButton.setText(buttonResource.getResource("cancel").getValue());
|
||||||
|
cancelButton.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue