OneUIProject / oneui-design

Samsung's One UI design components for Android apps.
MIT License
157 stars 18 forks source link

How to use Oneui-design? #15

Closed ghost1372 closed 1 year ago

ghost1372 commented 1 year ago

Hi, i want to use your oneui projects but i cant! I am facing various errors and some classes are missing

missing calss:

ActivityUtils BuildConfig

this is my build.gradle:

android {
    compileSdk 32

    defaultConfig {
        applicationId "com.sec.sesl.tester"
        minSdk 23
        targetSdk 32
        versionCode 1
        versionName "1.0"

        vectorDrawables.useSupportLibrary = true
    }

    buildFeatures {
        viewBinding true
    }
}
configurations.all {
    exclude group: 'androidx.appcompat', module: 'appcompat'
    exclude group: 'androidx.core', module: 'core'
    exclude group: 'androidx.drawerlayout', module: 'drawerlayout'
    exclude group: 'androidx.viewpager2', module: 'viewpager2'
    exclude group: 'androidx.fragment', module: 'fragment'
    exclude group: 'androidx.customview', module: 'customview'
    exclude group: 'androidx.coordinatorlayout', module: 'coordinatorlayout'
}
dependencies {

    implementation 'io.github.oneuiproject.sesl:appcompat:1.3.0'
    implementation 'io.github.oneuiproject:design:1.2.2'
    implementation 'io.github.oneuiproject.sesl:material:1.4.0'
    implementation 'io.github.oneuiproject.sesl:viewpager2:1.1.0'
    implementation 'io.github.oneuiproject.sesl:swiperefreshlayout:1.0.0'
    implementation 'io.github.oneuiproject.sesl:recyclerview:1.3.0'
    implementation 'io.github.oneuiproject.sesl:preference:1.1.0'
    implementation 'io.github.oneuiproject.sesl:drawerlayout:1.0.0'
    implementation 'io.github.oneuiproject.sesl:coordinatorlayout:1.0.0'

    implementation 'com.airbnb.android:lottie:5.2.0'
    implementation 'io.github.oneuiproject:icons:1.0.1'
}
Yanndroid commented 1 year ago

ActivityUtils is a new feature which hasn't been released yet, so you'll have to wait for the next release. We usually wait until we gathered enough changes to make a new release. BuildConfig is a class which is created at build time, so it probably will work once you've resolved all the other issues.

ghost1372 commented 1 year ago

tnx I think there is a problem with my Android Studio, so I deleted the previous version and installed a new version, now i want to test it again.

is there any updated complete docs?

Yanndroid commented 1 year ago

For the sesl libraries the usage is basically the same as the original androidx libraries and some oneui specific docs can be found here, although they are still W.I.P. The design library should have javadoc everywhere and the old library's doc can still be useful too.

ghost1372 commented 1 year ago

i updated my gradle and used invalidate caches option in AS and problem solved tnx