package dmax.dialog;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.FrameLayout;

/**
 * Created by Maxim Dybarsky | maxim.dybarskyy@gmail.com
 * on 13.01.15 at 17:34
 */
class ProgressLayout extends FrameLayout {

    private static final int DEFAULT_COUNT = 5;
    private int spotsCount;

    public ProgressLayout(Context context) {
        this(context, null);
    }

    public ProgressLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public ProgressLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        this(context, attrs, defStyleAttr, 0);
    }

    public ProgressLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);

        TypedArray a = getContext().getTheme().obtainStyledAttributes(
                attrs,
                R.styleable.Dialog,
                defStyleAttr, defStyleRes);

        spotsCount = a.getInt(R.styleable.Dialog_DialogSpotCount, DEFAULT_COUNT);
        a.recycle();
    }

    public int getSpotsCount() {
        return spotsCount;
    }
}

@@ -15,16 +15,53 @@
 ialog;%0A%0A
+import android.annotation.TargetApi;%0A
 import a
@@ -123,16 +123,41 @@
 dArray;%0A
+import android.os.Build;%0A
 import a
@@ -697,36 +697,37 @@
 Attr) %7B%0A        
-this
+super
 (context, attrs,
@@ -739,28 +739,108 @@
 tyleAttr
-, 0);%0A    %7D%0A
+);%0A        init(attrs, defStyleAttr, 0);%0A    %7D%0A%0A    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
 %0A    pub
@@ -982,32 +982,165 @@
 , defStyleRes);%0A
+        init(attrs, defStyleAttr, defStyleRes);%0A    %7D%0A%0A    private void init(AttributeSet attrs, int defStyleAttr, int defStyleRes) %7B
 %0A        TypedAr

Fix constructor invokation (pre-lollipop support)