Android Compose wheel picker library based on LazyColumn in vertical and LazyRow in horizontal.

Overview

About

Android Compose wheel picker library based on LazyColumn in vertical and LazyRow in horizontal.

Gradle

Sample

Default Item size Unfocused count Custom divider Custom focus
Scroll to index Observe index Custom content wrapper Reverse layout Horizontal

Default

FVerticalWheelPicker(
    modifier = Modifier.width(60.dp),
    // Specified item count.
    count = 50,
) { index ->
    Text(index.toString())
}

Item size

FVerticalWheelPicker(
    // ......
    // Specified item height.
    itemHeight = 60.dp,
) {
    // ......
}

Unfocused count

FVerticalWheelPicker(
    // ......
    // Specified unfocused count.
    unfocusedCount = 2,
) {
    // ......
}

Custom divider

FVerticalWheelPicker(
    // ......
    focus = {
        // Custom divider.
        FWheelPickerFocusVertical(dividerColor = Color.Red, dividerSize = 2.dp)
    },
) {
    // ......
}

Custom focus

FVerticalWheelPicker(
    // ......
    // Custom focus.
    focus = {
        Box(modifier = Modifier
            .fillMaxSize()
            .border(width = 1.dp, color = Color.Gray))
    },
) {
    // ......
}

Scroll to index

// Specified initial index.
val state = rememberFWheelPickerState(10)
LaunchedEffect(state) {
    delay(2000)
    // Scroll to index.
    state.animateScrollToIndex(20)
}

FVerticalWheelPicker(
    // ......
    // state
    state = state,
) {
    // ......
}

Observe index

  • FWheelPickerState.currentIndex - Index of picker when it is idle.
  • FWheelPickerState.currentIndexSnapshot - Index of picker when it is idle or scrolling but not fling.
val state = rememberFWheelPickerState()
FVerticalWheelPicker(
    // ......
    // state
    state = state,
    // Index change callback
    onIndexChanged = {
        Log.i(TAG, "onIndexChanged ${state.currentIndex}")
    },
) {
    // ......
}

// Observe currentIndex, It is same with the onIndexChanged callback.
LaunchedEffect(state) {
    snapshotFlow { state.currentIndex }
        .distinctUntilChanged()
        .collect {
            Log.i(TAG, "currentIndex ${state.currentIndex}")
        }
}

// Observe currentIndexSnapshot.
LaunchedEffect(state) {
    snapshotFlow { state.currentIndexSnapshot }
        .distinctUntilChanged()
        .collect {
            Log.i(TAG, "currentIndexSnapshot ${state.currentIndexSnapshot}")
        }
}

Custom content wrapper

FVerticalWheelPicker(
    // ......
    // Content wrapper
    contentWrapper = { index, state ->
        if (state.currentIndexSnapshot == index) {
            content(index)
        } else {
            // Modify content if it is not in focus.
            Box(
                modifier = Modifier
                    .rotate(90f)
                    .alpha(0.5f)
            ) {
                content(index)
            }
        }
    }
) {
    // ......
}

Reverse layout

FVerticalWheelPicker(
    // ......
    // Reverse layout.
    reverseLayout = true,
) {
    // ......
}

Horizontal

FHorizontalWheelPicker is almost the same as FVerticalWheelPicker.

FHorizontalWheelPicker(
    modifier = Modifier.height(60.dp),
    // Specified item count.
    count = 50,
) { index ->
    Text(index.toString())
}
Comments
  • Adaptive Sync Not Working

    Adaptive Sync Not Working

    Hi,

    Thanks for making this program! When I apply a 3dlut, Adaptive Sync is disabled. I do not game, but the windows Movies & TV UWP video player uses Adaptive Sync to match the display + video framerates to eliminate judder. Is this something that can be fixed?

    opened by perrinpagess 6
  • Add ability to specify LUT file paths via command argument

    Add ability to specify LUT file paths via command argument

    DwmLut has some useful command arguments right now. However, if user wants to switch between different lut files via command, he has to edit config.xml then run with -apply.

    This is attempt to fill the void by supporting two extra arguments "-sdr" and "-hdr". Example:

    DwmLutGUI.exe -sdr "1:C:\luts\1\sdr.lut;2:C:\luts\2\sdr.lut" -hdr "1:C:\luts\1\hdr.lut;2:C:\luts\2\hdr.lut" -apply -exit
    

    This example sets monitor 1's SDR lut to "C:\luts\1\sdr.lut", and monitor 2's SDR lut to "C:\luts\2\sdr.lut". Similar to HDR luts.

    Also, paths set via this way does not permanently change the content of config.xml. This suits the "temporary" nature of this argument.

    What do you think?

    opened by CrendKing 5
  • Incompatible with HDCP Protected Content (Netflix)

    Incompatible with HDCP Protected Content (Netflix)

    When playing DRM protected content, HDCP activates and causes one or two black flashes of the screen. The LUT is unloaded. The application status becomes "Inactive". And the video begins playing.

    As a reminder, High-bandwidth Digital Content Protection (HDCP) is used for DRM on video streaming services.

    Instructions:

    1. Launch dwm_lut and press Apply
    2. Log into a video streaming platform, like Netflix, Amazon Prime, BBC iPlayer, etc.
    3. Play a video (I recommend testing on Firefox. It shows a HDCP icon in the address bar whenever it kicks in.)

    I don't know what you could do about this. Maybe reactivate once HDCP is no longer active?

    opened by Terrobility 5
  • Not working with Intel HD3000

    Not working with Intel HD3000

    On Windows 11. Says active but no change in color output is seen. Oddly with a generic Microsoft driver active did work as expected. According to GPU-Z the generic driver supports OpenGL 2.1, the Intel driver supports OpenGL 3.1 with many report on the web talking about wonky OpenGL support.

    Any testing I can do? Let me know.

    opened by markanini 4
  • Using LUT with Netflix app causes screen to pixelate

    Using LUT with Netflix app causes screen to pixelate

    Applying the LUT while the Netflix app is running causes the screen to become pixelated and unusable. Disabling the LUT immediately resolves the issue. I also tried with the native Hulu and Amazon Prime Video apps and it did not reproduce. Not a big deal to turn it off, though.

    Example of the issue https://photos.app.goo.gl/r4ta6sHf8H8NBUUZ8

    opened by adbowers 2
  • Inacuracy in the shadows

    Inacuracy in the shadows

    I found it looks different when I apply my calibration LUT to LUT stress test image in Resolve, compared to loading it into DwmLut. I can't show it, because (luckily) screenshots aren't affected by the LUT, but it makes shadows desaturated, compared to applying the LUT in Resolve. Also it looks like there is some downsizing of the cube size of the LUT before applying the LUT. Probably this is the reason for the artifact I got?

    opened by antonmeleshkevich 1
  • Extended Display and 2 GPU's

    Extended Display and 2 GPU's

    @ledoge First of all I want to thank you for your work and for this product. It is trully a great tool and it saved me the trouble and money because I was set on buying a new monitor before finding this tool!

    Now, the problem I encountered. My laptop has 2 GPU's. An integrated one and a dedicated one. My laptop is always in hybrid mode because I usually use my laptop on different places and I need the battery life when I'm on the go. If the laptop is in hybrid mode, when I use both monitors at the same time (in extended mode), both monitors are assigned the same number (1) in DWM_LUT. This causes the program to assign the lut but a few seconds later the screen goes black and then the program goes to the state of "inactive". If I disable hybrid mode (dedicated gpu only), the program assigns different numbers to the displays, Laptop display number one and external display number 2, and the luts are applied.

    Maybe a simple fix would be to not allow the program to assign the same number to different monitors. If a number is already assigned, then the program assigns a different number.

    iGPU + dGPU (same number applied to both monitors) iGPU + dGPU

    dGPU only (different number applied to the monitors) dGPU

    opened by dimipisi 3
  • how to create cube file from icm profile ?

    how to create cube file from icm profile ?

    hey im using an icm profile in novideo_srgb just fine. scrolling through the hue in photoshop color picker results in no obvious banding. using the same profile converted to a cube file used in dwm_lut gives heavy banding instead . i guess its not the fault of the program but rather a conversion issue.

    I used DisplayCAL-3DLUT-maker.exe to convert back but maybe you know a better way , would be nice if we could just load the icm like novideo_srgb does

    opened by Ulf3000 1
  • Installer and Automatic Start/Restart

    Installer and Automatic Start/Restart

    @ledoge Have you considered creating an installer/uninstaller with an option in dwm_lut to automatically start with Windows and then also automatically restart it when the power state has changed?

    I've accomplished the automatic start and restart on power state change here with a scheduled task: https://hub.displaycal.net/forums/topic/i-made-a-tool-for-applying-3d-luts-to-the-windows-desktop/page/10/#post-34665

    I think this would make the tool even more accessible in a professional environment.

    opened by aaronmmarks 2
  • "Failed to load or initialize DLL...." on Windows 11 22H2

    Im getting "Failed to load or initialize DLL. This probably means that a LUT file is malformed or that DWM got updated." on Windows 11 Version 22H2 (OS Build 22581.100)

    opened by Fardin48 6
  • UI Suggestion: multiple LUTS for a monitor in UI

    UI Suggestion: multiple LUTS for a monitor in UI

    Hi, I would like to thank you for the tool and suggest an UI change: maybe it is possible to make UI look more like a DisplayCal Loader - where you select a monitor and below you have a selectable list of LUT files for this monitor. For example, in my case I have 3 profiles - for Full Gamut L75, Full Gamut L100 and sRGB emulation L100 - currenly it is not very convenient to select the profile - you have to navigate to a folder every time (multiple folders if profiles are in different folders).

    opened by avastfake25 1
Owner
null
Appleader707 1 Aug 9, 2022
Wheel-like spinner widget for Android

Update Dec 2016 Library is discontinued There's still a lot of wheel libraries out there. Update Oct 2014 I am thinking of rewriting this control. Upd

Dimitri Fedorov 641 Jan 2, 2023
Nepali Date Picker library in Jetpack compose for android with Date conversion from BS to AD and vice-versa

Nepali Date picker Converter - Re in Compose This is a re-work of Nepali Date Picker Converter in jetpack compose and kotlin. English Locale Nepali Lo

Kiran Gyawali 4 Dec 23, 2022
A material Date Range Picker based on wdullaers MaterialDateTimePicker

Material Date and Time Picker with Range Selection Credits to the original amazing material date picker library by wdullaer - https://github.com/wdull

Supratim 1.3k Dec 14, 2022
A material Date Range Picker based on wdullaers MaterialDateTimePicker

Material Date and Time Picker with Range Selection Credits to the original amazing material date picker library by wdullaer - https://github.com/wdull

Supratim 1.3k Dec 14, 2022
Alwan 🎨 is an Android Jetpack Compose color picker library.

Alwan Alwan is an Android Jetpack Compose color picker library. Preview Recording.mp4 Download Gradle: dependencies { implementation 'com.raedapps:a

Raed Mughaus 6 Sep 16, 2022
JetCountrypicker - Country code bottomsheet picker in Jetpack Compose

JetCountryPicker Country code bottomsheet picker in Jetpack Compose How to add i

Canopas Software 30 Nov 17, 2022
A simple compose weight picker drawn with canvas.

CanvasWeightPicker A simple compose weight picker drawn with canvas. Features Drag scale to select weight Haptic feedback on weight selected Video of

Timothy Serem 5 Dec 2, 2022
A customizable, easy-to-use, and functional circular time range picker library for Android

A customizable, easy-to-use, and functional circular time range picker library for Android. Use this library to mimic Apple's iOS or Samsung's bedtime picker.

Joery Droppers 251 Dec 30, 2022
[NO LONGER MAINTAINED] Android library for better Picker DialogFragments

/!\ This Project is no longer maintained /!\ DialogFragments modeled after the AOSP Clock and Calendar apps to improve UX for picking time, date, numb

Code-Troopers 2.7k Dec 29, 2022
[NO LONGER MAINTAINED] Android library for better Picker DialogFragments

/!\ This Project is no longer maintained /!\ DialogFragments modeled after the AOSP Clock and Calendar apps to improve UX for picking time, date, numb

Code-Troopers 2.7k Dec 29, 2022
Android time range picker

TimeRangePicker TimeRangePicker is a library which can be used to select a time range. WARNING Requires android-support-v4 Description This library pr

Titto Jose 422 Nov 10, 2022
A date time range picker for android written in Kotlin

DateTimeRangePicker A date time range picker for android Usage Firstly, grab latest release of the library via JitPack. And note that, it utilizes Jod

SkedGo 501 Dec 31, 2022
Simplge ImageGallery Picker

SimpleImagePicker add camera and files permissions to manifest file <uses-permission android:name="android.permission.CAMERA" /> <uses-permiss

null 0 Nov 27, 2021
Time-DatePicker - A Simple Time Date Picker With Kotlin

Time-DatePicker Time.DatePicker.mp4

Faysal Hossain 0 Jan 19, 2022
Android interval timer app using compose + compose navigation, dagger hilt, room, kotlin coroutines + flow and mvvm design pattern.

What's InTime? ⏳ InTime is an interval timer application using android jetpack components and a long running service. The purpose of this project is t

P. 46 Oct 10, 2022
JetCalendarView - A calendar library for Jetpack Compose

JetCalendar WIP 2022 Hit Refresh! Calendar view ❤️ Jetpack Compose License Copyr

Anmol Verma 8 Aug 17, 2022
Android DatePicker with month and year build with Compose UI

Compose Date Picker - Select month and year Compose Date Picker tries to offer you the year and month pickers which you can customize for your require

Doğuş Teknoloji 48 Jan 7, 2023
Kalendar - A calendar to integrate Calendar with Custom design in your jetpack compose project

Kalendar - An Elementary Compose Calendar. This is a calendar to integrate Calen

Himanshu Singh 494 Jan 2, 2023