将部分字符串移动至 string.xml
This commit is contained in:
1 parent
82c0208ac8
commit
68aea866e1
9 files changed
+36
-25
No files matched your search
@@ -92,7 +92,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/read" />
|
||||
|
||||
<TextView
|
||||
@@ -101,8 +100,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center" />
|
||||
android:layout_weight="1" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
@@ -117,7 +115,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/warning_red"
|
||||
android:text="@string/delete" />
|
||||
|
||||
@@ -128,7 +125,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/warning_red"
|
||||
android:text="@string/delete2" />
|
||||
|
||||
@@ -145,7 +141,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/detail" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:checked="true"
|
||||
android:text="Use Similarity Scan" />
|
||||
android:text="@string/use_similarity_scan" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkboxCovers"
|
||||
@@ -46,7 +46,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="Only Search Covers" />
|
||||
android:text="@string/only_search_covers" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
@@ -59,17 +59,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="Show Expunged" />
|
||||
android:text="@string/show_expunged" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
<Button
|
||||
<TextView
|
||||
style="@style/EmbedButton"
|
||||
android:id="@+id/select_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="Select" />
|
||||
|
||||
android:text="@string/select" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/target_image"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
android:layout_width="0.0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_weight="3"
|
||||
android:layout_gravity="center"
|
||||
android:entries="@array/mode_list" />
|
||||
</LinearLayout>
|
||||
@@ -59,7 +59,7 @@
|
||||
android:layout_width="0.0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_weight="3"
|
||||
android:layout_gravity="center"
|
||||
android:entries="@array/api_mode_list" />
|
||||
</LinearLayout>
|
||||
@@ -76,14 +76,14 @@
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="Lofi 分辨率" />
|
||||
android:text="@string/lofi_resolution" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/lofi_resolution_list"
|
||||
android:layout_width="0.0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_weight="3"
|
||||
android:layout_gravity="center"
|
||||
android:entries="@array/lofi_resolution_list" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
<!-- Mode -->
|
||||
<string name="content">内容</string>
|
||||
<string name="lofi_resolution">Lofi 分辨率</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="hint_no_keyword">没关键字也行</string>
|
||||
@@ -47,8 +48,11 @@
|
||||
<string name="checkbox_sto">仅搜索有种子的本子</string>
|
||||
<string name="checkbox_sdt1">搜索 Low-Power 标签</string>
|
||||
<string name="checkbox_sdt2">搜索差评标签</string>
|
||||
<string name="checkbox_sh">搜索被删除的本子</string>
|
||||
<string name="checkbox_sh">搜索被遗弃的资源</string>
|
||||
<string name="checkbox_sr">最低评分:</string>
|
||||
<string name="use_similarity_scan">使用相似搜索</string>
|
||||
<string name="only_search_covers">只搜索封面</string>
|
||||
<string name="show_expunged">显示被遗弃的资源</string>
|
||||
|
||||
<!-- Jump -->
|
||||
<string name="jump_summary" formatted="false">第 %d 页,共 %s 页</string>
|
||||
@@ -307,6 +311,7 @@
|
||||
<string name="rating0">…</string>
|
||||
|
||||
<!-- Utils -->
|
||||
<string name="select">选择</string>
|
||||
<string name="click_more">点击查看更多</string>
|
||||
<string name="similar_content">相似内容</string>
|
||||
<string name="_unknown">未知</string>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<!-- Mode -->
|
||||
<string name="content">Content</string>
|
||||
<string name="api" translatable="false">API</string>
|
||||
<string name="lofi_resolution">Lofi resolution</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="hint_no_keyword">No keyword is OK</string>
|
||||
|
||||
@@ -199,6 +199,7 @@
|
||||
<style name="EmbedButton">
|
||||
<item name="@android:textAppearance">@style/TextAppearance.EmbedButton</item>
|
||||
<item name="@android:minHeight">48dp</item>
|
||||
<item name="@android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
<Preference
|
||||
android:key="http_warning"
|
||||
android:title="@string/http_warning_title" />
|
||||
android:title="@string/http_warning_title"
|
||||
android:selectable="false" />
|
||||
|
||||
<com.hippo.ehviewer.preference.EditTextPreference
|
||||
android:key="http_retry"
|
||||
|
||||
@@ -16,13 +16,16 @@
|
||||
|
||||
package com.hippo.ehviewer.preference;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.TypedArray;
|
||||
import android.preference.Preference;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.hippo.ehviewer.util.Ui;
|
||||
import com.hippo.ehviewer.util.ViewUtils;
|
||||
import com.hippo.ehviewer.widget.AlertButton;
|
||||
import com.hippo.ehviewer.widget.DialogBuilder;
|
||||
@@ -74,13 +77,11 @@ public class EditTextPreference extends Preference implements
|
||||
if (!isShown) {
|
||||
mEditText.setText(this.getPersistedString(null));
|
||||
|
||||
new DialogBuilder(getContext()).setTitle(getTitle()).setView(mEditText, 12, false)
|
||||
AlertDialog d = new DialogBuilder(getContext()).setTitle(getTitle()).setView(mEditText, Ui.dp2pix(4), false)
|
||||
.setNegativeButton(android.R.string.cancel, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
((AlertButton)v).dialog.dismiss();
|
||||
ViewUtils.removeFromParent(mEditText);
|
||||
isShown = false;
|
||||
}
|
||||
}).setPositiveButton(android.R.string.ok, new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -90,11 +91,17 @@ public class EditTextPreference extends Preference implements
|
||||
EditTextPreference.this.persistString(value);
|
||||
setSummary(value);
|
||||
((AlertButton)v).dialog.dismiss();
|
||||
ViewUtils.removeFromParent(mEditText);
|
||||
isShown = false;
|
||||
}
|
||||
}
|
||||
}).create().show();
|
||||
}).create();
|
||||
d.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
isShown = false;
|
||||
ViewUtils.removeFromParent(mEditText);
|
||||
}
|
||||
});
|
||||
d.show();
|
||||
|
||||
isShown = true;
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ public class GalleryListActivity extends AbsGalleryActivity
|
||||
}
|
||||
});
|
||||
|
||||
final Button selectImage = (Button)view.findViewById(R.id.select_image);
|
||||
final View selectImage = view.findViewById(R.id.select_image);
|
||||
selectImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
Reference in new issue
Block a user