当前位置: 首页>>代码示例>>Java>>正文


Java IconGenerator.setTextAppearance方法代码示例

本文整理汇总了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;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:11,代码来源:MapUtils.java

示例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;
}
 
开发者ID:JohannesRudolph,项目名称:Freifunk-App,代码行数:11,代码来源:NodeClusterRenderer.java

示例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);
}
 
开发者ID:The-WebOps-Club,项目名称:saarang-iosched,代码行数:24,代码来源:MapUtils.java

示例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);
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:24,代码来源:MapUtils.java

示例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;
}
 
开发者ID:kikitsa,项目名称:csd-Thesis,代码行数:42,代码来源:Map.java

示例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;
}
 
开发者ID:dklisiaris,项目名称:downtown,代码行数:10,代码来源:DefaultClusterRenderer.java

示例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);

}
 
开发者ID:secondsun,项目名称:devnexus-android,代码行数:9,代码来源:GWCCMapIconGenerator.java

示例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;
}
 
开发者ID:google,项目名称:iosched,代码行数:10,代码来源:MapUtils.java

示例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;
}
 
开发者ID:googlemaps,项目名称:android-maps-utils,代码行数:11,代码来源:DefaultClusterRenderer.java


注:本文中的com.google.maps.android.ui.IconGenerator.setTextAppearance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。