3
이제이 코드를 사용하여 기본 사각형 모양을 표시했습니다. Google지도 api v2의 맞춤 InfoWidnow 모양을 변경하는 방법
this.infoWindow = (ViewGroup)getLayoutInflater().inflate(R.layout.newcustomdialog, null); this.infoImage=(ImageView)infoWindow.findViewById(R.id.graphicimage); this.infoTitle = (TextView)infoWindow.findViewById(R.id.balloon_item_title); this.infoSnippet = (TextView)infoWindow.findViewById(R.id.balloon_item_snippet); this.close=(Button)infoWindow.findViewById(R.id.close_img_button); this.infoButton = (Button)infoWindow.findViewById(R.id.more); // // Setting custom OnTouchListener which deals with the pressed state // so it shows up this.infoButtonListener = new OnInfoWindowElemTouchListener(HomeScreen.this,infoButton) { @Override protected void onClickConfirmed(View v, Marker marker) { // v.setVisibility(View.GONE); // Here we can perform some action triggered after clicking the button Toast.makeText(HomeScreen.this, marker.getTitle() + "'s button clicked!", Toast.LENGTH_SHORT).show(); } }; //oraii this.exitButtonListener=new OnInfoWindowExitListener(HomeScreen.this,infoWindow) { @Override protected void onClickConfirmed(View v, Marker marker) { // TODO Auto-generated method stub } }; this.infoButton.setOnTouchListener(infoButtonListener); this.close.setOnTouchListener(exitButtonListener); map.setInfoWindowAdapter(new InfoWindowAdapter() { public View getInfoWindow(Marker marker) { return null; } public View getInfoContents(Marker marker) { // Setting up the infoWindow with current's marker info StringTokenizer st2 = new StringTokenizer(marker.getTitle(), ","); String imageurl=""; String title=""; String eventid=""; while (st2.hasMoreElements()) { eventid=st2.nextElement().toString(); imageurl=st2.nextElement().toString(); title=st2.nextElement().toString(); } EventId=eventid; infoTitle.setText(title); infoSnippet.setText(marker.getSnippet()); imageLoader.DisplayImage(imageurl,HomeScreen.this, infoImage); infoButtonListener.setMarker(marker); exitButtonListener.setMarker(marker); // We must call this to set the current marker and infoWindow references // to the MapWrapperLayout mapWrapperLayout.setMarkerWithInfoWindow(marker, infoWindow); return infoWindow; } });
는 차트 대화 shape..how 같은 사용자 정의 모양은 어떤 몸이 알고 있다면 하나 .. PLZ 도와 그렇게하는 것을 의미합니다.내가 심장 모양으로 모양을 변경하려면
1 개 심장 모양의 이미지를 만들어 배경으로 설정 내가 :) ...이 알려 작동하는 경우 created..you이 ... 나보다 이미지를 더 추가 할 수 있습니다 단지 이미지입니다 사용자 정의 정보 윈도우 레이아웃. – TheFlash
심지어 사용자 정의 창을 만들었지 만 해당 창은 기본 사각형 창 안에 표시됩니다. @Pratik – Venkat
http://stackoverflow.com/questions/16317224/custom-infowindow-with-google-maps-api-v2/16318403#16318403 @ Venkat – Shadow