update 3.27.10.49
Showing
7 changed files
with
103 additions
and
42 deletions
app/release/app-release.apk
0 → 100644
This file is too large to display.
app/release/output.json
0 → 100644
1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-release.apk","properties":{"packageId":"com.pashanhoo.landsurvey","split":"","minSdkVersion":"21"}}] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
1 | package com.pashanhoo.landsurvey.search; | ||
2 | |||
3 | import android.content.Context; | ||
4 | import android.support.v4.view.AsyncLayoutInflater; | ||
5 | import android.widget.Filter; | ||
6 | |||
7 | import com.arlib.floatingsearchview.FloatingSearchView; | ||
8 | |||
9 | |||
10 | /** | ||
11 | * Created by jiangbotao on 2018/3/27. | ||
12 | */ | ||
13 | |||
14 | public class DataHelper { | ||
15 | |||
16 | public interface OnFindSuggestionsListener { | ||
17 | void onResults(String[] results); | ||
18 | } | ||
19 | |||
20 | public static void findSuggestions(FloatingSearchView.OnQueryChangeListener context, String query, final int limit, final long simulatedDelay, final OnFindSuggestionsListener listener){ | ||
21 | new Filter(){ | ||
22 | |||
23 | @Override | ||
24 | protected FilterResults performFiltering(CharSequence constraint) { | ||
25 | try { | ||
26 | Thread.sleep(simulatedDelay); | ||
27 | } catch (InterruptedException e) { | ||
28 | e.printStackTrace(); | ||
29 | } | ||
30 | FilterResults results = new FilterResults(); | ||
31 | return results; | ||
32 | } | ||
33 | |||
34 | @Override | ||
35 | protected void publishResults(CharSequence charSequence, FilterResults filterResults) { | ||
36 | |||
37 | } | ||
38 | |||
39 | |||
40 | }.filter(query); | ||
41 | } | ||
42 | } |
1 | package com.pashanhoo.landsurvey.search; | ||
2 | |||
3 | import android.annotation.SuppressLint; | ||
4 | import android.os.Parcel; | ||
5 | |||
6 | import com.arlib.floatingsearchview.suggestions.model.SearchSuggestion; | ||
7 | |||
8 | /** | ||
9 | * Created by jiangbotao on 2018/3/27. | ||
10 | */ | ||
11 | |||
12 | @SuppressLint("ParcelCreator") | ||
13 | public class POISuggestion implements SearchSuggestion { | ||
14 | |||
15 | private String name; | ||
16 | |||
17 | private String address; | ||
18 | |||
19 | private float lng; | ||
20 | |||
21 | private float lat; | ||
22 | |||
23 | private boolean mIsHistory = false; | ||
24 | |||
25 | public POISuggestion(String suggestion){ | ||
26 | this.name = suggestion.toLowerCase(); | ||
27 | } | ||
28 | |||
29 | public POISuggestion(String name, String address, String lonlat){ | ||
30 | this.name = name; | ||
31 | this.address = address; | ||
32 | String[] position = lonlat.split(" "); | ||
33 | this.lng = Float.parseFloat((position[0])); | ||
34 | this.lat = Float.parseFloat(position[1]); | ||
35 | } | ||
36 | |||
37 | public POISuggestion(Parcel source) { | ||
38 | this.name = source.readString(); | ||
39 | this.mIsHistory = source.readInt() != 0; | ||
40 | } | ||
41 | |||
42 | public void setIsHistory(boolean isHistory) { | ||
43 | this.mIsHistory = isHistory; | ||
44 | } | ||
45 | |||
46 | public boolean getIsHistory() { | ||
47 | return this.mIsHistory; | ||
48 | } | ||
49 | |||
50 | @Override | ||
51 | public String getBody() { | ||
52 | return name; | ||
53 | } | ||
54 | |||
55 | @Override | ||
56 | public int describeContents() { | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | @Override | ||
61 | public void writeToParcel(Parcel parcel, int i) { | ||
62 | parcel.writeString(name); | ||
63 | parcel.writeInt(mIsHistory ? 1 : 0); | ||
64 | } | ||
65 | |||
66 | public static final Creator<POISuggestion> CREATOR = new Creator<POISuggestion>() { | ||
67 | @Override | ||
68 | public POISuggestion createFromParcel(Parcel in) { | ||
69 | return new POISuggestion(in); | ||
70 | } | ||
71 | |||
72 | @Override | ||
73 | public POISuggestion[] newArray(int size) { | ||
74 | return new POISuggestion[size]; | ||
75 | } | ||
76 | }; | ||
77 | |||
78 | public String getAddress() { | ||
79 | return address; | ||
80 | } | ||
81 | |||
82 | public void setAddress(String address) { | ||
83 | this.address = address; | ||
84 | } | ||
85 | |||
86 | public float getLng() { | ||
87 | return lng; | ||
88 | } | ||
89 | |||
90 | public void setLng(long lng) { | ||
91 | this.lng = lng; | ||
92 | } | ||
93 | |||
94 | public float getLat() { | ||
95 | return lat; | ||
96 | } | ||
97 | |||
98 | public void setLat(long lat) { | ||
99 | this.lat = lat; | ||
100 | } | ||
101 | } |
... | @@ -33,6 +33,7 @@ | ... | @@ -33,6 +33,7 @@ |
33 | app:floatingSearch_searchHint="地名地址检索..." | 33 | app:floatingSearch_searchHint="地名地址检索..." |
34 | app:floatingSearch_suggestionsListAnimDuration="250" | 34 | app:floatingSearch_suggestionsListAnimDuration="250" |
35 | app:floatingSearch_showSearchKey="false" | 35 | app:floatingSearch_showSearchKey="false" |
36 | app:floatingSearch_leftActionMode="showSearch" | ||
36 | app:floatingSearch_menu="@menu/menu_main" | 37 | app:floatingSearch_menu="@menu/menu_main" |
37 | app:floatingSearch_close_search_on_keyboard_dismiss="true"/> | 38 | app:floatingSearch_close_search_on_keyboard_dismiss="true"/> |
38 | 39 | ... | ... |
app/src/main/res/mipmap-mdpi/locator.png
0 → 100644
422 Bytes
-
Please register or sign in to post a comment