我有项目,ISO-8859-15中有很多文件,我需要将它们转换为UTF-8.如果我改变一个文件,它会询问"你想转换 - plaplapla",如果我说是的话,重要的符号就不会变成???.
但是,由于我的项目文件数量很大,我不能一个接一个地做.从项目设置更改编码设置,它可能会将编码更改为utf-8但所有符号将变为??? (因此没有转换).
那么,我如何告诉PhpStorm将所有文件转换为utf-8?是否有可能,如果可以,怎么样?替代方法是什么?
我是新的机器人,我将不胜感激.我有这个代码:
dateatm = (TextView) findViewById(R.id.date);
timeatm = (TextView) findViewById(R.id.tvTime);
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MMM/dd");
SimpleDateFormat värk = new SimpleDateFormat("HH:mm:ss");
String dateNow = formatter.format(currentDate.getTime());
String timeNow = värk.format(currentDate.getTime());
dateatm.setText(dateNow);
timeatm.setText(timeNow);
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,我正在获取日期和时间.我想要的是,将有1秒循环,所以在每1秒之后,它将一次又一次地更新日期和时间到新的基本上获得时钟.我很新人,所以所有的帮助都很高兴如何完成这项工作.如果你带上一些确切的例子,我会很感激,因为它使它更容易理解,而不仅仅是"哦,使用那个,那个.谢谢!".
谢谢你的帮助和时间,精灵:)
答案1出错:
08-10 18:55:41.335: ERROR/AndroidRuntime(886): FATAL EXCEPTION: Timer-0
08-10 18:55:41.335: ERROR/AndroidRuntime(886): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
08-10 18:55:41.335: ERROR/AndroidRuntime(886): at android.view.ViewRoot.checkThread(ViewRoot.java:2932)
08-10 18:55:41.335: ERROR/AndroidRuntime(886): at android.view.ViewRoot.invalidateChild(ViewRoot.java:642)
08-10 18:55:41.335: ERROR/AndroidRuntime(886): at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:668)
08-10 18:55:41.335: ERROR/AndroidRuntime(886): at android.view.ViewGroup.invalidateChild(ViewGroup.java:2511)
08-10 …Run Code Online (Sandbox Code Playgroud) 由于我使用chrisbanes 按下来刷新库,我不得不删除正常的listview并用新的替换它.在那之后,长时间推送listview项目不起作用,并始终刷新.似乎信息返回总是为null,因为他没有获取信息,我实际点击的是什么,这是不好的.一直试图自己解决它,但没有成功..任何帮助表示赞赏.
xml布局:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ProgressBar
android:id="@+id/loadingbar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />
<TextView
android:id="@+id/loading_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Loading... Hang in there!"
android:visibility="gone" />
<com.handmark.pulltorefresh.library.PullToRefreshListView
android:id="@+id/animelist"
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
Run Code Online (Sandbox Code Playgroud)
和longpush代码:
/** This will be invoked when an item in the listview is long pressed */
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
Log.d("readInfo", "LONG CLICK!!");
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
Log.d("prereadlongclickinfo", "test");
favorites = readFavoritesList();
parsedFavorites = parse(favorites);
Log.d("readlongclickinfo", "test2");
Log.d("readlongclickinfo", …Run Code Online (Sandbox Code Playgroud)