反正有没有把 TextInputLayout 提示放在 editText 的正上方?而且我不希望 editText 位置被改变。将 TextInputLayout 重力设置为右侧不起作用,尽管它改变了 editText 位置。
我有一个相对布局的水平回收视图,一切看起来还不错,但在布局中它没有显示回收者视图的任何项目.网站上有一些相同的问题,但我找不到问题.这是代码:
RecyclerView适配器:
public class ExamDetailRecyclerViewAdapter extends
RecyclerView.Adapter<ExamDetailRecyclerViewAdapter.DetailViewHolder> {
private String[] examNameList;
private Integer[] examImageIds;
private String[] examPriceList;
private static Activity activity;
public ExamDetailRecyclerViewAdapter(Activity activity,
String[] examNameList, Integer[] examImageIds,
String[] examPriceList) {
this.examNameList = examNameList;
this.activity = activity;
this.examImageIds = examImageIds;
this.examPriceList = examPriceList;
}
@Override
public int getItemCount() {
return examNameList.length;
}
@Override
public long getItemId(int position) {
return position;
}
public DetailViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
View itemView = LayoutInflater.from(viewGroup.getContext()).inflate(
R.layout.exam_detail_hlistview_item, viewGroup, false);
return new DetailViewHolder(itemView);
}
public …Run Code Online (Sandbox Code Playgroud) android ×2