This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal val ENFORCE_EDGE_TO_EDGE_SUPPORT = Issue.create( | |
| id = LegacyStepEdgeToEdgeDetector::class.simpleName!!, | |
| briefDescription = "Error description", | |
| explanation = "Error explanation", | |
| category = CORRECTNESS, | |
| priority = 7, | |
| severity = ERROR, | |
| implementation = Implementation(LegacyStepEdgeToEdgeDetector::class.java, EnumSet.of(JAVA_FILE, TEST_SOURCES)), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| insetsHandler.handleInsets(view) { v, insets -> | |
| v.updatePadding(left = insets.left, top = insets.top, right = insets.right) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| insetsHandler.handleInsetsWithPinnedButton( | |
| mainContent = view.scrollingContent, | |
| bottomPinnedContent = view.confirmButton, | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| insetsHandler.handleInsets(binding.screenContent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface InsetsHandler { | |
| fun handleInsets( | |
| view: View?, | |
| insetDirection: InsetDirection = InsetDirection.EXCLUDE_TOP, | |
| consumeInsets: Boolean = true, | |
| useMargin: Boolean = false, | |
| ) | |
| fun handleInsetsWithPinnedButton( | |
| mainContent: View?, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setContent { | |
| EdgeToEdgeTheme { | |
| Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> | |
| AppContent( | |
| modifier = Modifier.padding(innerPadding) | |
| ) | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lineChart = v.findViewById(R.id.tempChart); | |
| List<HourDatum> hours = weatherData.getHourly().getData(); | |
| List<Entry> data = new ArrayList<>(); | |
| for (int i = 0; i < 24; i++) { | |
| data.add(new Entry((float) i, Math.round(hours.get(i).getTemperature().floatValue()))); | |
| } | |
| LineDataSet lineDataSet = new LineDataSet(data, ""); | |
| lineDataSet.setLineWidth(3f); |