在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):romtsn/ArcNavigationView开源软件地址(OpenSource Url):https://github.com/romtsn/ArcNavigationView开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):ArcNavigationViewWARNINGThe repository is no longer maintainedNavigationView from android design support library with curved edge Usage<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
...
<com.rom4ek.arcnavigationview.ArcNavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"
android:fitsSystemWindows="true"
app:itemBackground="@android:color/white"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer"
app:arc_cropDirection="cropOutside|cropInside"
app:arc_width="96dp"/>
</android.support.v4.widget.DrawerLayout> SampleCrop Outside<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
...
<com.rom4ek.arcnavigationview.ArcNavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"
android:fitsSystemWindows="true"
app:itemBackground="@android:color/white"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer"
app:arc_cropDirection="cropOutside"
app:arc_width="96dp"/>
</android.support.v4.widget.DrawerLayout> Crop Inside<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
...
<com.rom4ek.arcnavigationview.ArcNavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"
android:fitsSystemWindows="true"
app:itemBackground="@android:color/white"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer"
app:arc_cropDirection="cropInside"
app:arc_width="96dp"/>
</android.support.v4.widget.DrawerLayout> Translucent status or navigation barSimply add next lines to your <style name="AppTheme" parent="AppTheme.Base">
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowTranslucentStatus">true</item>
</style> DownloadIn your module's build.gradle file: dependencies {
implementation 'com.rom4ek:arcnavigationview:2.0.0'
} Additionally
You can look how to implement this more closely in the sample app TODO
AcknowledgementsThanks to Florent Champigny for his beautiful project ArcLayout. I've created this project based on his code with some adjustments. License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论