Created
September 13, 2017 09:46
-
-
Save anonymous/776df81ad9f9ed35f2289d5d5efd4187 to your computer and use it in GitHub Desktop.
Custom view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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