• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java R类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sonyericsson.extras.liveware.extension.util.R的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



R类属于com.sonyericsson.extras.liveware.extension.util包,在下文中一共展示了R类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: SmartWatchNotificationWidgetImage

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Create notification widget image.
 *
 * @param context The context.
 * @param event The event.
 */
public SmartWatchNotificationWidgetImage(final Context context,
        final NotificationWidgetEvent event) {
    super(context);
    setInnerLayoutResourceId(R.layout.smart_watch_notification_widget);
    setBadgeCount(event.getCount());
    mEvent = event;
}
 
开发者ID:fbarriga,项目名称:sony-smartband-logger,代码行数:14,代码来源:SmartWatchNotificationWidgetImage.java


示例2: applyInnerLayout

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
@Override
protected void applyInnerLayout(LinearLayout innerLayout) {

    Bitmap backgroundBitmap = mEvent.getImage();
    if (null != backgroundBitmap) {
        ((ImageView)innerLayout
                .findViewById(R.id.smart_watch_notification_widget_background))
                .setImageBitmap(backgroundBitmap);

        ((ImageView)innerLayout
                .findViewById(R.id.smart_watch_notification_widget_text_background))
                .setVisibility(View.VISIBLE);
    }

    // set title
    ((TextView)innerLayout.findViewById(R.id.smart_watch_notification_widget_text_title))
            .setText(mEvent.getTitle());

    // set time stamp
    String time = ExtensionUtils.getFormattedTime(mEvent.getTime());
    ((TextView)innerLayout.findViewById(R.id.smart_watch_notification_widget_text_time))
            .setText(time);

    // set name
    ((TextView)innerLayout.findViewById(R.id.smart_watch_notification_widget_text_name))
            .setText(mEvent.getName());
}
 
开发者ID:fbarriga,项目名称:sony-smartband-logger,代码行数:28,代码来源:SmartWatchNotificationWidgetImage.java


示例3: SmartWatchWidgetImage

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Initiate the SmartWatch widget image.
 *
 * @param context The context.
 */
public SmartWatchWidgetImage(final Context context) {
    mContext = context;

    mText = null;
    mIconBitmap = null;
    mInnerLayoutResid = 0;
    mBadgeCount = 0;

    mOuterWidth = mContext.getResources().getDimensionPixelSize(
            R.dimen.smart_watch_widget_width_outer);
    mOuterHeight = mContext.getResources().getDimensionPixelSize(
            R.dimen.smart_watch_widget_height_outer);

    mInnerWidth = mContext.getResources().getDimensionPixelSize(
            R.dimen.smart_watch_widget_width_inner);
    mInnerHeight = mContext.getResources().getDimensionPixelSize(
            R.dimen.smart_watch_widget_height_inner);

    mBitmap = Bitmap.createBitmap(mOuterWidth, mOuterHeight, Bitmap.Config.ARGB_8888);

    // Set the density to default to avoid scaling.
    mBitmap.setDensity(DisplayMetrics.DENSITY_DEFAULT);
    mCanvas = new Canvas(mBitmap);

    // Options to avoid scaling.
    mBitmapOptions = new BitmapFactory.Options();
    mBitmapOptions.inDensity = DisplayMetrics.DENSITY_DEFAULT;
    mBitmapOptions.inTargetDensity = DisplayMetrics.DENSITY_DEFAULT;
    mBitmapOptions.inScaled = false;
}
 
开发者ID:fbarriga,项目名称:sony-smartband-logger,代码行数:36,代码来源:SmartWatchWidgetImage.java


示例4: draw

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Apply Set custom text. Typically used when only a text shall be
 * displayed, and no specific layout is needed.
 *
 * @param text The text.
 *
 * @return this.
 */
private void draw() {
    LinearLayout root = new LinearLayout(mContext);
    root.setLayoutParams(new LayoutParams(mOuterWidth, mOuterHeight));

    LinearLayout linearLayout = (LinearLayout)LinearLayout.inflate(mContext,
            R.layout.smart_watch_widget, root);

    if (mBadgeCount > 0) {
        TextView badgeText = (TextView)linearLayout
                .findViewById(R.id.smart_watch_widget_event_counter_text);
        badgeText.setText(Integer.toString(mBadgeCount));
        badgeText.setVisibility(View.VISIBLE);

        ImageView badgeBackground = (ImageView)linearLayout
                .findViewById(R.id.smart_watch_widget_event_counter_badge);
        badgeBackground.setVisibility(View.VISIBLE);
    }

    ImageView icon = (ImageView)linearLayout.findViewById(R.id.smart_watch_widget_icon);
    icon.setImageBitmap(mIconBitmap);

    if (null != mText) {
        TextView textView = (TextView)linearLayout
                .findViewById(R.id.smart_watch_widget_custom_text_view);
        textView.setText(mText);
    }

    ImageView customImage = (ImageView)linearLayout
            .findViewById(R.id.smart_watch_widget_custom_image);
    customImage.setImageBitmap(getInnerBitmap());

    linearLayout.measure(mOuterWidth, mOuterHeight);
    linearLayout
            .layout(0, 0, linearLayout.getMeasuredWidth(), linearLayout.getMeasuredHeight());

    linearLayout.draw(mCanvas);
}
 
开发者ID:fbarriga,项目名称:sony-smartband-logger,代码行数:46,代码来源:SmartWatchWidgetImage.java


示例5: getSupportedWidgetWidth

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get supported widget width.
 *
 * @param context The context.
 * @return the width.
 */
public static int getSupportedWidgetWidth(Context context) {
    return context.getResources().getDimensionPixelSize(R.dimen.smart_watch_widget_width_outer);
}
 
开发者ID:fbarriga,项目名称:sony-smartband-logger,代码行数:10,代码来源:NotificationWidgetExtension.java


示例6: getSupportedWidgetHeight

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get supported widget height.
 *
 * @param context The context.
 * @return the height.
 */
public static int getSupportedWidgetHeight(Context context) {
    return context.getResources()
            .getDimensionPixelSize(R.dimen.smart_watch_widget_height_outer);
}
 
开发者ID:fbarriga,项目名称:sony-smartband-logger,代码行数:11,代码来源:NotificationWidgetExtension.java


示例7: getSmartWatch2Width

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get SmartWatch 2 screen width.
 * 
 * @param context The context.
 * @return width.
 */
private static int getSmartWatch2Width(Context context) {
    return context.getResources().getDimensionPixelSize(R.dimen.smart_watch_2_control_width);
}
 
开发者ID:sonyxperiadev,项目名称:DroneControl,代码行数:10,代码来源:DeviceInfoHelper.java


示例8: getSmartWatch2Height

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get SmartWatch 2 screen height.
 * 
 * @param context The context.
 * @return height.
 */
private static int getSmartWatch2Height(Context context) {
    return context.getResources().getDimensionPixelSize(R.dimen.smart_watch_2_control_height);
}
 
开发者ID:sonyxperiadev,项目名称:DroneControl,代码行数:10,代码来源:DeviceInfoHelper.java


示例9: getSmartWatch2Width

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get SmartWatch 2 screen width.
 *
 * @param context The context.
 * @return width.
 */
private static int getSmartWatch2Width(Context context) {
    return context.getResources().getDimensionPixelSize(R.dimen.smart_watch_2_control_width);
}
 
开发者ID:jphacks,项目名称:KB_1511,代码行数:10,代码来源:DeviceInfoHelper.java


示例10: getSmartWatch2Height

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get SmartWatch 2 screen height.
 *
 * @param context The context.
 * @return height.
 */
private static int getSmartWatch2Height(Context context) {
    return context.getResources().getDimensionPixelSize(R.dimen.smart_watch_2_control_height);
}
 
开发者ID:jphacks,项目名称:KB_1511,代码行数:10,代码来源:DeviceInfoHelper.java


示例11: getSmartEyeglassWidth

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get SmartEyeglass screen width.
 *
 * @param context The context.
 * @return width.
 */
public static int getSmartEyeglassWidth(Context context) {
    return context.getResources().getDimensionPixelSize(R.dimen.smarteyeglass_control_width);
}
 
开发者ID:jphacks,项目名称:KB_1511,代码行数:10,代码来源:DeviceInfoHelper.java


示例12: getSmartEyeglassHeight

import com.sonyericsson.extras.liveware.extension.util.R; //导入依赖的package包/类
/**
 * Get SmartEyeglass screen height.
 *
 * @param context The context.
 * @return height.
 */
public static int getSmartEyeglassHeight(Context context) {
    return context.getResources().getDimensionPixelSize(R.dimen.smarteyeglass_control_height);
}
 
开发者ID:jphacks,项目名称:KB_1511,代码行数:10,代码来源:DeviceInfoHelper.java



注:本文中的com.sonyericsson.extras.liveware.extension.util.R类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BmobChatManager类代码示例发布时间:2022-05-22
下一篇:
Java SoundCategory类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap