-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed marker to show InfoWindows (PopupAdapter.java)
hebrew works now
- Loading branch information
1 parent
e0a0214
commit 63e7eb5
Showing
5 changed files
with
100 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package il.co.anyway.app; | ||
|
||
|
||
import android.annotation.SuppressLint; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import com.google.android.gms.maps.GoogleMap; | ||
import com.google.android.gms.maps.model.Marker; | ||
|
||
class PopupAdapter implements GoogleMap.InfoWindowAdapter { | ||
private View popup=null; | ||
private LayoutInflater inflater=null; | ||
|
||
PopupAdapter(LayoutInflater inflater) { | ||
this.inflater=inflater; | ||
} | ||
|
||
@Override | ||
public View getInfoWindow(Marker marker) { | ||
return(null); | ||
} | ||
|
||
@SuppressLint("InflateParams") | ||
@Override | ||
public View getInfoContents(Marker marker) { | ||
if (popup == null) { | ||
popup=inflater.inflate(R.layout.popup, null); | ||
} | ||
|
||
TextView tv=(TextView)popup.findViewById(R.id.title); | ||
|
||
tv.setText(marker.getTitle()); | ||
tv=(TextView)popup.findViewById(R.id.snippet); | ||
tv.setText(marker.getSnippet()); | ||
|
||
return(popup); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
|
||
<ImageView | ||
android:id="@+id/icon" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_vertical" | ||
android:padding="2dip" | ||
android:src="@drawable/ic_launcher" | ||
android:contentDescription="@string/icon"/> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:id="@+id/title" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textSize="25sp" | ||
android:textStyle="bold"/> | ||
|
||
<TextView | ||
android:id="@+id/snippet" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textSize="15sp"/> | ||
</LinearLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<string name="app_name">AnyWay</string> | ||
<string name="app_name" translatable="false">ANYWAY</string> | ||
<string name="action_settings">הגדרות</string> | ||
<string name="first_marker_desc">נסיון</string> | ||
<string name="first_marker_title">fistuk home</string> | ||
<string name="icon">Accident logo</string> | ||
|
||
<string name="first_marker_desc">קאי שמעון ונמו מחכים לכם</string> | ||
<string name="first_marker_title">הבית של פיסטוק</string> | ||
</resources> |