Skip to content

Commit

Permalink
richeditor supports lists formatted with bullets and numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
konradrenner committed Mar 16, 2016
1 parent 14bc111 commit 95fd23b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,18 @@ public void onClick(View v) {
editor.setBlockquote();
}
});
activity.findViewById(R.id.action_bullets).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
editor.setBullets();
}
});
activity.findViewById(R.id.action_numbers).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
editor.setNumbers();
}
});

activity.findViewById(R.id.action_insert_image).setOnClickListener(new View.OnClickListener() {
@Override
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/res/layout/fragment_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@
android:contentDescription="@null"
android:src="@drawable/underline"/>

<ImageButton
android:id="@+id/action_bullets"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/ic_format_list_bulleted_white_24dp"/>

<ImageButton
android:id="@+id/action_numbers"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@null"
android:contentDescription="@null"
android:src="@drawable/ic_format_list_numbered_white_24dp"/>

<ImageButton
android:id="@+id/action_heading1"
android:layout_width="48dp"
Expand Down

0 comments on commit 95fd23b

Please sign in to comment.