mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
Some Network changes
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1638 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
a0b832282c
commit
cc823b0e64
14 changed files with 72 additions and 18 deletions
|
@ -2,10 +2,10 @@
|
||||||
** Записать изменения в ChangeLog
|
** Записать изменения в ChangeLog
|
||||||
|
|
||||||
---
|
---
|
||||||
** Иконка к "Добавить каталог"
|
DONE Иконка к "Добавить каталог"
|
||||||
** Комментарий к этому пункту = "Добавление OPDS-каталога вручную"
|
DONE Комментарий к этому пункту = "Добавление OPDS-каталога вручную"
|
||||||
** Какую-нибудь иконку к добавленным вручную каталогам
|
** Какую-нибудь иконку к добавленным вручную каталогам
|
||||||
** Звездочку к 2-м обязательным пунктам при добавлении каталога
|
DONE Звездочку к 2-м обязательным пунктам при добавлении каталога
|
||||||
?? Убрать 3-й пункт при добавлении????
|
?? Убрать 3-й пункт при добавлении????
|
||||||
** Может быть сделать примеры мелким шрифтом под полями???
|
** Может быть сделать примеры мелким шрифтом под полями???
|
||||||
** Сразу (по нажатию Ok) проверять и говорить, верный ли URL (Ex: Это не OPDS-каталог)
|
** Сразу (по нажатию Ok) проверять и говорить, верный ли URL (Ex: Это не OPDS-каталог)
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
||||||
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
|
<node name="addCustomCatalogSummary" toBeTranslated="true" value="Add custom OPDS catalog manually"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="Willst du die lokale Kopie lesen?"/>
|
<node name="read" value="Willst du die lokale Kopie lesen?"/>
|
||||||
<node name="download" value="Willst du dieses Buch downloaden?"/>
|
<node name="download" value="Willst du dieses Buch downloaden?"/>
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
<node name="editCustomCatalog" value="Edit catalog"/>
|
<node name="editCustomCatalog" value="Edit catalog"/>
|
||||||
<node name="removeCustomCatalog" value="Remove catalog"/>
|
<node name="removeCustomCatalog" value="Remove catalog"/>
|
||||||
<node name="addCustomCatalog" value="Add catalog"/>
|
<node name="addCustomCatalog" value="Add catalog"/>
|
||||||
|
<node name="addCustomCatalogSummary" value="Add custom OPDS catalog manually"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="Do you want to read local copy?"/>
|
<node name="read" value="Do you want to read local copy?"/>
|
||||||
<node name="download" value="Do you want to download this book?"/>
|
<node name="download" value="Do you want to download this book?"/>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
||||||
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
|
<node name="addCustomCatalogSummary" toBeTranslated="true" value="Add custom OPDS catalog manually"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="Voulez-vous lire la copie locale?"/>
|
<node name="read" value="Voulez-vous lire la copie locale?"/>
|
||||||
<node name="download" value="Voulez-vous télécharger ce livre?"/>
|
<node name="download" value="Voulez-vous télécharger ce livre?"/>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
||||||
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
|
<node name="addCustomCatalogSummary" toBeTranslated="true" value="Add custom OPDS catalog manually"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="Elolvassa a helyi példányt?"/>
|
<node name="read" value="Elolvassa a helyi példányt?"/>
|
||||||
<node name="download" value="Letölti a könyvet?"/>
|
<node name="download" value="Letölti a könyvet?"/>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<node name="editCustomCatalog" value="Modifica catalogo"/>
|
<node name="editCustomCatalog" value="Modifica catalogo"/>
|
||||||
<node name="removeCustomCatalog" value="Cancella catalogo"/>
|
<node name="removeCustomCatalog" value="Cancella catalogo"/>
|
||||||
<node name="addCustomCatalog" value="Aggiungi catalogo"/>
|
<node name="addCustomCatalog" value="Aggiungi catalogo"/>
|
||||||
|
<node name="addCustomCatalogSummary" toBeTranslated="true" value="Add custom OPDS catalog manually"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="Vuoi leggere la copia locale?"/>
|
<node name="read" value="Vuoi leggere la copia locale?"/>
|
||||||
<node name="download" value="Vuoi scaricare questo libro?"/>
|
<node name="download" value="Vuoi scaricare questo libro?"/>
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
<node name="editCustomCatalog" value="Изменить каталог"/>
|
<node name="editCustomCatalog" value="Изменить каталог"/>
|
||||||
<node name="removeCustomCatalog" value="Удалить каталог"/>
|
<node name="removeCustomCatalog" value="Удалить каталог"/>
|
||||||
<node name="addCustomCatalog" value="Добавить каталог"/>
|
<node name="addCustomCatalog" value="Добавить каталог"/>
|
||||||
|
<node name="addCustomCatalogSummary" value="Добавить пользовательский OPDS каталог вручную"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="Вы хотите открыть локальную копию?"/>
|
<node name="read" value="Вы хотите открыть локальную копию?"/>
|
||||||
<node name="download" value="Вы хотите скачать эту книгу?"/>
|
<node name="download" value="Вы хотите скачать эту книгу?"/>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
||||||
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
|
<node name="addCustomCatalogSummary" toBeTranslated="true" value="Add custom OPDS catalog manually"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="Bạn muốn đọc bản nội bộ?"/>
|
<node name="read" value="Bạn muốn đọc bản nội bộ?"/>
|
||||||
<node name="download" value="Bạn muốn tải về quyển sách này?"/>
|
<node name="download" value="Bạn muốn tải về quyển sách này?"/>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
<node name="editCustomCatalog" toBeTranslated="true" value="Edit catalog"/>
|
||||||
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
<node name="removeCustomCatalog" toBeTranslated="true" value="Remove catalog"/>
|
||||||
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
<node name="addCustomCatalog" toBeTranslated="true" value="Add catalog"/>
|
||||||
|
<node name="addCustomCatalogSummary" toBeTranslated="true" value="Add custom OPDS catalog manually"/>
|
||||||
<node name="confirmQuestions">
|
<node name="confirmQuestions">
|
||||||
<node name="read" value="是否本地阅读" />
|
<node name="read" value="是否本地阅读" />
|
||||||
<node name="download" value="是否下载本图书?" />
|
<node name="download" value="是否下载本图书?" />
|
||||||
|
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
@ -51,20 +51,52 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
>
|
>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/network_catalog_title_star"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="*"
|
||||||
|
android:textColor="#ffff0000"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
/>
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/network_catalog_title"
|
android:id="@+id/network_catalog_title"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_toLeftOf="@id/network_catalog_title_star"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/network_catalog_url_star"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="*"
|
||||||
|
android:textColor="#ffff0000"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
/>
|
/>
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/network_catalog_url"
|
android:id="@+id/network_catalog_url"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:inputType="textUri"
|
android:inputType="textUri"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_toLeftOf="@id/network_catalog_url_star"
|
||||||
/>
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/network_catalog_summary"
|
android:id="@+id/network_catalog_summary"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
|
|
||||||
package org.geometerplus.android.fbreader.network;
|
package org.geometerplus.android.fbreader.network;
|
||||||
|
|
||||||
|
import org.geometerplus.zlibrary.core.filesystem.ZLResourceFile;
|
||||||
|
import org.geometerplus.zlibrary.core.image.ZLFileImage;
|
||||||
|
import org.geometerplus.zlibrary.core.image.ZLImage;
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.network.NetworkLibraryItem;
|
import org.geometerplus.fbreader.network.NetworkLibraryItem;
|
||||||
|
@ -38,11 +41,17 @@ public class AddCustomCatalogItemTree extends NetworkTree {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSummary() {
|
public String getSummary() {
|
||||||
return null;
|
return ZLResource.resource("networkView").getResource("addCustomCatalogSummary").getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NetworkLibraryItem getHoldedItem() {
|
public NetworkLibraryItem getHoldedItem() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ZLImage createCover() {
|
||||||
|
ZLResourceFile file = ZLResourceFile.createResourceFile("R.drawable.ic_list_plus");
|
||||||
|
return new ZLFileImage("image/png", file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class SearchItemTree extends NetworkTree {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ZLImage createCover() {
|
protected ZLImage createCover() {
|
||||||
ZLResourceFile file = ZLResourceFile.createResourceFile("data/searchresult.png");
|
ZLResourceFile file = ZLResourceFile.createResourceFile("R.drawable.ic_list_searchresult");
|
||||||
return new ZLFileImage("image/png", file);
|
return new ZLFileImage("image/png", file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,10 +125,15 @@ public final class ZLAndroidLibrary extends ZLibrary {
|
||||||
|
|
||||||
AndroidResourceFile(String path) {
|
AndroidResourceFile(String path) {
|
||||||
super(path);
|
super(path);
|
||||||
final String fieldName =
|
final String drawablePrefix = "R.drawable.";
|
||||||
path.replace("/", "__").replace(".", "_").replace("-", "_").toLowerCase();
|
|
||||||
try {
|
try {
|
||||||
|
if (path.startsWith(drawablePrefix)) {
|
||||||
|
final String fieldName = path.substring(drawablePrefix.length());
|
||||||
|
myResourceId = R.drawable.class.getField(fieldName).getInt(null);
|
||||||
|
} else {
|
||||||
|
final String fieldName = path.replace("/", "__").replace(".", "_").replace("-", "_").toLowerCase();
|
||||||
myResourceId = R.raw.class.getField(fieldName).getInt(null);
|
myResourceId = R.raw.class.getField(fieldName).getInt(null);
|
||||||
|
}
|
||||||
myExists = true;
|
myExists = true;
|
||||||
} catch (NoSuchFieldException e) {
|
} catch (NoSuchFieldException e) {
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue