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


Java UITableViewCellStyle类代码示例

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


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

示例1: PAPActivityCell

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
public PAPActivityCell(UITableViewCellStyle style, String reuseIdentifier) {
    super(style, reuseIdentifier);

    horizontalTextSpace = getHorizontalTextSpaceForInsetWidth(0);

    // Create subviews and set cell properties
    setOpaque(true);
    setSelectionStyle(UITableViewCellSelectionStyle.None);
    setAccessoryType(UITableViewCellAccessoryType.None);

    activityImageView = new PAPProfileImageView();
    activityImageView.setBackgroundColor(UIColor.clear());
    activityImageView.setOpaque(true);
    mainView.addSubview(activityImageView);

    activityImageButton = new UIButton(UIButtonType.Custom);
    activityImageButton.setBackgroundColor(UIColor.clear());
    activityImageButton.addOnTouchUpInsideListener(didTapActivityButton);
    mainView.addSubview(activityImageButton);
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:21,代码来源:PAPActivityCell.java

示例2: PAPPhotoCell

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
public PAPPhotoCell(UITableViewCellStyle style, String reuseIdentifier) {
    super(style, reuseIdentifier);

    setOpaque(false);
    setSelectionStyle(UITableViewCellSelectionStyle.None);
    setAccessoryType(UITableViewCellAccessoryType.None);
    setClipsToBounds(false);

    setBackgroundColor(UIColor.clear());

    getImageView().setFrame(new CGRect(0, 0, getBounds().getWidth(), getBounds().getWidth()));
    getImageView().setBackgroundColor(UIColor.black());
    getImageView().setContentMode(UIViewContentMode.ScaleAspectFit);

    photoButton = new UIButton(UIButtonType.Custom);
    photoButton.setFrame(new CGRect(0, 0, getBounds().getWidth(), getBounds().getWidth()));
    photoButton.setBackgroundColor(UIColor.clear());
    getContentView().addSubview(photoButton);

    getContentView().bringSubviewToFront(getImageView());
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:22,代码来源:PAPPhotoCell.java

示例3: PAPLoadMoreCell

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
public PAPLoadMoreCell(UITableViewCellStyle style, String reuseIdentifier) {
    super(style, reuseIdentifier);

    setOpaque(false);
    setSelectionStyle(UITableViewCellSelectionStyle.None);
    setAccessoryType(UITableViewCellAccessoryType.None);
    setBackgroundColor(UIColor.clear());

    mainView = new UIView(getContentView().getFrame());
    if (reuseIdentifier.equals("NextPageDetails")) {
        mainView.setBackgroundColor(UIColor.white());
    } else {
        mainView.setBackgroundColor(UIColor.black());
    }

    loadMoreImageView = new UIImageView(UIImage.getImage("CellLoadMore"));
    mainView.addSubview(loadMoreImageView);

    getContentView().addSubview(mainView);
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:21,代码来源:PAPLoadMoreCell.java

示例4: getCellForNextPage

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
@Override
public PFTableViewCell getCellForNextPage(UITableView tableView, NSIndexPath indexPath) {
    final String cellID = "NextPageCell";

    PAPLoadMoreCell cell = (PAPLoadMoreCell) tableView.dequeueReusableCell(cellID);

    if (cell == null) {
        cell = new PAPLoadMoreCell(UITableViewCellStyle.Default, cellID);
        cell.getMainView().setBackgroundColor(UIColor.black());
        cell.setHideSeparatorBottom(true);
        cell.setHideSeparatorTop(true);
    }

    cell.setSelectionStyle(UITableViewCellSelectionStyle.None);

    return cell;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:18,代码来源:PAPFindFriendsViewController.java

示例5: getCellForRow

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
@Override
public PFTableViewCell getCellForRow(UITableView tableView, NSIndexPath indexPath, PAPActivity activity) {
    final String cellID = "CommentCell";

    // Try to dequeue a cell and create one if necessary
    PAPBaseTextCell cell = (PAPBaseTextCell) tableView.dequeueReusableCell(cellID);
    if (cell == null) {
        cell = new PAPBaseTextCell(UITableViewCellStyle.Default, cellID);
        cell.setCellInsetWidth(CELL_INSET_WIDTH);
        cell.setDelegate(this);
    }

    cell.setUser(activity.getFromUser());
    cell.setContentText(activity.getContent());
    cell.setDate(activity.getCreatedAt());

    return cell;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:19,代码来源:PAPPhotoDetailsViewController.java

示例6: getCellForRow

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
@Override
public PFTableViewCell getCellForRow(UITableView tableView, NSIndexPath indexPath, PAPActivity activity) {
    final String cellIdentifier = "ActivityCell";

    PAPActivityCell cell = (PAPActivityCell) tableView.dequeueReusableCell(cellIdentifier);
    if (cell == null) {
        cell = new PAPActivityCell(UITableViewCellStyle.Default, cellIdentifier);
        cell.setDelegate(this);
        cell.setSelectionStyle(UITableViewCellSelectionStyle.None);
    }

    cell.setActivity(activity);

    cell.setIsNew(lastRefresh.compare(activity.getCreatedAt()) == NSComparisonResult.Ascending);

    cell.hideSeparator(indexPath.getRow() == getObjects().size() - 1);

    return cell;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:20,代码来源:PAPActivityFeedViewController.java

示例7: getCellForNextPage

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
@Override
public PFTableViewCell getCellForNextPage(UITableView tableView, NSIndexPath indexPath) {
    final String loadMoreCellIdentifier = "LoadMoreCell";

    PAPLoadMoreCell cell = (PAPLoadMoreCell) tableView.dequeueReusableCell(loadMoreCellIdentifier);
    if (cell == null) {
        cell = new PAPLoadMoreCell(UITableViewCellStyle.Default, loadMoreCellIdentifier);
        cell.setSelectionStyle(UITableViewCellSelectionStyle.None);
        cell.getSeparatorImageTop().setImage(UIImage.create("SeparatorTimelineDark"));
        cell.setHideSeparatorBottom(true);
        cell.getMainView().setBackgroundColor(UIColor.clear());
    }
    return cell;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:15,代码来源:PAPAccountViewController.java

示例8: getCellForRow

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
@Override
public PFTableViewCell getCellForRow(UITableView tableView, NSIndexPath indexPath, PAPPhoto photo) {
    final String cellIdentifier = "Cell";

    int index = getIndexForObjectAt(indexPath);

    if (indexPath.getRow() % 2 == 0) {
        // Header
        return getDetailPhotoCellForRow(indexPath);
    } else {
        // Photo
        PAPPhotoCell cell = (PAPPhotoCell) getTableView().dequeueReusableCell(cellIdentifier);

        if (cell == null) {
            cell = new PAPPhotoCell(UITableViewCellStyle.Default, cellIdentifier);
            cell.getPhotoButton().addOnTouchUpInsideListener(didTapOnPhotoAction);
        }

        cell.getPhotoButton().setTag(index);
        cell.getImageView().setImage(UIImage.getImage("PlaceholderPhoto"));

        if (photo != null) {
            cell.getImageView().setFile(photo.getPicture());

            // PFQTVC will take care of asynchronously downloading files,
            // but will only load them when the tableview is not moving. If
            // the data is there, let's load it right away.
            if (cell.getImageView().getFile().isDataAvailable()) {
                cell.getImageView().loadInBackground();
            }
        }

        return cell;
    }
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:36,代码来源:PAPPhotoTimelineViewController.java

示例9: getCellForNextPage

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
@Override
public PFTableViewCell getCellForNextPage(UITableView tableView, NSIndexPath indexPath) {
    final String loadMoreCellIdentifier = "LoadMoreCell";

    PAPLoadMoreCell cell = (PAPLoadMoreCell) tableView.dequeueReusableCell(loadMoreCellIdentifier);
    if (cell == null) {
        cell = new PAPLoadMoreCell(UITableViewCellStyle.Default, loadMoreCellIdentifier);
        cell.setSelectionStyle(UITableViewCellSelectionStyle.None);
        cell.setHideSeparatorBottom(true);
        cell.getMainView().setBackgroundColor(UIColor.clear());
    }
    return cell;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:14,代码来源:PAPPhotoTimelineViewController.java

示例10: getCellForNextPage

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
@Override
public PFTableViewCell getCellForNextPage(UITableView tableView, NSIndexPath indexPath) {
    final String cellIdentifier = "NextPageDetails";

    PAPLoadMoreCell cell = (PAPLoadMoreCell) tableView.dequeueReusableCell(cellIdentifier);

    if (cell == null) {
        cell = new PAPLoadMoreCell(UITableViewCellStyle.Default, cellIdentifier);
        cell.setCellInsetWidth(CELL_INSET_WIDTH);
        cell.setHideSeparatorTop(true);
    }

    return cell;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:15,代码来源:PAPPhotoDetailsViewController.java

示例11: PAPBaseTextCell

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
public PAPBaseTextCell(UITableViewCellStyle style, String reuseIdentifier) {
    super(style, reuseIdentifier);

    setClipsToBounds(true);
    horizontalTextSpace = PAPBaseTextCell.getHorizontalTextSpaceForInsetWidth(cellInsetWidth);

    setOpaque(true);
    setSelectionStyle(UITableViewCellSelectionStyle.None);
    setAccessoryType(UITableViewCellAccessoryType.None);
    setBackgroundColor(UIColor.clear());

    mainView = new UIView(getContentView().getFrame());
    mainView.setBackgroundColor(UIColor.white());

    avatarImageView = new PAPProfileImageView();
    avatarImageView.setBackgroundColor(UIColor.clear());
    avatarImageView.setOpaque(true);
    avatarImageView.getLayer().setCornerRadius(16);
    avatarImageView.getLayer().setMasksToBounds(true);
    mainView.addSubview(avatarImageView);

    nameButton = new UIButton(UIButtonType.Custom);
    nameButton.setBackgroundColor(UIColor.clear());

    if (reuseIdentifier.equals("ActivityCell")) {
        nameButton.setTitleColor(UIColor.white(), UIControlState.Normal);
        nameButton.setTitleColor(UIColor.fromRGBA(114f / 255f, 114f / 255f, 114f / 255f, 1),
                UIControlState.Highlighted);
    } else {
        nameButton.setTitleColor(UIColor.fromRGBA(34f / 255f, 34f / 255f, 34f / 255f, 1), UIControlState.Normal);
        nameButton.setTitleColor(UIColor.fromRGBA(114f / 255f, 114f / 255f, 114f / 255f, 1),
                UIControlState.Highlighted);
    }

    nameButton.getTitleLabel().setFont(UIFont.getBoldSystemFont(13));
    nameButton.getTitleLabel().setLineBreakMode(NSLineBreakMode.TruncatingTail);
    nameButton.addOnTouchUpInsideListener(didTapUserButton);
    mainView.addSubview(nameButton);

    contentLabel = new UILabel();
    contentLabel.setFont(UIFont.getSystemFont(13));
    if (reuseIdentifier.equals("ActivityCell")) {
        contentLabel.setTextColor(UIColor.white());
    } else {
        contentLabel.setTextColor(UIColor.fromRGBA(34f / 255f, 34f / 255f, 34f / 255f, 1));
    }
    contentLabel.setNumberOfLines(0);
    contentLabel.setLineBreakMode(NSLineBreakMode.WordWrapping);
    contentLabel.setBackgroundColor(UIColor.clear());
    mainView.addSubview(contentLabel);

    timeLabel = new UILabel();
    timeLabel.setFont(UIFont.getSystemFont(11));
    timeLabel.setTextColor(UIColor.fromRGBA(114f / 255f, 114f / 255f, 114f / 255f, 1));
    timeLabel.setBackgroundColor(UIColor.clear());
    mainView.addSubview(timeLabel);

    avatarImageButton = new UIButton(UIButtonType.Custom);
    avatarImageButton.setBackgroundColor(UIColor.clear());
    avatarImageButton.addOnTouchUpInsideListener(didTapUserButton);

    mainView.addSubview(avatarImageButton);

    separatorImage = new UIImageView(UIImage.getImage("SeparatorComments").newResizableImage(
            new UIEdgeInsets(0, 1, 0, 1)));

    getContentView().addSubview(mainView);
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:69,代码来源:PAPBaseTextCell.java

示例12: PAPFindFriendsCell

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
public PAPFindFriendsCell(UITableViewCellStyle style, String reuseIdentifier) {
    super(style, reuseIdentifier);

    setBackgroundColor(UIColor.black());
    setSelectionStyle(UITableViewCellSelectionStyle.None);

    avatarImageView = new PAPProfileImageView(new CGRect(10, 14, 40, 40));
    avatarImageView.getLayer().setCornerRadius(20);
    avatarImageView.getLayer().setMasksToBounds(true);
    getContentView().addSubview(avatarImageView);

    avatarImageButton = new UIButton(UIButtonType.Custom);
    avatarImageButton.setBackgroundColor(UIColor.clear());
    avatarImageButton.setFrame(new CGRect(10, 14, 40, 40));
    avatarImageButton.addOnTouchUpInsideListener(didTapUserButton);
    getContentView().addSubview(avatarImageButton);

    nameButton = new UIButton(UIButtonType.Custom);
    nameButton.setBackgroundColor(UIColor.clear());
    nameButton.getTitleLabel().setFont(UIFont.getBoldSystemFont(16));
    nameButton.getTitleLabel().setLineBreakMode(NSLineBreakMode.TruncatingTail);
    nameButton.setTitleColor(UIColor.white(), UIControlState.Normal);
    nameButton
            .setTitleColor(UIColor.fromRGBA(114f / 255f, 114f / 255f, 114f / 255f, 1), UIControlState.Highlighted);
    nameButton.addOnTouchUpInsideListener(didTapUserButton);
    getContentView().addSubview(nameButton);

    photoLabel = new UILabel();
    photoLabel.setFont(UIFont.getSystemFont(11));
    photoLabel.setTextColor(UIColor.gray());
    photoLabel.setBackgroundColor(UIColor.clear());
    getContentView().addSubview(photoLabel);

    followButton = new UIButton(UIButtonType.Custom);
    followButton.getTitleLabel().setFont(UIFont.getBoldSystemFont(15));
    followButton.setTitleEdgeInsets(new UIEdgeInsets(0, 10, 0, 0));
    followButton.setBackgroundImage(UIImage.getImage("ButtonFollow"), UIControlState.Normal);
    followButton.setBackgroundImage(UIImage.getImage("ButtonFollowing"), UIControlState.Selected);
    followButton.setImage(UIImage.getImage("IconTick"), UIControlState.Selected);
    followButton.setTitle("Follow  ", UIControlState.Normal);
    followButton.setTitle("Following", UIControlState.Selected);
    followButton.setTitleColor(UIColor.fromRGBA(254f / 255f, 149f / 255f, 50f / 255f, 1), UIControlState.Normal);
    followButton.setTitleColor(UIColor.white(), UIControlState.Selected);
    followButton.addOnTouchUpInsideListener(didTapFollowButton);
    getContentView().addSubview(followButton);
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:47,代码来源:PAPFindFriendsCell.java

示例13: MyTableViewCell

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
public MyTableViewCell(UITableViewCellStyle style, String reuseIdentifier) {
    // ignore the style argument and force the creation with style
    // UITableViewCellStyleSubtitle
    super(UITableViewCellStyle.Subtitle, reuseIdentifier);
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:6,代码来源:RootViewController.java

示例14: TableViewCell

import org.robovm.apple.uikit.UITableViewCellStyle; //导入依赖的package包/类
public TableViewCell(String resource, String reuseIdentifier) {
    super(UITableViewCellStyle.Default, reuseIdentifier);

    LayoutBridge bridge = new LayoutBridge(getContentView().getBounds());
    bridge.setAutoresizingMask(UIViewAutoresizing.FlexibleWidth.set(UIViewAutoresizing.FlexibleHeight));

    getContentView().addSubview(bridge);

    LayoutInflater inflater = new LayoutInflater();
    inflater.inflate(resource, bridge, true);

    this.layoutBridge = bridge;
}
 
开发者ID:liraz,项目名称:robolayout,代码行数:14,代码来源:TableViewCell.java


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