本文整理汇总了Java中com.google.maps.android.ui.IconGenerator.setTextAppearance方法的典型用法代码示例。如果您正苦于以下问题:Java IconGenerator.setTextAppearance方法的具体用法?Java IconGenerator.setTextAppearance怎么用?Java IconGenerator.setTextAppearance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.maps.android.ui.IconGenerator
的用法示例。
在下文中一共展示了IconGenerator.setTextAppearance方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLabelIconGenerator
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a new IconGenerator for labels on the map.
*/
public static IconGenerator getLabelIconGenerator(Context c) {
IconGenerator iconFactory = new IconGenerator(c);
iconFactory.setTextAppearance(R.style.MapLabel);
iconFactory.setBackground(null);
return iconFactory;
}
示例2: NodeClusterRenderer
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public NodeClusterRenderer(Context context, GoogleMap map, NodeClusterManager<T> clusterManager) {
mMap = map;
mDensity = context.getResources().getDisplayMetrics().density;
mIconGenerator = new IconGenerator(context);
mIconGenerator.setContentView(makeSquareTextView(context));
mIconGenerator.setTextAppearance(com.google.maps.android.R.style.ClusterIcon_TextAppearance);
mIconGenerator.setBackground(makeClusterBackground());
mClusterManager = clusterManager;
shouldAnimate = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}
示例3: createLabelMarker
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a marker for a label.
*
* @param iconFactory Reusable IconFactory
* @param id Id to be embedded as the title
* @param position
* @param label Text to be shown on the label
* @return
*/
public static MarkerOptions createLabelMarker(IconGenerator iconFactory, String id, LatLng position, String label) {
final String snippet = MapFragment.TYPE_LABEL;
iconFactory.setTextAppearance(com.saarang.samples.apps.iosched.R.style.MapLabel);
iconFactory.setBackground(null);
final BitmapDescriptor icon =
BitmapDescriptorFactory.fromBitmap(iconFactory.makeIcon(label));
return new MarkerOptions().position(position).title(id)
.snippet(snippet).icon(icon)
.anchor(iconFactory.getAnchorU(), iconFactory.getAnchorV())
.visible(true);
}
示例4: createLabelMarker
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a marker for a label.
*
* @param iconFactory Reusable IconFactory
* @param id Id to be embedded as the title
* @param position
* @param label Text to be shown on the label
* @return
*/
public static MarkerOptions createLabelMarker(IconGenerator iconFactory, String id, LatLng position, String label) {
final String snippet = MapFragment.TYPE_LABEL;
iconFactory.setTextAppearance(R.style.MapLabel);
iconFactory.setBackground(null);
final BitmapDescriptor icon =
BitmapDescriptorFactory.fromBitmap(iconFactory.makeIcon(label));
return new MarkerOptions().position(position).title(id)
.snippet(snippet).icon(icon)
.anchor(iconFactory.getAnchorU(), iconFactory.getAnchorV())
.visible(false);
}
示例5: onMarkerClick
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* clicking the marker go to
* the corresponding station-page
*
* @param marker
*
* @return
*/
@Override
public boolean onMarkerClick(Marker marker) {
int viewNumber = 0;
for (int i = 0; i < titles.size(); i++) {
if (marker.getTitle().equals(titles.get(i))) {
viewNumber = i;
}
}
//change the color of pressed marker
IconGenerator tc = new IconGenerator(Map.this);
tc.setTextAppearance(R.style.pressedMarker);
Bitmap bmp = tc.makeIcon("" + (viewNumber + 1));
marker.setIcon(BitmapDescriptorFactory.fromBitmap(bmp));
//if panel is down then slide panel up
if(!panelVisibility){
//animation for station's panel in order to slide up
mPager.startAnimation(animationSlideUp);
mPager.setVisibility(View.VISIBLE);
//change the background of upDown button
upDown.setBackgroundResource(R.mipmap.down_arrow);
panelVisibility = true;
}
//set the viewPager to the right station
mPager.setCurrentItem(viewNumber, true);
return false;
}
示例6: DefaultClusterRenderer
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public DefaultClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
mMap = map;
mDensity = context.getResources().getDisplayMetrics().density;
mIconGenerator = new IconGenerator(context);
mIconGenerator.setContentView(makeSquareTextView(context));
mIconGenerator.setTextAppearance(R.style.ClusterIcon_TextAppearance);
mIconGenerator.setBackground(makeClusterBackground());
mClusterManager = clusterManager;
}
示例7: getIcon
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public Bitmap getIcon(RoomMetaData room, String title) {
IconGenerator iconGenerator = new IconGenerator(context);
iconGenerator.setTextAppearance(R.style.MapLabel);
iconGenerator.setContentPadding(3,3,3,3);
iconGenerator.setBackground(new ColorDrawable(room.color));
return iconGenerator.makeIcon(title);
}
示例8: getLabelIconGenerator
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
/**
* Creates a new IconGenerator for labels on the map.
*/
private static IconGenerator getLabelIconGenerator(Context c) {
IconGenerator iconFactory = new IconGenerator(c);
iconFactory.setTextAppearance(R.style.TextApparance_Map_Label);
iconFactory.setBackground(null);
return iconFactory;
}
示例9: DefaultClusterRenderer
import com.google.maps.android.ui.IconGenerator; //导入方法依赖的package包/类
public DefaultClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
mMap = map;
mAnimate = true;
mDensity = context.getResources().getDisplayMetrics().density;
mIconGenerator = new IconGenerator(context);
mIconGenerator.setContentView(makeSquareTextView(context));
mIconGenerator.setTextAppearance(R.style.amu_ClusterIcon_TextAppearance);
mIconGenerator.setBackground(makeClusterBackground());
mClusterManager = clusterManager;
}