Merge pull request '优化了自定义背景的显示' (#39) from wangjiaqi_branch into master

pull/40/head
p82feo7wg 1 month ago
commit 2bbe3a5a50

@ -211,7 +211,7 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="4dp"
android:background="@drawable/bg_btn_set_color"
android:background="@drawable/bg_btn_insert_photo"
android:backgroundTint="@null"
android:focusable="false"
android:clickable="true"/>
@ -222,7 +222,7 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="4dp"
android:background="@drawable/bg_btn_set_color"
android:background="@drawable/bg_btn_voice_transfomer"
android:backgroundTint="@null"
android:focusable="false"
android:clickable="true"
@ -300,21 +300,26 @@
android:id="@+id/note_bg_color_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/note_edit_color_selector_panel"
android:background="#FFFFFF"
android:layout_marginTop="30dip"
android:layout_marginRight="8dip"
android:layout_gravity="top|right"
android:visibility="gone">
android:visibility="gone"
android:padding="4dip"
android:minWidth="280dip"
android:elevation="4dp"
android:orientation="horizontal">
<FrameLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_margin="4dip">
<ImageView
android:id="@+id/iv_bg_yellow"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:background="#FFF9C4" />
<ImageView
android:id="@+id/iv_bg_yellow_select"
@ -328,14 +333,15 @@
</FrameLayout>
<FrameLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_margin="4dip">
<ImageView
android:id="@+id/iv_bg_blue"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:background="#BBDEFB" />
<ImageView
android:id="@+id/iv_bg_blue_select"
@ -345,19 +351,19 @@
android:layout_marginRight="3dip"
android:focusable="false"
android:visibility="gone"
android:src="@drawable/selected" />
</FrameLayout>
<FrameLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_margin="4dip">
<ImageView
android:id="@+id/iv_bg_white"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:background="#FFFFFF" />
<ImageView
android:id="@+id/iv_bg_white_select"
@ -371,14 +377,15 @@
</FrameLayout>
<FrameLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_margin="4dip">
<ImageView
android:id="@+id/iv_bg_green"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:background="#C8E6C9" />
<ImageView
android:id="@+id/iv_bg_green_select"
@ -391,14 +398,15 @@
</FrameLayout>
<FrameLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_margin="4dip">
<ImageView
android:id="@+id/iv_bg_red"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:background="#FFCDD2" />
<ImageView
android:id="@+id/iv_bg_red_select"
@ -412,9 +420,9 @@
<!-- Custom background image option -->
<FrameLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_margin="4dip">
<ImageView
android:id="@+id/iv_bg_custom"

@ -977,6 +977,9 @@ public class NoteEditActivity extends BaseActivity implements OnClickListener,
Integer bgColorId = sBgSelectorBtnsMap.get(id);
if (bgColorId == -1) {
// 处理自定义背景图片选择
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
View.GONE);
mWorkingNote.setBgColorId(bgColorId);
mNoteBgColorSelector.setVisibility(View.GONE);
pickBackgroundImageFromGallery();
} else {

Loading…
Cancel
Save