com.mindorks.placeholderview.annotations.Layout类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中com.mindorks.placeholderview.annotations.Layout类的一些代码示例,展示了Layout类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layout类的具体详情如下:
包路径:com.mindorks.placeholderview.annotations.Layout
类名称:Layout

Layout介绍

暂无

代码示例

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.load_more_view)
public class LoadMoreView {

代码示例来源:origin: janishar/PlaceHolderView

public static TypeElement validateLayout(TypeElement typeElement) throws IllegalUseException {
  validateNonPrivateModifier(typeElement);
  Layout layout = typeElement.getAnnotation(Layout.class);
  if (layout.value() <= 0) {
    String msg = "@Layout should have positive value passed";
    throw new IllegalUseException(msg);
  }
  return typeElement;
}

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.card_layout)
public class CardPresenter {
  @View(R.id.question_caption)

代码示例来源:origin: janishar/PlaceHolderView

public ViewBinderClassStructure addConstructor() {
  Layout layout = getClassDetail().getTypeElement().getAnnotation(Layout.class);
  NonReusable nonReusable = getClassDetail().getTypeElement().getAnnotation(NonReusable.class);
  boolean nullable = nonReusable != null;
  getClassBuilder()
      .addMethod(MethodSpec.constructorBuilder()
          .addModifiers(Modifier.PUBLIC)
          .addParameter(getClassDetail().getClassName(), NameStore.Variable.RESOLVER)
          .addStatement("super($N, $T.$L, $L)",
              NameStore.Variable.RESOLVER,
              getRClassBuilder().getLayoutClassName(),
              getRClassBuilder().addLayoutId(getClassDetail().getTypeElement(), layout.value()),
              nullable)
          .build());
  return this;
}

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.swipe_card_view)
public class SwipeCard {

代码示例来源:origin: janishar/PlaceHolderView

@Override
public ExpandableViewBinderClassStructure addConstructor() {
  Layout layout = getClassDetail().getTypeElement().getAnnotation(Layout.class);
  NonReusable nonReusable = getClassDetail().getTypeElement().getAnnotation(NonReusable.class);
  Parent parentAnnotation = getClassDetail().getTypeElement().getAnnotation(Parent.class);
  SingleTop singleTopAnnotation = getClassDetail().getTypeElement().getAnnotation(SingleTop.class);
  boolean nullable = nonReusable != null;
  boolean parent = parentAnnotation != null && parentAnnotation.value();
  boolean singleTop = singleTopAnnotation != null && singleTopAnnotation.value();
  getClassBuilder()
      .addMethod(MethodSpec.constructorBuilder()
          .addModifiers(Modifier.PUBLIC)
          .addParameter(getClassDetail().getClassName(), NameStore.Variable.RESOLVER)
          .addStatement("super($N, $T.$L, $L, $L, $L)",
              NameStore.Variable.RESOLVER,
              getRClassBuilder().getLayoutClassName(),
              getRClassBuilder().addLayoutId(getClassDetail().getTypeElement(), layout.value()),
              nullable,
              parent,
              singleTop)
          .build());
  return this;
}

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.gallery_item_small)
public class ImageTypeSmall {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.gallery_item_small_placeholder)
public class ImageTypeSmallPlaceHolder {

代码示例来源:origin: janishar/PlaceHolderView

/**
 * Created by janisharali on 19/08/16.
 */
@NonReusable
@Layout(R.layout.drawer_header)
public class DrawerHeader {

  @View(R.id.profileImageView)
  ImageView profileImage;

  @View(R.id.nameTxt)
  TextView nameTxt;

  @View(R.id.emailTxt)
  TextView emailTxt;

  @Resolve
  public void onResolved() {
    nameTxt.setText("Janishar Ali");
    emailTxt.setText("janishar.ali@gmail.com");
  }

  @Recycle
  public void onRecycled() {
    Log.i("DEBUG", "onRecycled");
  }
}

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.load_more_item_view)
public class ItemView {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.gallery_item_big)
public class ImageTypeBig {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.drawer_item)
public class DrawerMenuItem {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.tinder_card_view)
public class TinderDirectionalCard {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.tinder_card_view)
public class TinderCard2 {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.tinder_card_view)
public class TinderCard {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.feed_item)
public class InfoView {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.feed_heading)
public class HeadingView {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.drawer_item)
public class ChildItem {

代码示例来源:origin: MindorksOpenSource/android-mvp-architecture

@Layout(R.layout.card_layout)
public class QuestionCard {

代码示例来源:origin: janishar/PlaceHolderView

@Layout(R.layout.drawer_item)
public class ParentItem {

相关文章

Layout类方法