Skip to content

Instantly share code, notes, and snippets.

/ItemConsist.java

Created Sep 13, 2017
Embed
What would you like to do?
Custom view
package com.sublink.app.presentation;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import com.sublink.app.R;
public class ItemConsist extends LinearLayout {
public ItemConsist(Context context) {
super(context);
init();
}
public ItemConsist(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public ItemConsist(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
public ItemConsist(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
init();
}
private void init() {
inflate(getContext(), R.layout.view_change_subtype, this);
}
public void someMethodOfItemConsist() {
//do whatever you want
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment