Lines Matching defs:template
33 * A generic template class that inflates a template, provided in the constructor or in
34 * {@code android:layout} through XML, and adds its children to a "container" in the template. When
41 * The container of the actual content. This will be a view in the template, which child views
46 public TemplateLayout(Context context, int template, int containerId) {
48 init(template, containerId, null, R.attr.suwLayoutTheme);
64 private void init(int template, int containerId, AttributeSet attrs, int defStyleAttr) {
67 if (template == 0) {
68 template = a.getResourceId(R.styleable.SuwTemplateLayout_android_layout, 0);
73 inflateTemplate(template, containerId);
100 * This method inflates the template. Subclasses can override this method to customize the
101 * template inflation, or change to a different default template. The root of the inflated
104 * @param inflater A LayoutInflater to inflate the template.
105 * @param template The resource ID of the template to be inflated, or 0 if no template is
109 protected View onInflateTemplate(LayoutInflater inflater, int template) {
110 if (template == 0) {
113 return inflater.inflate(template, this, false);
125 * This is called after the template has been inflated and added to the view hierarchy.
126 * Subclasses can implement this method to modify the template as necessary, such as caching
129 * template instead of for child views.