在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):aNNiMON/PaperStyleWidgets开源软件地址(OpenSource Url):https://github.com/aNNiMON/PaperStyleWidgets开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):PaperStyleWidgetsWidgets with material-like design for Android 2.2+ Includes:
UsageGradle dependency
ButtonJust type <com.annimon.paperstyle.PaperButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button" /> or configure styles by add attributes
<com.annimon.paperstyle.PaperButton
...
android:textColor="#FFFFFF"
custom:pw_backgroundColor="#2196F3"
custom:pw_focusColor="@color/focus"
custom:pw_borderSize="0" /> or create button dynamically Button button = new PaperButton(getContext()); or change styles dynamically PaperButton button = new PaperButton(getContext());
button.setBackgroundColor(0xFF2196F3);
button.setFocusColor(getResources().getColor(R.color.focus));
button.setBorderColor(0x7F555555);
button.setBorderSize(convertDpToPx(2, getResources().getDisplayMetrics())); SeekBar<com.annimon.paperstyle.PaperSeekBar
android:max="360"
android:layout_width="match_parent"
android:layout_height="wrap_content"
custom:pw_color="@color/red" /> Optional attribute Programmatically create SeekBar seekbar = new PaperSeekBar(getContext()); Change style PaperSeekBar seekbar = new PaperSeekBar(getContext());
seekbar.setColor(getResources().getColor(R.color.red)); ProgressBarIndeterminate state <com.annimon.paperstyle.PaperProgressBar
android:indeterminate="true"
android:layout_width="match_parent"
android:layout_height="wrap_content" /> Normal state with primary and secondary progress <com.annimon.paperstyle.PaperProgressBar
android:progress="0"
android:secondaryProgress="180"
android:max="360"
android:layout_width="match_parent"
android:layout_height="wrap_content"
custom:pw_progressColor="#9C27B0"
custom:pw_secondaryProgressColor="#779C27B0" />
Create dynamically ProgressBar progressbar = new PaperProgressBar(getContext()); Change style dynamically PaperProgressBar progressbar = new PaperProgressBar(getContext());
progressBar.setProgressColor(0xFF9C27B0);
progressbar.setSecondaryProgressColor(0x779C27B0); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论