Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit e193a30

Browse files
authored
Merge pull request #26 from zeoflow/remove-flow-kit
`flow-kit` removed from library since it is not being used
2 parents ac05a11 + 2dcb075 commit e193a30

File tree

3 files changed

+18
-29
lines changed

3 files changed

+18
-29
lines changed

sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ android {
3030

3131
dependencies {
3232
implementation project(':stylar')
33-
implementation ('com.zeoflow:flow-kit:1.4.1') {
33+
implementation ('com.zeoflow:flow-kit:1.6.1') {
3434
exclude group: 'com.zeoflow', module: 'stylar'
3535
}
3636
}

sample/src/main/java/com/zeoflow/stylar/sample/MainActivity.java

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.graphics.Color;
44
import android.os.Bundle;
5-
import android.view.Gravity;
65
import android.widget.Toast;
76

87
import androidx.annotation.NonNull;
@@ -14,15 +13,10 @@
1413
import com.zeoflow.stylar.core.StylarTheme;
1514
import com.zeoflow.stylar.view.StylarView;
1615

17-
import static com.zeoflow.stylar.view.StylarView.ALIGNMENT_LEFT;
18-
import static com.zeoflow.utils.FileUtil.readFile;
19-
20-
public class MainActivity extends Activity
21-
{
16+
public class MainActivity extends Activity {
2217

2318
@Override
24-
protected void onCreate(@Nullable Bundle savedInstanceState)
25-
{
19+
protected void onCreate(@Nullable Bundle savedInstanceState) {
2620
super.onCreate(savedInstanceState);
2721
setContentView(R.layout.activity_main);
2822

@@ -32,22 +26,20 @@ protected void onCreate(@Nullable Bundle savedInstanceState)
3226
String accClosed = "### Your account has been closed.\n\nIt looks like the **`Terms of Service`** may have been violated.\n\nTo have our support team look into this, please [**`contact us`**]($contact_us).";
3327
StylarView stylarView = findViewById(R.id.zStylarView);
3428
final Stylar stylar = Stylar.builder(zContext)
35-
.withLayoutElement(stylarView)
36-
.withAnchoredHeadings(true)
37-
.withImagePlugins(true)
38-
.withCodeStyle(false)
39-
.setClickEvent(link -> Toast.makeText(MainActivity.this, link, Toast.LENGTH_SHORT).show())
40-
.usePlugin(new AbstractStylarPlugin()
41-
{
42-
@Override
43-
public void configureTheme(@NonNull StylarTheme.Builder builder)
44-
{
45-
builder
46-
.codeTextColor(Color.parseColor("#CE570CC1"))
47-
.codeBackgroundColor(Color.parseColor("#EDEDED"));
48-
}
49-
})
50-
.build();
29+
.withLayoutElement(stylarView)
30+
.withAnchoredHeadings(true)
31+
.withImagePlugins(true)
32+
.withCodeStyle(false)
33+
.setClickEvent(link -> Toast.makeText(MainActivity.this, link, Toast.LENGTH_SHORT).show())
34+
.usePlugin(new AbstractStylarPlugin() {
35+
@Override
36+
public void configureTheme(@NonNull StylarTheme.Builder builder) {
37+
builder
38+
.codeTextColor(Color.parseColor("#CE570CC1"))
39+
.codeBackgroundColor(Color.parseColor("#EDEDED"));
40+
}
41+
})
42+
.build();
5143
stylar.setMarkdown(accClosed);
5244

5345
// stylarView.setTextAlignment(ALIGNMENT_LEFT);

stylar/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ android {
2929

3030
dependencies {
3131
implementation 'com.zeoflow:zson:1.3.0'
32-
implementation 'com.zeoflow:material-elements:2.4.1'
33-
implementation ('com.zeoflow:flow-kit:1.4.1') {
34-
exclude group: 'com.zeoflow', module: 'stylar'
35-
}
32+
implementation 'com.zeoflow:material-elements:2.4.5'
3633

3734
implementation 'io.coil-kt:coil:1.1.1'
3835
implementation 'io.coil-kt:coil-base:1.1.1'

0 commit comments

Comments
 (0)