本文整理汇总了Java中com.wangjie.androidbucket.utils.ABTextUtil类的典型用法代码示例。如果您正苦于以下问题:Java ABTextUtil类的具体用法?Java ABTextUtil怎么用?Java ABTextUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ABTextUtil类属于com.wangjie.androidbucket.utils包,在下文中一共展示了ABTextUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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();
}
示例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);
}
示例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);
}
示例5: setItems
import com.wangjie.androidbucket.utils.ABTextUtil; //导入依赖的package包/类
public MyRapidFloatingActionContentLabelList setItems(List<RFACLabelItem> items) {
if(!ABTextUtil.isEmpty(items)) {
this.items = items;
}
return this;
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
示例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