Skip to content

Commit

Permalink
优化UI
Browse files Browse the repository at this point in the history
  • Loading branch information
junixapp committed Jul 31, 2022
1 parent d2d9613 commit 79a762c
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 24 deletions.
1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,8 @@ new XPopup.Builder(MainActivity.this)
.asCustom(popup)
.show();
```

- 混淆
```
-keep class com.lxj.xpopupext.bean.** { ; }
```
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class CityPickerPopup extends BottomPopupView {
private CityPickerListener cityPickerListener;
private WheelOptions wheelOptions;
public int dividerColor = 0xFFd5d5d5; //分割线的颜色
public float lineSpace = 2.4f; // 条目间距倍数 默认2
public float lineSpace = 2.8f; // 条目间距倍数 默认2
public int textColorOut = 0xFFa8a8a8; //分割线以外的文字颜色
public int textColorCenter = 0xFF2a2a2a; //分割线之间的文字颜色
public CityPickerPopup(@NonNull Context context) {
Expand Down Expand Up @@ -94,7 +94,7 @@ public void onOptionsSelect(int options1, int options2, int options3) {
}
});
}
wheelOptions.setTextContentSize(18);
wheelOptions.setTextContentSize(16);
wheelOptions.setItemsVisible(7);
wheelOptions.setAlphaGradient(true);
wheelOptions.setCyclic(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
public class CommonPickerPopup extends BottomPopupView {

private int itemsVisibleCount = 7;
private int itemTextSize = 18;
private int itemTextSize = 16;
public int dividerColor = 0xFFd5d5d5; //分割线的颜色
public float lineSpace = 2.4f; // 条目间距倍数 默认2
public float lineSpace = 2.8f; // 条目间距倍数 默认2
public int textColorOut = 0xFFa8a8a8; //分割线以外的文字颜色
public int textColorCenter = 0xFF2a2a2a; //分割线之间的文字颜色
private WheelView wheelView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public enum Mode{
private int startYear = 0;
private int endYear = 0;
private int itemsVisibleCount = 7;
private int itemTextSize = 18;
private int itemTextSize = 16;
private Calendar date = Calendar.getInstance();
private Calendar startDate,endDate;
public int dividerColor = 0xFFd5d5d5; //分割线的颜色
public float lineSpace = 2.4f; // 条目间距倍数 默认2
public float lineSpace = 2.8f; // 条目间距倍数 默认2
public int textColorOut = 0xFFa8a8a8; //分割线以外的文字颜色
public int textColorCenter = 0xFF2a2a2a; //分割线之间的文字颜色
public TimePickerPopup(@NonNull Context context) {
Expand Down
19 changes: 13 additions & 6 deletions ext/src/main/res/layout/_xpopup_ext_city_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/btnCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="15dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="18dp"
android:paddingEnd="18dp"
android:text="@string/xpopup_cancel"
android:background="?selectableItemBackground"
android:textAllCaps="false"
android:textColor="@color/_xpopup_dark_color"
android:textSize="16sp" />
Expand All @@ -29,11 +32,15 @@

<TextView
android:id="@+id/btnConfirm"
android:textStyle="bold"
android:background="?selectableItemBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingRight="15dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="18dp"
android:paddingEnd="18dp"
android:text="@string/xpopup_ok"
android:textAllCaps="false"
android:textColor="@color/_xpopup_dark_color"
Expand Down
19 changes: 13 additions & 6 deletions ext/src/main/res/layout/_xpopup_ext_common_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:id="@+id/btnCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:gravity="center"
android:paddingLeft="15dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="18dp"
android:paddingEnd="18dp"
android:text="@string/xpopup_cancel"
android:textAllCaps="false"
android:textColor="@color/_xpopup_dark_color"
Expand All @@ -30,9 +33,13 @@

<TextView
android:id="@+id/btnConfirm"
android:textStyle="bold"
android:background="?selectableItemBackground"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingRight="15dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="18dp"
android:paddingEnd="18dp"
android:textColor="@color/_xpopup_dark_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
19 changes: 13 additions & 6 deletions ext/src/main/res/layout/_xpopup_ext_time_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand All @@ -16,8 +16,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="15dp"
android:paddingRight="10dp"
android:background="?selectableItemBackground"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="18dp"
android:paddingEnd="18dp"
android:text="@string/xpopup_cancel"
android:textAllCaps="false"
android:textColor="@color/_xpopup_dark_color"
Expand All @@ -31,8 +34,12 @@
<TextView
android:id="@+id/btnConfirm"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingRight="15dp"
android:textStyle="bold"
android:background="?selectableItemBackground"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="18dp"
android:paddingEnd="18dp"
android:textColor="@color/_xpopup_dark_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down

0 comments on commit 79a762c

Please sign in to comment.