• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

はてなハイク・キーワードの検索と入力アプリ


コミットメタ情報

リビジョン3f158e57b63164c375e7fe7f96d7eddc8e65ff5e (tree)
日時2012-10-30 00:11:01
作者Kodakana <kodakana@linu...>
コミッターKodakana

ログメッセージ

前回の修正によりHoneycomb以上で情報ダイアログが出せなくなっていた手違いの修正。

変更サマリ

差分

--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,7 +1,7 @@
11 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
22 package="org.pulpdust.kigo"
3- android:versionCode="4"
4- android:versionName="0.55"
3+ android:versionCode="5"
4+ android:versionName="0.56"
55 android:installLocation="auto" >
66
77 <uses-sdk
--- a/bin/AndroidManifest.xml
+++ b/bin/AndroidManifest.xml
@@ -1,7 +1,7 @@
11 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
22 package="org.pulpdust.kigo"
3- android:versionCode="4"
4- android:versionName="0.55"
3+ android:versionCode="5"
4+ android:versionName="0.56"
55 android:installLocation="auto" >
66
77 <uses-sdk
Binary files a/bin/Kigo.apk and b/bin/Kigo.apk differ
Binary files a/bin/classes.dex and b/bin/classes.dex differ
Binary files a/bin/classes/org/pulpdust/kigo/KigoActivity$7$1.class and /dev/null differ
Binary files a/bin/classes/org/pulpdust/kigo/KigoActivity$7.class and b/bin/classes/org/pulpdust/kigo/KigoActivity$7.class differ
Binary files a/bin/classes/org/pulpdust/kigo/KigoActivity.class and b/bin/classes/org/pulpdust/kigo/KigoActivity.class differ
Binary files a/bin/resources.ap_ and b/bin/resources.ap_ differ
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -1,7 +1,7 @@
11 <resources>
22
33 <string name="app_name">Kigo</string>
4- <string name="app_ver">0.55</string>
4+ <string name="app_ver">0.56</string>
55 <string name="app_lic">GNU GPL v3</string>
66 <string name="address">連絡先</string>
77 <string name="app_author">Kodakana&lt;kodakana.hws@gmail.com&gt;</string>
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,7 +1,7 @@
11 <resources>
22
33 <string name="app_name">Kigo</string>
4- <string name="app_ver">0.55</string>
4+ <string name="app_ver">0.56</string>
55 <string name="app_lic">GNU GPL v3</string>
66 <string name="address">Address</string>
77 <string name="app_author">Kodakana&lt;kodakana.hws@gmail.com&gt;</string>
--- a/src/org/pulpdust/kigo/KigoActivity.java
+++ b/src/org/pulpdust/kigo/KigoActivity.java
@@ -338,65 +338,80 @@ public class KigoActivity extends FragmentActivity {
338338 return echoInfo(cx, getActivity(), getArguments().getString("word"));
339339 }
340340 }
341- public static AlertDialog echoInfo(Context context, FragmentActivity av, String word){
341+ public static class Share {
342+ static String xml;
343+ }
344+ public static AlertDialog echoInfo(final Context context, final FragmentActivity av, final String word){
342345 // final Handler handler = new Handler();
346+ boolean isc = isConnect(context);
343347 AlertDialog ad = null;
348+ Share.xml = null;
344349 // final Context context = this;
345-// new Thread(new Runnable(){
346-// @Override
347-// public void run(){
350+ Thread th = new Thread(new Runnable(){
351+ @Override
352+ public void run(){
348353 try {
349354 String turi = host + ipth + URLEncoder.encode(word, "UTF-8").replace("+", "%20");
350- final String xml = getHttp(context, turi);
351-// handler.post(new Runnable(){
352-// @Override
353-// public void run(){
354- if (xml != null){
355- String info[] = exInfo(xml);
356- if(info != null){
357- AlertDialog.Builder abuilder = new AlertDialog.Builder(context);
358- LayoutInflater linflater =
359- (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
360- View layout = linflater.inflate(R.layout.info,
361- (ViewGroup) av.findViewById(R.id.layout_root));
362- TextView tv1 = (TextView) layout.findViewById(R.id.textView1);
363- TextView tv2 = (TextView) layout.findViewById(R.id.textView2);
364- TextView tv3 = (TextView) layout.findViewById(R.id.textView3);
365-// TextView tv4 = (TextView) layout.findViewById(R.id.textView4);
366- tv1.setText(av.getString(R.string.info_entries) + info[0]);
367- tv2.setText(av.getString(R.string.info_follows) + info[1]);
368- tv3.setText(av.getString(R.string.info_title) + info[2]);
369-// tv4.setText(getString(R.string.info_word) + info[3]);
370- abuilder.setTitle(word);
371- abuilder.setCancelable(true);
372- abuilder.setView(layout);
373- ad = abuilder.create();
374- }
375- } else {
376- AlertDialog.Builder empty = new AlertDialog.Builder(context);
377- LayoutInflater linflater =
378- (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
379- View layout = linflater.inflate(R.layout.info,
380- (ViewGroup) av.findViewById(R.id.layout_root));
381- TextView tv1 = (TextView) layout.findViewById(R.id.textView1);
382- tv1.setText(R.string.err_fail_get);
383- empty.setTitle(word);
384- empty.setCancelable(true);
385- empty.setView(layout);
386- ad = empty.create();
387-// Toast.makeText(context, R.string.err_fail_get,
388-// Toast.LENGTH_SHORT).show();
389- }
390-// }
391-// });
355+ Share.xml = getHttp(context, turi);
392356
393357 } catch (UnsupportedEncodingException e) {
394358 // TODO Auto-generated catch block
395359 e.printStackTrace();
396360 }
397- return ad;
398-// }
399-// }).start();
361+ }
362+ });
363+ if (isc){
364+ th.start();
365+ try {
366+ th.join();
367+ } catch (InterruptedException e) {
368+ // TODO Auto-generated catch block
369+ e.printStackTrace();
370+ }
371+// handler.post(new Runnable(){
372+// @Override
373+// public void run(){
374+ if (Share.xml != null){
375+ String info[] = exInfo(Share.xml);
376+ if(info != null){
377+ AlertDialog.Builder abuilder = new AlertDialog.Builder(context);
378+ LayoutInflater linflater =
379+ (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
380+ View layout = linflater.inflate(R.layout.info,
381+ (ViewGroup) av.findViewById(R.id.layout_root));
382+ TextView tv1 = (TextView) layout.findViewById(R.id.textView1);
383+ TextView tv2 = (TextView) layout.findViewById(R.id.textView2);
384+ TextView tv3 = (TextView) layout.findViewById(R.id.textView3);
385+// TextView tv4 = (TextView) layout.findViewById(R.id.textView4);
386+ tv1.setText(av.getString(R.string.info_entries) + info[0]);
387+ tv2.setText(av.getString(R.string.info_follows) + info[1]);
388+ tv3.setText(av.getString(R.string.info_title) + info[2]);
389+// tv4.setText(getString(R.string.info_word) + info[3]);
390+ abuilder.setTitle(word);
391+ abuilder.setCancelable(true);
392+ abuilder.setView(layout);
393+ ad = abuilder.create();
394+ }
395+ }
396+ }
397+ if (ad == null) {
398+ AlertDialog.Builder empty = new AlertDialog.Builder(context);
399+ LayoutInflater linflater =
400+ (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
401+ View layout = linflater.inflate(R.layout.info,
402+ (ViewGroup) av.findViewById(R.id.layout_root));
403+ TextView tv1 = (TextView) layout.findViewById(R.id.textView1);
404+ tv1.setText(R.string.err_fail_get);
405+ empty.setTitle(word);
406+ empty.setCancelable(true);
407+ empty.setView(layout);
408+ ad = empty.create();
409+// Toast.makeText(context, R.string.err_fail_get,
410+// Toast.LENGTH_SHORT).show();
411+ }
412+// }
413+// });
414+ return ad;
400415 }
401416
402417 // @Override