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

Java ABTextUtil类代码示例

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

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



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

示例1: onViewCreated

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@Override public void onViewCreated(View view, Bundle savedInstanceState) {
  super.onViewCreated(view, savedInstanceState);
  // RecyclerView
  RecyclerView recyclerView = getRecyclerView();
  adapter = createAdapter();
  recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
  recyclerView.setAdapter(adapter);

  // SwipeRefresh

  // Fab
  RecyclerViewScrollDetector scrollDetector = new RecyclerViewScrollDetector(fab);
  recyclerView.addOnScrollListener(scrollDetector);
  RapidFloatingActionContentLabelList rfaContent =
      new RapidFloatingActionContentLabelList(getActivity());
  rfaContent.setOnRapidFloatingActionContentLabelListListener(this);
  rfaContent.setItems(getFabMenuItems())
      .setIconShadowRadius(ABTextUtil.dip2px(getActivity(), 5))
      .setIconShadowColor(0xff888888)
      .setIconShadowDy(ABTextUtil.dip2px(getActivity(), 5));

  fabHelper =
      new RapidFloatingActionHelper(getActivity(), fabMenuLayout, fab, rfaContent).build();
}
 
开发者ID:sockeqwe,项目名称:SecureBitcoinWallet,代码行数:25,代码来源:RecyclerViewFragment.java


示例2: init

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
private void init(Context context) {
    this.context = context;

    setBackgroundColor(Color.TRANSPARENT);

    // 设置绘制flag的paint
    paint = new Paint();
    paint.setColor(patientColor);
    paint.setAntiAlias(true);

    // 设置绘制文字的paint
    textPaint = new TextPaint();
    textPaint.setAntiAlias(true);
    textPaint.setColor(Color.WHITE);
    textPaint.setTextSize(ABTextUtil.sp2px(context, 12));
    textPaint.setTextAlign(Paint.Align.CENTER);
    textFontMetrics = textPaint.getFontMetrics();

}
 
开发者ID:wangjiegulu,项目名称:DraggableFlagView,代码行数:20,代码来源:DraggableFlagView.java


示例3: onCreateViewHolder

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
    View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.layout_all_note_item
            , viewGroup, false);
    if(i==0){
            StaggeredGridLayoutManager.LayoutParams lp=(StaggeredGridLayoutManager.LayoutParams)view.getLayoutParams();

        lp.setMargins(ABTextUtil.dip2px(viewGroup.getContext(), 8),ABTextUtil.dip2px(viewGroup.getContext(),8),
                ABTextUtil.dip2px(viewGroup.getContext(),8),ABTextUtil.dip2px(viewGroup.getContext(),8));
        view.setLayoutParams(lp);
    }
    return new GroupViewHolder(view);
}
 
开发者ID:tianyuan168326,项目名称:nono-android,代码行数:14,代码来源:LocalNoteAdapter.java


示例4: initInConstructor

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
protected void initInConstructor() {
    this.rfacItemDrawableSizePx = ABTextUtil.dip2px(this.getContext(), 24.0F);
    this.contentView = new LinearLayout(this.getContext());
    this.contentView.setLayoutParams(new LayoutParams(-1, -1));
    this.contentView.setOrientation(LinearLayout.VERTICAL);
    scrollView=new ScrollView(this.getContext());
    scrollView.addView(contentView);
    scrollView.setOverScrollMode(OVER_SCROLL_NEVER);
    this.setRootView(scrollView);
}
 
开发者ID:tianyuan168326,项目名称:nono-android,代码行数:11,代码来源:MyRapidFloatingActionContentLabelList.java


示例5: setItems

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
public MyRapidFloatingActionContentLabelList setItems(List<RFACLabelItem> items) {
    if(!ABTextUtil.isEmpty(items)) {
        this.items = items;
    }

    return this;
}
 
开发者ID:tianyuan168326,项目名称:nono-android,代码行数:8,代码来源:MyRapidFloatingActionContentLabelList.java


示例6: remove

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
public static Object remove(String tagUUID, StorageKey key) {
    if (null == key) {
        return null;
    }
    HashMap<StorageKey, WeakReference<Object>> extraMapper = storageMapper.get(tagUUID);
    if (null == extraMapper) {
        return null;
    }

    WeakReference<Object> ref = extraMapper.remove(key);
    if (ABTextUtil.isEmpty(extraMapper)) {
        storageMapper.remove(tagUUID);
    }
    return null == ref ? null : ref.get();
}
 
开发者ID:wangjiegulu,项目名称:AndroidStorageIntent,代码行数:16,代码来源:StoragePool.java


示例7: startActivity

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
public void startActivity(Context packageContext, Class<?> cls){
    if(isUsed){
        Logger.e(TAG, this + " can not be reuse!");
        return;
    }
    intent.setClass(packageContext, cls);
    if(!ABTextUtil.isEmpty(extras)){
        Set<Map.Entry<StorageKey, Object>> entrySet = extras.entrySet();
        for(Map.Entry<StorageKey, Object> entry : entrySet){
            StoragePool.storage(uuid, entry.getKey(), entry.getValue());
        }
    }
    isUsed = true;
    packageContext.startActivity(intent);
}
 
开发者ID:wangjiegulu,项目名称:AndroidStorageIntent,代码行数:16,代码来源:StorageIntentCenter.java


示例8: unregister

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
public void unregister(@NonNull Object tag, @NonNull Observable observable) {
    List<Subject> subjects = subjectMapper.get(tag);
    if (null != subjects) {
        subjects.remove((Subject) observable);
        if (ABTextUtil.isEmpty(subjects)) {
            subjectMapper.remove(tag);
        }
    }

    if (DEBUG) Log.d(TAG, "[unregister]subjectMapper: " + subjectMapper);
}
 
开发者ID:wangjiegulu,项目名称:RxAndroidEventsSample,代码行数:12,代码来源:RxBus.java


示例9: post

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void post(@NonNull Object tag, @NonNull Object content) {
    List<Subject> subjectList = subjectMapper.get(tag);

    if (!ABTextUtil.isEmpty(subjectList)) {
        for (Subject subject : subjectList) {
            subject.onNext(content);
        }
    }
    if (DEBUG) Log.d(TAG, "[send]subjectMapper: " + subjectMapper);
}
 
开发者ID:wangjiegulu,项目名称:RxAndroidEventsSample,代码行数:12,代码来源:RxBus.java


示例10: clear

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
public void clear() {
    if (!ABTextUtil.isEmpty(registeredObservable)) {
        for (ObservableWrapper observableWrapper : registeredObservable) {
            RxBus.get().unregister(observableWrapper.getTag(), observableWrapper.getObservable());
        }
    }
}
 
开发者ID:wangjiegulu,项目名称:RxAndroidEventsSample,代码行数:8,代码来源:RxBusAnnotationManager.java


示例11: onLoadReeds

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@Override
public void onLoadReeds(List<Feed> feedList) {
    if (!ABTextUtil.isEmpty(feedList)) {
        int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
        int insertPos = firstVisibleItemPosition < 0 ? 0 : firstVisibleItemPosition + 1;
        adapter.getList().addAll(insertPos, feedList);
        adapter.notifyItemInserted(insertPos);
    }

}
 
开发者ID:wangjiegulu,项目名称:RxAndroidEventsSample,代码行数:11,代码来源:TabFeedContainer.java


示例12: deleteFeed

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@Override
public void deleteFeed() {
    List<Feed> list = adapter.getList();
    if (!ABTextUtil.isEmpty(list)) {
        list.remove(0);
        adapter.notifyItemRemoved(0);
    }
}
 
开发者ID:wangjiegulu,项目名称:RxAndroidEventsSample,代码行数:9,代码来源:TabFeedContainer.java


示例13: getContentView

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@NonNull
@Override
protected View getContentView() {
    contentView = new LinearLayout(getContext());
    contentView.setOrientation(LinearLayout.VERTICAL);
    ShadowViewHelper.bindShadowHelper(
            new ShadowProperty()
                    .setShadowRadius(ABTextUtil.dip2px(getContext(), 4))
                    .setShadowColor(0x66000000)
            ,
            contentView
    );

    contentView.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    for (int i = 0, len = list.size(); i < len; i++) {
        View item = LayoutInflater.from(getContext()).inflate(R.layout.content_card_list_item, null);
        View rootView = item.findViewById(R.id.content_card_list_item_root_view);
        rootView.setTag(com.wangjie.rapidfloatingactionbutton.R.id.rfab__id_content_label_list_item_position, i);
        ABViewUtil.setBackgroundDrawable(rootView, ABShape.selectorClickColorCornerSimple(Color.WHITE, 0xffF0F0F0, 0));
        rootView.setOnClickListener(this);

        ImageView logoIv = (ImageView) rootView.findViewById(R.id.content_card_list_item_logo_iv);
        TextView titleTv = (TextView) rootView.findViewById(R.id.content_card_list_item_title_tv);
        CardItem cardItem = list.get(i);
        logoIv.setImageResource(cardItem.getResId());
        titleTv.setText(cardItem.getName());

        contentView.addView(item);
    }

    return contentView;
}
 
开发者ID:wangjiegulu,项目名称:RapidFloatingActionButton,代码行数:33,代码来源:RapidFloatingActionContentCardListView.java


示例14: initAfterConstructor

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
private void initAfterConstructor() {
    this.setOnClickListener(this);
    // 中间图片大小24dp
    buttonDrawableSize = ABTextUtil.dip2px(getContext(), RFABConstants.SIZE.RFAB_DRAWABLE_SIZE_DP);

    refreshRFABDisplay();
}
 
开发者ID:wangjiegulu,项目名称:RapidFloatingActionButton,代码行数:8,代码来源:RapidFloatingActionButton.java


示例15: initInConstructor

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@Override
protected void initInConstructor() {
    rfacItemDrawableSizePx = ABTextUtil.dip2px(getContext(), RFABConstants.SIZE.RFAC_ITEM_DRAWABLE_SIZE_DP);

    contentView = new LinearLayout(getContext());
    contentView.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    contentView.setOrientation(LinearLayout.VERTICAL);
    setRootView(contentView);
}
 
开发者ID:wangjiegulu,项目名称:RapidFloatingActionButton,代码行数:10,代码来源:RapidFloatingActionContentLabelList.java


示例16: refreshCurRadiusByMoveDistance

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
/**
     * 根据移动的距离来刷新原来的圆半径大小
     *
     * @param distance
     */
    private void refreshCurRadiusByMoveDistance(int distance) {
        if (distance > maxMoveLength) {
            isArrivedMaxMoved = true;
            curRadius = 0;
        } else {
            isArrivedMaxMoved = false;
            float calcRadius = (1 - 1f * distance / maxMoveLength) * originRadius;
            float maxRadius = ABTextUtil.dip2px(context, 2);
            curRadius = (int) Math.max(calcRadius, maxRadius);
//            Logger.d(TAG, "[refreshCurRadiusByMoveDistance]curRadius: " + curRadius + ", calcRadius: " + calcRadius + ", maxRadius: " + maxRadius);
        }

    }
 
开发者ID:wangjiegulu,项目名称:DraggableFlagView,代码行数:19,代码来源:DraggableFlagView.java


示例17: onWindowInitialized

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@Override
public void onWindowInitialized() {
    super.onWindowInitialized();
    WaveCompat.transitionDefaultInitial(this, ABTextUtil.dip2px(context, 80), backgroundFromColor, Color.GRAY);
}
 
开发者ID:wangjiegulu,项目名称:WaveCompat,代码行数:6,代码来源:SecondWareTestActivity.java


示例18: parserObservableEventAnnotations

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
public <T> void parserObservableEventAnnotations(Method method) throws Exception {
    if (null == method || !method.isAnnotationPresent(Accept.class)) {
        return;
    }
    Class[] params = method.getParameterTypes();
    // 参数必须是两个,第1个必须是Object类型的tag
    if (null == params || 2 != params.length || !Object.class.isAssignableFrom(params[0])) {
        throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, T object)");
    }

    Accept accept = method.getAnnotation(Accept.class);
    AcceptType[] acceptTypes = accept.value();

    // 默认clazz参数类型
    Class<T> targetClazz = params[1];
    // 默认clazz参数类型的全类名
    String targetTag = targetClazz.getName();
    Class<T> specClazz;
    String specTag;
    int acceptTypeLength = null == acceptTypes ? 0 : acceptTypes.length;
    switch (acceptTypeLength) {
        case 0: // 如果acceptType是空,则说明具体的类型是params[1],所以params[1]不能为Object类型
            if (Object.class.equals(targetClazz)) {
                throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, T object)");
            }
            registerObservable(method, targetTag, targetClazz, accept.acceptScheduler());
            break;
        case 1: // 如果只有一个,如果acceptType中tag不为空,则使用
            // 默认clazz参数类型,acceptType中指定clazz优先
            specClazz = acceptTypes[0].clazz();
            if (!Object.class.equals(specClazz)) {
                targetClazz = specClazz;
            }
            if (Object.class.equals(targetClazz)) {
                throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, T object) OR clazz of @AcceptType");
            }
            targetTag = targetClazz.getName();
            // 默认tag参数类型的全类名,acceptType中指定tag优先
            specTag = acceptTypes[0].tag();
            if (!ABTextUtil.isEmpty(specTag)) {
                targetTag = specTag;
            }
            registerObservable(method, targetTag, targetClazz, accept.acceptScheduler());
            break;
        default: // 如果有多个,则params[1]必须是Object
            if (!Object.class.equals(targetClazz)) {
                throw new Exception("the method[" + method.getName() + "] must defined xxx(Object tag, Object object)");
            }
            for (AcceptType acceptType : acceptTypes) {
                specClazz = acceptType.clazz();
                specTag = acceptType.tag();
                // 默认tag参数类型的全名,acceptType中指定tag优先
                registerObservable(method, ABTextUtil.isEmpty(specTag) ? specClazz.getName() : specTag, specClazz, accept.acceptScheduler());
            }
            break;
    }


}
 
开发者ID:wangjiegulu,项目名称:RxAndroidEventsSample,代码行数:60,代码来源:RxBusAnnotationManager.java


示例19: onCreate

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        /*
        // 可通过代码设置属性
        rfaLayout.setFrameColor(Color.RED);
        rfaLayout.setFrameAlpha(0.4f);

        rfaButton.setNormalColor(0xff37474f);
        rfaButton.setPressedColor(0xff263238);
        rfaButton.getRfabProperties().setShadowDx(ABTextUtil.dip2px(context, 3));
        rfaButton.getRfabProperties().setShadowDy(ABTextUtil.dip2px(context, 3));
        rfaButton.getRfabProperties().setShadowRadius(ABTextUtil.dip2px(context, 5));
        rfaButton.getRfabProperties().setShadowColor(0xffcccccc);
        rfaButton.getRfabProperties().setStandardSize(RFABSize.MINI);
        rfaButton.build();
        */

        RapidFloatingActionContentLabelList rfaContent = new RapidFloatingActionContentLabelList(context);
        rfaContent.setOnRapidFloatingActionContentLabelListListener(this);
        List<RFACLabelItem> items = new ArrayList<>();
        items.add(new RFACLabelItem<Integer>()
                        .setLabel("Github: wangjiegulu")
                        .setResId(R.mipmap.ico_test_d)
                        .setIconNormalColor(0xffd84315)
                        .setIconPressedColor(0xffbf360c)
                        .setWrapper(0)
        );
        items.add(new RFACLabelItem<Integer>()
                        .setLabel("[email protected]")
//                        .setResId(R.mipmap.ico_test_c)
                        .setDrawable(getResources().getDrawable(R.mipmap.ico_test_c))
                        .setIconNormalColor(0xff4e342e)
                        .setIconPressedColor(0xff3e2723)
                        .setLabelColor(Color.WHITE)
                        .setLabelSizeSp(14)
                        .setLabelBackgroundDrawable(ABShape.generateCornerShapeDrawable(0xaa000000, ABTextUtil.dip2px(context, 4)))
                        .setWrapper(1)
        );
        items.add(new RFACLabelItem<Integer>()
                        .setLabel("WangJie")
                        .setResId(R.mipmap.ico_test_b)
                        .setIconNormalColor(0xff056f00)
                        .setIconPressedColor(0xff0d5302)
                        .setLabelColor(0xff056f00)
                        .setWrapper(2)
        );
        items.add(new RFACLabelItem<Integer>()
                        .setLabel("Compose")
                        .setResId(R.mipmap.ico_test_a)
                        .setIconNormalColor(0xff283593)
                        .setIconPressedColor(0xff1a237e)
                        .setLabelColor(0xff283593)
                        .setWrapper(3)
        );
        rfaContent
                .setItems(items)
                .setIconShadowRadius(ABTextUtil.dip2px(context, 5))
                .setIconShadowColor(0xff888888)
                .setIconShadowDy(ABTextUtil.dip2px(context, 5))
        ;

        rfabHelper = new RapidFloatingActionHelper(
                context,
                rfaLayout,
                rfaButton,
                rfaContent
        ).build();

    }
 
开发者ID:wangjiegulu,项目名称:RapidFloatingActionButton,代码行数:72,代码来源:LabelListSampleActivity.java


示例20: initRFAB

import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
private void initRFAB() {
    if (null == rfaButton) {
        return;
    }

    /*
    // 可通过代码设置属性
    rfaLayout.setFrameColor(Color.RED);
    rfaLayout.setFrameAlpha(0.4f);

    rfaBtn.setNormalColor(0xff37474f);
    rfaBtn.setPressedColor(0xff263238);
    rfaBtn.getRfabProperties().setShadowDx(ABTextUtil.dip2px(context, 3));
    rfaBtn.getRfabProperties().setShadowDy(ABTextUtil.dip2px(context, 3));
    rfaBtn.getRfabProperties().setShadowRadius(ABTextUtil.dip2px(context, 5));
    rfaBtn.getRfabProperties().setShadowColor(0xffcccccc);
    rfaBtn.getRfabProperties().setStandardSize(RFABSize.MINI);
    rfaBtn.build();
    */


    RapidFloatingActionContentLabelList rfaContent = new RapidFloatingActionContentLabelList(context);
    rfaContent.setOnRapidFloatingActionContentLabelListListener(this);
    List<RFACLabelItem> items = new ArrayList<>();
    items.add(new RFACLabelItem<Integer>()
                    .setLabel("Github: wangjiegulu")
                    .setResId(R.mipmap.ico_test_d)
                    .setIconNormalColor(0xff6a1b9a)
                    .setIconPressedColor(0xff4a148c)
                    .setWrapper(0)
    );
    items.add(new RFACLabelItem<Integer>()
                    .setLabel("[email protected]")
                    .setResId(R.mipmap.ico_test_c)
                    .setIconNormalColor(0xff4e342e)
                    .setIconPressedColor(0xff3e2723)
                    .setLabelColor(Color.WHITE)
                    .setLabelSizeSp(14)
                    .setLabelBackgroundDrawable(ABShape.generateCornerShapeDrawable(0xaa000000, ABTextUtil.dip2px(context, 4)))
                    .setWrapper(1)
    );
    items.add(new RFACLabelItem<Integer>()
                    .setLabel("WangJie")
                    .setResId(R.mipmap.ico_test_b)
                    .setIconNormalColor(0xff056f00)
                    .setIconPressedColor(0xff0d5302)
                    .setLabelColor(0xff056f00)
                    .setWrapper(2)
    );
    items.add(new RFACLabelItem<Integer>()
                    .setLabel("Compose")
                    .setResId(R.mipmap.ico_test_a)
                    .setIconNormalColor(0xff283593)
                    .setIconPressedColor(0xff1a237e)
                    .setLabelColor(0xff283593)
                    .setWrapper(3)
    );
    rfaContent
            .setItems(items)
            .setIconShadowRadius(ABTextUtil.dip2px(context, 5))
            .setIconShadowColor(0xff888888)
            .setIconShadowDy(ABTextUtil.dip2px(context, 5))
    ;

    rfabHelper = new RapidFloatingActionHelper(
            context,
            rfaLayout,
            rfaButton,
            rfaContent
    ).build();
}
 
开发者ID:wangjiegulu,项目名称:RapidFloatingActionButton,代码行数:72,代码来源:FragmentA.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java RepositoryManager类代码示例发布时间:2022-05-22
下一篇:
Java Options类代码示例发布时间: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