本文整理汇总了Java中com.daimajia.swipedemo.R类的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
R类属于com.daimajia.swipedemo包,在下文中一共展示了R类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SimpleViewHolder
import com.daimajia.swipedemo.R; //导入依赖的package包/类
public SimpleViewHolder(View itemView) {
super(itemView);
swipeLayout = (SwipeLayout) itemView.findViewById(R.id.swipe);
textViewPos = (TextView) itemView.findViewById(R.id.position);
textViewData = (TextView) itemView.findViewById(R.id.text_data);
buttonDelete = (Button) itemView.findViewById(R.id.delete);
}
示例2: SimpleViewHolder
import com.daimajia.swipedemo.R; //导入依赖的package包/类
public SimpleViewHolder(View itemView) {
super(itemView);
swipeLayout = (SwipeLayout) itemView.findViewById(R.id.swipe);
textViewPos = (TextView) itemView.findViewById(R.id.position);
textViewData = (TextView) itemView.findViewById(R.id.text_data);
buttonDelete = (Button) itemView.findViewById(R.id.delete);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Log.d(getClass().getSimpleName(), "onItemSelected: " + textViewData.getText().toString());
Toast.makeText(view.getContext(), "onItemSelected: " + textViewData.getText().toString(), Toast.LENGTH_SHORT).show();
}
});
}
示例3: getSwipeLayoutResourceId
import com.daimajia.swipedemo.R; //导入依赖的package包/类
@Override
public int getSwipeLayoutResourceId(int position) {
return R.id.swipe;
}
示例4: generateView
import com.daimajia.swipedemo.R; //导入依赖的package包/类
@Override
public View generateView(int position, ViewGroup parent) {
return LayoutInflater.from(mContext).inflate(R.layout.grid_item, null);
}
示例5: fillValues
import com.daimajia.swipedemo.R; //导入依赖的package包/类
@Override
public void fillValues(int position, View convertView) {
TextView t = (TextView)convertView.findViewById(R.id.position);
t.setText((position + 1 )+".");
}
示例6: fillValues
import com.daimajia.swipedemo.R; //导入依赖的package包/类
@Override
public void fillValues(int position, View convertView) {
TextView t = (TextView)convertView.findViewById(R.id.position);
t.setText((position + 1) + ".");
}
示例7: onCreateViewHolder
import com.daimajia.swipedemo.R; //导入依赖的package包/类
@Override
public SimpleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.recyclerview_item, parent, false);
return new SimpleViewHolder(view);
}