@@ -0,0 +1,2004 @@
+/*%0A * Copyright 2015 Michael Bel%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.app.material.widget;%0A%0Aimport android.content.Context;%0Aimport android.graphics.Canvas;%0Aimport android.graphics.Paint;%0Aimport android.support.annotation.ColorInt;%0Aimport android.widget.FrameLayout;%0A%0Aimport org.app.material.AndroidUtilities;%0A%0Apublic class BaseCell extends FrameLayout %7B%0A%0A    private static Paint mPaint;%0A    private static int mDividerColor = 0xFFD9D9D9;%0A    private static boolean mNeedDivider = false;%0A%0A    public BaseCell(Context context) %7B%0A        super(context);%0A%0A        AndroidUtilities.bind(context);%0A%0A        if (mPaint == null) %7B%0A            mPaint = new Paint();%0A            mPaint.setColor(mDividerColor);%0A            mPaint.setStrokeWidth(1);%0A        %7D%0A    %7D%0A%0A    public BaseCell setDivider(boolean divider) %7B%0A        mNeedDivider = divider;%0A        return this;%0A    %7D%0A%0A    public BaseCell setDividerColor(@ColorInt int color) %7B%0A        mDividerColor = color;%0A        invalidate();%0A        return this;%0A    %7D%0A%0A    @Override%0A    protected void onDraw(Canvas canvas) %7B%0A        if (mNeedDivider) %7B%0A            canvas.drawLine(getPaddingLeft(), getHeight() - 1, getWidth() - getPaddingRight(), getHeight() - 1, mPaint);%0A        %7D%0A    %7D%0A%0A    @Override%0A    protected void onMeasure(int wMeasureSpec, int hMeasureSpec) %7B%0A        super.onMeasure(wMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(hMeasureSpec + (mNeedDivider ? 1 : 0)), MeasureSpec.EXACTLY));%0A    %7D%0A%7D

Create BaseCell