Skip to content

Commit

Permalink
Merge pull request #464 from Orange-OpenSource/463-security-fix-stran…
Browse files Browse the repository at this point in the history
…dhogg-vulnerability

463 - Fix security vulnerability
  • Loading branch information
florentmaitre authored Mar 10, 2023
2 parents e039118 + 9b1d303 commit 837e89d
Show file tree
Hide file tree
Showing 173 changed files with 3,912 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ repositories {

```groovy
dependencies {
implementation 'com.orange.ods.android:ods-lib:0.11.0'
implementation 'com.orange.ods.android:ods-lib:0.11.1'
}
```
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes done in ODS library will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.1](https://github.com/Orange-OpenSource/ods-android/compare/0.11.0...0.11.1) - 2023-03-10

### Fixed

- \[Demo\] Fix security vulnerability in the Manifest ([#463](https://github.com/Orange-OpenSource/ods-android/issues/463))

## [0.11.0](https://github.com/Orange-OpenSource/ods-android/compare/0.10.0...0.11.0) - 2023-03-03

### Added
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
<application
android:name=".OdsDemoApplication"
android:allowBackup="true"
android:taskAffinity=""
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Orange.NoActionBar">
<activity
android:name=".ui.MainActivity"
android:exported="true"
android:label="@string/app_name">
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
26 changes: 26 additions & 0 deletions docs/0.11.1/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}

</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
167 changes: 167 additions & 0 deletions docs/0.11.1/components/AppBarsBottom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
layout: detail
title: "App bars: bottom"
description: A bottom app bar displays navigation and key actions at the bottom of mobile screens.
---

---

**Page Summary**

* [Specifications references](#specifications-references)
* [Accessibility](#accessibility)
* [Implementation](#implementation)
* [Component specific tokens](#component-specific-tokens)

---

## Specifications references

- [Design System Manager - App bars](https://system.design.orange.com/0c1af118d/p/23e0e6-app-bars/b/620966)
- [Material Design - App bars: bottom](https://material.io/components/app-bars-bottom)
- *Technical documentation soon available*

## Accessibility

Please follow [accessibility criteria for development](https://a11y-guidelines.orange.com/en/mobile/android/development/)

Android's bottom app bar component APIs provide support for the navigation icon,
action items, overflow menu and more for informing the user as to what each
action performs. While optional, their use is strongly encouraged.

**Content descriptions**

When using icons for navigation icons, action items and other elements of bottom
app bars, you should set a content description on them so that screen readers
like TalkBack are able to announce their purpose or action, if any.

For an overall content description of the bottom app bar, set an
`android:contentDescription` or use the `setContentDescription` method on the
`BottomAppBar`.

For the navigation icon, this can be achieved via the
`app:navigationContentDescription` attribute or
`setNavigationContentDescription` method.

For action items and items within the overflow menu, the content description
needs to be set in the menu:

```xml
<menu>
<item
android:contentDescription="@string/content_description_one" />
<item
android:contentDescription="@string/content_description_two" />
</menu>
```

## Implementation

Bottom app bars provide access to a bottom navigation drawer and up to four
actions, including the floating action button.

> **Jetpack Compose implementation**
*Not available yet*

> **XML implementation**
API and source code:

* `CoordinatorLayout`: [Class definition](https://developer.android.com/reference/androidx/coordinatorlayout/widget/CoordinatorLayout)
* `BottomAppBar`: [Class definition](https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBar), [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/bottomappbar/BottomAppBar.java)
* `FloatingActionButton`: [Class definition](https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton), [Class source](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/floatingactionbutton/FloatingActionButton.java)

In the layout:

```xml
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- Note: A RecyclerView can also be used -->
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="100dp"
android:clipToPadding="false">

<!-- Scrollable content -->

</androidx.core.widget.NestedScrollView>

<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottomAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:navigationIcon="@drawable/ic_menu_24dp"
app:menu="@menu/bottom_app_bar"
/>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_add_24dp"
app:layout_anchor="@id/bottomAppBar"
/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
```

In `menu/bottom_app_bar.xml`:

```xml
<menu>

<item
android:id="@+id/search"
android:icon="@drawable/ic_search_24dp"
android:title="@string/search"
android:contentDescription="@string/content_description_search"
app:showAsAction="ifRoom"
/>

<item
android:id="@+id/more"
android:title="@string/more"
android:contentDescription="@string/content_description_more"
app:showAsAction="never"
/>

</menu>
```

In menu/navigation icon drawables:

```xml
<vector
android:tint="?attr/colorControlNormal">
</vector>
```

In code:

```kotlin
bottomAppBar.setNavigationOnClickListener {
// Handle navigation icon press
}

bottomAppBar.setOnMenuItemClickListener { menuItem ->
when (menuItem.itemId) {
R.id.search -> {
// Handle search icon press
true
}
R.id.more -> {
// Handle more item (inside overflow menu) press
true
}
else -> false
}
}
```

## Component specific tokens

_Soon available_
4 changes: 4 additions & 0 deletions docs/0.11.1/components/AppBarsBottom_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: main
content_page: AppBarsBottom.md
---
Loading

0 comments on commit 837e89d

Please sign in to comment.