Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve A11y #143

Merged
merged 6 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_motivation_alert_texts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="@dimen/fab_margin"
android:contentDescription="@string/a11y_add"
android:src="@drawable/ic_bell_plus_white_24dp"
app:layout_anchor="@id/motivation_text_list"
app:layout_anchorGravity="bottom|right|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_training_overview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="@dimen/fab_margin"
android:contentDescription="@string/a11y_start_training"
android:src="@drawable/ic_plus_white_24dp"
app:layout_anchor="@id/training_overview_list"
app:layout_anchorGravity="bottom|right|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_walking_modes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="@dimen/fab_margin"
android:contentDescription="@string/a11y_add"
android:src="@drawable/ic_plus_white_24dp"
app:layout_anchor="@id/walking_modes_list"
app:layout_anchorGravity="bottom|right|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/card_activity_bar_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
android:layout_alignTop="@+id/period"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/a11y_options"
android:src="@drawable/ic_more_vert_black_24dp" />

</RelativeLayout>
Expand All @@ -75,4 +76,4 @@
</androidx.cardview.widget.CardView>


</LinearLayout>
</LinearLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/card_activity_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
android:layout_alignTop="@+id/period"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/a11y_options"
android:src="@drawable/ic_more_vert_black_24dp" />

</RelativeLayout>
Expand All @@ -75,4 +76,4 @@
</androidx.cardview.widget.CardView>


</LinearLayout>
</LinearLayout>
5 changes: 4 additions & 1 deletion app/src/main/res/layout/card_activity_summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
style="@style/SimpleImageButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:contentDescription="@string/a11y_prev"
android:src="@drawable/ic_chevron_left_black_24dp"/>

<RelativeLayout
Expand Down Expand Up @@ -79,11 +80,13 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:contentDescription="@string/a11y_next"
android:src="@drawable/ic_chevron_right_black_24dp" />
<ImageButton
android:id="@+id/periodMoreButton"
style="@style/SimpleImageButton"
android:layout_gravity="center_vertical"
android:contentDescription="@string/a11y_walking_modes"
android:src="@drawable/ic_more_vert_black_24dp" />
</LinearLayout>

Expand Down Expand Up @@ -238,4 +241,4 @@
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/card_motivation_alert_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:src="@drawable/ic_more_vert_black_24dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@android:string/untitled"/>
android:contentDescription="@string/a11y_options"/>
</LinearLayout>
</RelativeLayout>

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/card_training_session.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/training_card_title"
android:layout_marginRight="16dp"
android:contentDescription="@string/a11y_options"
android:src="@drawable/ic_more_vert_black_24dp" />


Expand Down Expand Up @@ -377,4 +378,4 @@
</androidx.cardview.widget.CardView>


</LinearLayout>
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/card_walking_mode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
style="@style/SimpleImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@android:string/untitled"
android:contentDescription="@string/a11y_options"
android:src="@drawable/ic_more_vert_black_24dp" />

</LinearLayout>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/widget_2x1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/pause_step_detection"
android:src="@android:drawable/ic_media_pause" />

<ImageButton
android:id="@+id/continue_step_detection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/continue_step_detection"
android:src="@android:drawable/ic_media_play"
android:visibility="gone" />
</LinearLayout>
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/widget_3x1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/pause_step_detection"
android:src="@android:drawable/ic_media_pause" />

<ImageButton
android:id="@+id/continue_step_detection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/continue_step_detection"
android:src="@android:drawable/ic_media_play"
android:visibility="gone" />
</LinearLayout>
Expand All @@ -87,6 +89,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/a11y_start_training"
android:src="@drawable/ic_plus_white_24dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
8 changes: 7 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en" tools:ignore="MissingTranslation">
morckx marked this conversation as resolved.
Show resolved Hide resolved
<string name="app_name">Pedometer</string>
<string name="app_name_long">Privacy Friendly Pedometer</string>

Expand Down Expand Up @@ -365,4 +365,10 @@
<string name="help_counting_hardware">Many Android devices also support specific step hardware like a step counter and step detector. They can be more reliable than the accelerometer because they are specifically designed to register step events. However, since Android devices are very diverse it is not guaranteed to work best. The detector is a fast way to detect step events while the counter does some post-processing to increase certainty about actual steps taken.</string>
<string name="dialog_permission_activity_recognition">The Activity Recognition permission is needed to access step data.</string>
<string name="dialog_permission_activity_recognition_2">The permission was denied multiple times. You will need to enable the permission manually though the the device settings.</string>
<string name="a11y_options">Options</string>
<string name="a11y_add">Add</string>
<string name="a11y_prev">Previous</string>
<string name="a11y_next">Next</string>
<string name="a11y_start_training">Start training</string>
<string name="a11y_walking_modes">Walking modes</string>
</resources>