Connect with us

Tech

Google Jetpack Compose Goes 1.0, JetBrains Launches Compose Multiplatform Alpha – InfoQ.com

Published

 on


Jetpack Compose, Google’s Kotlin-based declarative UI framework for Android, has now reached stability at version 1.0, which also brings a few new tools to improve developer experience. While Google’s Compose only supports Android, Kotlin maker JetBrains announced its Compose Multiplatform, which aims to extend Compose to the Desktop and the Web.

Jetpack Compose aims to accelerate UI development for Android apps by allowing programmers to define their UIs using a declarative style. In other words, developers create UIs by combining composable elements which adapt to changes to the app state. According to Google, Compose enables the creation of user interfaces with a significant reduction of code. To make its adoption easier for existing projects, it is possible to integrate Compose progressively and embed it within Views or vice versa.

This is an example of how you can place a simple Compose Text widget inside a standard Android activity:

class MyActivity : AppCompatActivity() 
    override fun onCreate(savedInstanceState: Bundle?) 
        super.onCreate(savedInstanceState)
        // ...

        val greeting = findViewById<ComposeView>(R.id.greeting)
        greeting.setContent 
            MdcTheme  // or AppCompatTheme
                Greeting()
            
        
    


@Composable
private fun Greeting() 
    Text(
        text = stringResource(R.string.greeting),
        style = MaterialTheme.typography.h5,
        modifier = Modifier
            .fillMaxWidth()
            .padding(horizontal = dimensionResource(R.dimen.margin_small))
            .wrapContentWidth(Alignment.CenterHorizontally)
    )

With the 1.0 release, Compose is getting a few new tools, including Compose Preview. Aimed to simplify the creation of UI components, Compose Preview allows you to see your composables in different states, themes, etc., all at the same time, without needing to install and run a test app on a device or emulator. Compose Preview is also able to run a component preview on a physical device in isolation, so you can test it interactively. All of these new features are available in Android Studio Arctic Fox.

As mentioned, on the heels of Google’s announcement, Jetbrains has released Compose Multiplatform alpha. Compose Multiplatform includes Compose for Desktop and Compose for Web and leverages Kotlin Multiplatform to support a number of different platforms. Compose Desktop uses Google’s Skia library to draw UI widgets on Windows, macOS, and Linux. This provides a unified experience across all supported OSes at the expense of each platform native look and feel, similar to Flutter’s approach and contrary to React Native’s.

According to the Kotlin team, using Compose Multiplatform should provide a number of benefits in comparison with Electron apps, namely reduced memory consumption, installation size, and UI rendering performance.

With its alpha release, Compose Multiplatform is also getting a new Android Studio plugin, which includes support for showing component preview in the IDE, as well as a number of additional features.

Compose Multiplatform is still an early alpha release, so JetBrains is only making it available to write proof-of-concept implementations and getting ready for the first stable release, which should come out sometime this year.

Adblock test (Why?)



Source link

Continue Reading

Tech

EU demands that every smartphone, tablet be capable of being charged using a USB-C cable. – guru3d.com

Published

 on


A standard USB-C charger with a USB-C connection will be required for all telephones, tablets, and other consumer gadgets sold in the European Union by 2023. This is stated in a bill that was presented by the European Commission (EC) on Thursday.

According to the European Commission, this is significantly more convenient for customers because numerous different charges are now frequently required for various gadgets. This, according to European Commissioner Thierry Breton, needs to be addressed immediately. It should be possible for everyone in the family to use the same charger in the near future, regardless of what phone they have.”

Furthermore, because manufacturers continue to include standard chargers with their products, a universal charger could help to reduce waste significantly. The new legislation will have a significant impact on Apple, in particular, because the business now supplies all of its mobile phones with a Lightning connector, which was previously unavailable. Numerous Android phone makers are already utilizing the USB Type-C connector.

Electronic earphones, smart watches, and fitness trackers will not be covered by the new rule. According to the European Commission, this is due to the size and manner in which these devices are used.

Apple doesn’t like European plans
Apple has already stated that it does not agree with the European Union’s objectives for the future. According to the tech giant, this would result in a stagnation of innovation as well as mountains of electronic garbage, as previously advertised accessories for Apple products would no longer be able to be utilized.Since 2010, the European Union has been developing ideas for a universal charger, but has so far relied on voluntary action from the sector to move forward. They were mainly unsuccessful in their endeavors.

Before it can be implemented, the law must first be passed by the EU’s member states as well as the European Parliament. The European Parliament has previously been informed of an important finding regarding a universal charger. Manufacturers will have two years to adjust to the new standard following the passage of the legislation.

With the new legislation, Apple’s Lightning cable would become obsolete.


Click here to post a comment for this news story on the message forum.

Adblock test (Why?)



Source link

Continue Reading

Tech

Google CEO sought to keep Incognito mode issues out of spotlight, lawsuit alleges – Yahoo News Canada

Published

 on


By Paresh Dave

(Reuters) – Google Chief Executive Sundar Pichai in 2019 was warned that describing the company’s Incognito browsing mode as “private” was problematic, yet it stayed the course because he did not want the feature “under the spotlight,” according to a new court filing.

Google spokesman José Castañeda told Reuters that the filing “mischaracterizes emails referencing unrelated second and third-hand accounts.”

The Alphabet Inc unit’s privacy disclosures have generated regulatory and legal scrutiny in recent years amid growing public concerns about online surveillance.

Users last June alleged in a lawsuit that Google unlawfully tracked their internet use when they were browsing Incognito in its Chrome browser. Google has said it makes clear that Incognito only stops data from being saved to a user’s device and is fighting the lawsuit.

In a written update on trial preparations filed Thursday in U.S. district court, attorneys for the users said they “anticipate seeking to depose” Pichai and Google Chief Marketing Officer Lorraine Twohill.

The attorneys, citing Google documents, said Pichai “was informed in 2019 as part of a project driven by Twohill that Incognito should not be referred to as ‘private’ because that ran ‘the risk of exacerbating known misconceptions about protections Incognito mode provides.'”

The filing continued, “As part of those discussions, Pichai decided that he ‘didn’t want to put incognito under the spotlight’ and Google continued without addressing those known issues.”

Castañeda said teams “routinely discuss ways to improve the privacy controls built into our services.” Google’s attorneys said they would oppose efforts to depose Pichai and Twohill.

Last month, plaintiffs deposed Google vice president Brian Rakowski, described in the filing as “the ‘father’ of Incognito mode.” He testified that though Google states Incognito enables browsing “privately,” what users expect “may not match” up with the reality, according to the plaintiffs’ write-up.

Google’s attorneys rejected the summary, writing that Rakowski also said terms including “private,” “anonymous,” and “invisible” with proper context “can be super helpful” in explaining Incognito.

(Reporting by Paresh Dave; Editing by David Gregorio)

Adblock test (Why?)



Source link

Continue Reading

Tech

Apple iPhone 13 Pro and Pro Max aren't rendering all apps in 120Hz – GSMArena.com news – GSMArena.com

Published

 on


The iPhone 13 lineup officially went on sale on Friday September 24. As pre-order arrive to their customers’ doorsteps or Apple Stores in most markets, folks have noticed that the ProMotion feature isn’t working consistently.

The iPhone 13 Pro and 13 Pro Max both feature Apple’s ProMotion displays, meaning they support refresh rates of 120Hz. The feature has been on the iPad Pro since 2017, but this is the first time Apple brings the feature to the iPhone.

iOS 15 supports ProMotion across all apps while scrolling or performing full-screen transitions like switching apps or swiping Home. 9to5Mac reports that many animations are still capped at 60Hz, breaking the intended experience of the ProMotion displays.

The iPhone 13 Pro’s display is rendering most animations in 120Hz, but there are still many animations that aren’t taking full advantage of the higher refresh rate. Apple’s first-party apps have all properly implemented the smoother transitions across the board, the issue only occurs with third-party apps.

Apple has confirmed to 9to5Mac that developers need to enable their apps to support higher framerates for apps that use custom rendering such as games. This is achieved by the developer adding a new info.plist key in order to opt-in for their apps to support 120Hz. Apple will make this documentation available to developers soon and a firmware update will fix a bug that isn’t letting Core Animation drive the refresh rates higher than 60Hz.

Source

Adblock test (Why?)



Source link

Continue Reading

Trending