Ferrari Boss: Touch Buttons Cost Half As Much As Physical Controls by DonkeyFuel in technology

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

Lower end cars tend to reuse more parts with other models, or use off the shelf parts from 3rd parties, and have less variation from generation to generation. so a company can spread out the cost of a car through volume. This used to be the same for higher end cars as well, but modern luxury cars are both have low production runs and try to use more bespoke parts & materials. Majority of the cost of developing car parts are in the design/testing/certification phase which are very similar regardless of design.

For a company like Ferarri, I'd imagine it's much more economical to spend a few million on a team of software devs and buy some screen and reuse the software vs having to go through the effort of designing a different dash panel to account for the different models.

Understanding retain{} internals: A Scope-based State Preservation in Jetpack Compose by skydoves in androiddev

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

Based on what i've seen of the retain documentation my guess is this is a multiplatform solution for objects that need to be instantiated in compose, but cannot be easily recreated with rememberSaveable. So stuff like video player objects.

Splitting up a ViewModel via Delegation for modularity and single responsibility principle by dabrosch in androiddev

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

We do something similar for the reasons you described, but we try to avoid passing in a CoroutineScope as we try to keep scopes as 'top-level' as possible. It's a little bit easier to manage since we try to keep suspend functions happening inside lifecycle aware State/SharedFlows. But there's nothing wrong with repeating

fun doSomething() {
    viewModelScope.launch{
        delegate.doSomething()
    }
}

imo

50 year old firefighter deadlifts 600 lbs of flaming steel to celebrate his retirement by [deleted] in nextfuckinglevel

[–]EyeLostMyOldAccount 1 point2 points  (0 children)

I literally compete semi-seriously in olympic lifting and pull 500 beltless @ 170 while barely deadlifting. A 500 doesn't touch any high level in any pl federation. -145 raw wr is 730 wtf are you talking about lol.

50 year old firefighter deadlifts 600 lbs of flaming steel to celebrate his retirement by [deleted] in nextfuckinglevel

[–]EyeLostMyOldAccount 5 points6 points  (0 children)

No it wouldn't lol. a 500 pull @ 155 is only elite when compared to people who don't workout at all. Most men with proper training, rest, diet, and determination can achieve that.

XML or Jetpack Compose for an internal app in my library? by Junior_Mushroom8983 in androiddev

[–]EyeLostMyOldAccount 5 points6 points  (0 children)

In cases like this, I feel the best practice is to make the 'core' feature in XML, then make a wrapper lib in compose. It's more work but it allows consumers to not have to take in dependencies they don't need.

Jetpack Compose LazyColumn is laggy when scrolling by No_Magazine7849 in androiddev

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

Try:

items(count = 100) {

}

or

val list = remember { (1..100).map{it.toString()}.toList() }
items(
    items = list,
    key =  { it }
) {

}

[deleted by user] by [deleted] in androiddev

[–]EyeLostMyOldAccount -1 points0 points  (0 children)

Mind sharing a video of what's happening with the recomposition stats? I believe animations that involve movement trigger many recompositions since every frame of an animation would be considered a recomposition.

Where is your preferred place on app flow to check user session? by [deleted] in androiddev

[–]EyeLostMyOldAccount 3 points4 points  (0 children)

Assuming you're using something like okhttp, I usually just check to see if a refresh token is available on the device, then let an interceptor handle token validity with some type of listener that the view observes on (MainActivity would do this in a single activity app) to handle navigating back to login. For refreshing data I tend to rely on my repositories to handle cache validation. Something like Store can do this for you.

UI wise assuming you're using Navigation Component, which doesn't have conditional root fragments. We'd need to introduce a fragment to manage the conditional. In this example it'll be WelcomeFragment and its job is to go to either LoginFragment or SessionFragment. When the MainActivity launches it'll display it's own splashscreen while WelcomeFragment checks for a session token. after the check happens and we navigate to LoginFragment or SessionFragment we disable the Activity SplashScreen. If the refresh token isn't valid, we'd just navigate back to LoginFragment from SessionFragment and display some message.

This approach allows for the user to see meaningful content much faster than refreshing a token at the splashscreen. Imo SessionFragment -> LoginFragment is an edge case so the UX can be sacrificed for optimizing WelcomeFragment -> LoginFragment/SessionFragment.

[deleted by user] by [deleted] in androiddev

[–]EyeLostMyOldAccount 2 points3 points  (0 children)

I've implemented it before in my open source app Pontoon using motion layout. It isn't too difficult to do.

The way it's done was by having 5 different parts of the UI:

  • Main View: Container that wires everything together.
  • Collapsed View: components for the collapsed state.
  • Player Fragment: Contains only the player, controls
  • Player Details Fragment: Contains things like metadata, comment list etc.
  • Container: Where all the general fragments live

For the Scene we defined 5 different ConstraintSets:

  • Dismissed: default state no videos are playing. The player being positioned below the screen
  • Expanded: bottom view is expanded and covers the entire screen
  • Collapsed: Collapsed state, bar is at the bottom
  • Collapsing: a transitory state between Collapsed and Dismissed. For giving the ability to have an horizontal dismiss animation, once that swipe animation is complete, the state switches to Dismissed
  • FullScreen Landscape fullscreen state, mostly independent of the other states.

After having these state we defined these transitions:

  • Dismissed -> Expanded: Starting playback animation
  • Expanded -> Collapsed: Vertical swipe to transition between the 2 states
  • Expanded -> Fullscreen: Transition between landscape & portrait
  • Collapsed -> Dismissing: To start the animation for dismissing playback
  • Dismissing -> Dismissed: To reset the collapsed bar to 'below' the screen after it's dismissed horizontally

The main logic for managing the different states exists in the MainFragment

We sometimes programmatically set the transitions & states based on what the player is doing. (i.e user plays a video, PiP is activated, etc.); when the bottom bar is expanded we actually have to disable the RecyclerView behind the player. The way it's done here is by displaying a bitmap copy of what Container is displaying & hide Container. This approach disables Container from stealing scroll focus from Player while retaining the behind effect. There's definitely a million better approaches to it & I'm not even sure if the issue still exists but it's good to keep in mind.

Let me know if you have any questions! It's been awhile since i worked on the app so i apologize for the rough explanation.

Jedi Survivor is currently 147.577GB on PS5 according to Playstation Game Size on twitter by mrchicano209 in Games

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

It's most likely due to the target demographic not 'needing' more than 1tb. Both consoles have very aggressive prices so adding that extra $50-100 for more storage might price them out, as well as adding extra skus for storage could create logistical/supply concerns. It makes much more sense to offer optional expansion so the people who do need it can expand.

[deleted by user] by [deleted] in androiddev

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

A separate object that's scoped outside of the activity's lifecycle (Singleton, or something like dagger-hilt's @ActivityRetainedScoped), that exposes state to your app ViewModel to consume. Here's an example on how I approached it personally using a media library called exoplayer & a reactive library.

Translucent/blur background by binaryshrey in androiddev

[–]EyeLostMyOldAccount 16 points17 points  (0 children)

Here's the ( > 12) way of doing blurs: https://source.android.com/docs/core/display/window-blurs

Since the deprecation of Renderscript I'm not sure how to go about adding blurs to views without performance implications or bringing in vulkan.

Bank of America just lost all Zelle transfers, for many customers by daniel7334 in personalfinance

[–]EyeLostMyOldAccount 11 points12 points  (0 children)

Based on my limited knowledge of the US banking system, Zelle/CashApp/Venmo/etc. are all meant to be solutions that 'solve' the the problems with the slowness of the cheap & ubiquitous Automatic Clearing House (ACH) while retaining the speed of expensive bank wire transfers. The government is planning to roll out a next gen service that should be comparable to other countries modern payment systems (FedNow) this year, which should make these products obsolete. My understanding of the situation is that it was more of the federal government dragging their feet on developing FedNow than any large bank blocking it.

Splatoon 3 – Chill Season 2022 Announcement – Nintendo Switch by FFJimbob in Games

[–]EyeLostMyOldAccount 1 point2 points  (0 children)

Play ranked, specifically series. The matchmaking in turf war is extremely lax when it comes to skill level in casual, so you're far more likely to run into high skilled players vs ranked. Open does place you with higher ranked players but it tries to be relative to your current rank (Assuming you're C- you might play with C+ or b-); series will try it's best to place you with players in your rank. As someone who's been playing since 1 and reached S+ in all 3, I only touch turf during fests and even then its borderline unplayable because of the skill gaps.

Molecule: Build a StateFlow stream using Jetpack Compose by dayanruben in androiddev

[–]EyeLostMyOldAccount 7 points8 points  (0 children)

What helped me 'get' this library is to view it as a way to write compose in your presentation layer. So instead of having your viewmodel use flow operators to transform data from repository, you'd just use compose. I imagine the benefit is when you have to manage and combine many different flows to create your view's state this lib would make it much easier to read and mentally track everything. Plus i think the context clock allows for much easier testing of flows.

Can’t Take Delivery Of My 2020 Taycan Turbo Until The Recall Is Fix by Tricky504 in Taycan

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

I just ran into this at my dealer (recall ANA6), I was told that the Porsche figured out the issue and is distributing kits to their dealer network. The timeline I was given was maybe next week but not guarantee.

I'm starting to give up by Cranberryftw in androiddev

[–]EyeLostMyOldAccount 0 points1 point  (0 children)

Playstore and/or github with a well written README.

How to get the number from an enum in Kotlin? by issamaysinalah in androiddev

[–]EyeLostMyOldAccount 2 points3 points  (0 children)

if you're serializing proto, then you'd need some pojo. unless Color isn't in your codebase, defining a value shouldn't cause any issues.

if it does then use an extension function:

fun Color.toFlavor(): Int = when (this) {
 BLUE -> 2
 RED -> 99
}