I am trying to build an immersion via a custom XML layout.
My understanding is if I use CardBuilder, I would need to embed_inside but I wanted to use the entire screen w
You don't need to use the CardBuilder
if you prefer to use your own custom layout: make sure to follow our design guidelines to make sure you meet our specs.
To use your custom layout, simply inflate a View
as you would normally and use in your application.
For an Activity
, you could something like:
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.my_custom_layout);
}
If you are using a CardScrollView
, simply modify the CardScrollAdapter
's getView
method to return your View
:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// You can inflate the View using a LayoutInflater:
// LayoutInflater.from(mContext).inflate(R.layout.my_custom_layout, parent);
return mCustomView;
}