Create configuration package and move existing ones there
This commit is contained in:
parent
44a06e0a43
commit
23d7c09f27
@ -19,8 +19,8 @@ import javax.inject.Inject;
|
||||
import ru.noties.debug.Debug;
|
||||
import ru.noties.markwon.spans.AsyncDrawable;
|
||||
import ru.noties.markwon.spans.SpannableTheme;
|
||||
import ru.noties.markwon.spans.heading.HeadingConfig;
|
||||
import ru.noties.markwon.spans.heading.HeadingTypeConfig;
|
||||
import ru.noties.markwon.spans.configuration.heading.HeadingConfig;
|
||||
import ru.noties.markwon.spans.configuration.heading.HeadingTypeConfig;
|
||||
|
||||
@ActivityScope
|
||||
public class MarkdownRenderer {
|
||||
|
@ -10,7 +10,7 @@ import android.text.TextPaint;
|
||||
import android.text.style.LeadingMarginSpan;
|
||||
import android.text.style.MetricAffectingSpan;
|
||||
|
||||
import ru.noties.markwon.spans.heading.HeadingType;
|
||||
import ru.noties.markwon.spans.configuration.heading.HeadingType;
|
||||
|
||||
public class HeadingSpan extends MetricAffectingSpan implements LeadingMarginSpan {
|
||||
|
||||
|
@ -14,9 +14,9 @@ import android.support.annotation.Nullable;
|
||||
import android.text.TextPaint;
|
||||
import android.util.TypedValue;
|
||||
|
||||
import ru.noties.markwon.spans.heading.HeadingConfig;
|
||||
import ru.noties.markwon.spans.heading.HeadingType;
|
||||
import ru.noties.markwon.spans.heading.HeadingTypeConfig;
|
||||
import ru.noties.markwon.spans.configuration.heading.HeadingConfig;
|
||||
import ru.noties.markwon.spans.configuration.heading.HeadingType;
|
||||
import ru.noties.markwon.spans.configuration.heading.HeadingTypeConfig;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public class SpannableTheme {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.noties.markwon.spans.heading
|
||||
package ru.noties.markwon.spans.configuration.heading
|
||||
|
||||
import android.graphics.Typeface
|
||||
import android.support.annotation.ColorInt
|
||||
@ -18,7 +18,7 @@ import android.support.annotation.Dimension
|
||||
* @property h6Config Config for H6 heading
|
||||
* @property headingBreakConfig Config for line breaks (for H1 and H2)
|
||||
*/
|
||||
data class HeadingConfig @JvmOverloads constructor(
|
||||
class HeadingConfig @JvmOverloads constructor(
|
||||
val h1Config: HeadingTypeConfig = HeadingTypeConfig(),
|
||||
val h2Config: HeadingTypeConfig = HeadingTypeConfig(),
|
||||
val h3Config: HeadingTypeConfig = HeadingTypeConfig(),
|
@ -0,0 +1,27 @@
|
||||
package ru.noties.markwon.spans.configuration.heading;
|
||||
|
||||
import android.support.annotation.IntDef;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
import static ru.noties.markwon.spans.configuration.heading.HeadingType.H1;
|
||||
import static ru.noties.markwon.spans.configuration.heading.HeadingType.H2;
|
||||
import static ru.noties.markwon.spans.configuration.heading.HeadingType.H3;
|
||||
import static ru.noties.markwon.spans.configuration.heading.HeadingType.H4;
|
||||
import static ru.noties.markwon.spans.configuration.heading.HeadingType.H5;
|
||||
import static ru.noties.markwon.spans.configuration.heading.HeadingType.H6;
|
||||
|
||||
/**
|
||||
* Created by daniel.leal on 13.12.17.
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({H1, H2, H3, H4, H5, H6})
|
||||
public @interface HeadingType {
|
||||
int H1 = 1;
|
||||
int H2 = 2;
|
||||
int H3 = 3;
|
||||
int H4 = 4;
|
||||
int H5 = 5;
|
||||
int H6 = 6;
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package ru.noties.markwon.spans.heading;
|
||||
|
||||
import android.support.annotation.IntDef;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
import static ru.noties.markwon.spans.heading.HeadingType.H1;
|
||||
import static ru.noties.markwon.spans.heading.HeadingType.H2;
|
||||
import static ru.noties.markwon.spans.heading.HeadingType.H3;
|
||||
import static ru.noties.markwon.spans.heading.HeadingType.H4;
|
||||
import static ru.noties.markwon.spans.heading.HeadingType.H5;
|
||||
import static ru.noties.markwon.spans.heading.HeadingType.H6;
|
||||
|
||||
/**
|
||||
* Created by daniel.leal on 13.12.17.
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({H1, H2, H3, H4, H5, H6})
|
||||
public @interface HeadingType {
|
||||
int H1 = 1;
|
||||
int H2 = 2;
|
||||
int H3 = 3;
|
||||
int H4 = 4;
|
||||
int H5 = 5;
|
||||
int H6 = 6;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user