ラベル Java の投稿を表示しています。 すべての投稿を表示
ラベル Java の投稿を表示しています。 すべての投稿を表示

2015年11月3日火曜日

SearchView

New Just Landing adopt SearchView for search airport by keyword.

1.Add SearchView in layout xml
<SearchView android:id="@+id/keyword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:queryHint="Enter keyword">
</SearchView>

2.Coding Java

Add implements on class
 @Override
 public boolean onQueryTextSubmit(String query) {
  return false;
 }

 @Override
 public boolean onQueryTextChange(String newText) {
  return false;
 }

2015年7月3日金曜日

SimpleDateFormat


Java Warnning

To get local formatting use getDateInstance(), getDateTimeInstance(), or getTimeInstance(), or use new SimpleDateFormat(String template, Locale locale) with for example Locale.US for ASCII dates.

SimpleDateFormat("HH:mm") change to SimpleDateFormat("HH:mm", Locale.JAPANESE)

2014年9月6日土曜日

NumberFormat

Google Maps API return latitude ٤٩٠٥٩٤٠٧, ٢٠٢١٧٦١٢.
And Just Landing shows "error sqlite..SQLiteException: no such column: ٤٩٠٥٩٤٠٧".

It looks like Arabic–Indic numerals.

Then use NumberFormat like below.

NumberFormat nf = NumberFormat.getInstance(Locale.US);
nf.format(latitude);

2014年7月30日水曜日

ellipsize property of android TextView

Shorten the long text

android:text="abcdefghijklmnopqrstuvwxyz"

android:ellipsize="start" -> ...uvwxyz
android:ellipsize="middle" -> abc...xyz
android:ellipsize="end" -> abcdef...


2014年7月21日月曜日