Skip to content

Battery details table: fix RTL alignment + use Western digits for numbers #96

Description

@almothafar

Problem

Two related issues in the battery details table on the home screen (and the Design Capacity figure on the Battery Insights screen), most visible in Arabic/RTL.

1. Table alignment is inconsistent ("chaos")

Rows don't line up: some values sit on one side and neighbouring content on the other — e.g. the Charge Cycles number appears on the right while the adjacent content is on the left. Numeric values (LTR runs like 500 mAh) and Arabic text values (جيدة) align differently inside the same Gravity.START column, so the value column looks ragged.

The table is built programmatically in BatteryDetailsFragment (label = Gravity.END, separator = center, value = Gravity.START, row layoutDirection = LOCALE, setStretchAllColumns(true)), which doesn't give consistent alignment across mixed numeric/text values in RTL.

2. Numbers use locale (Eastern Arabic) digits inconsistently

  • Design Capacity is formatted via getString(R.string.design_capacity_value, int)%1$d → renders Eastern Arabic numerals (٤٠٠٠) under the ar locale.
  • Charge Cycles / Days use String.valueOf(int) → always Western digits (4000).

So one number reads ٤٠٠٠ and the next 500 — inconsistent. The maintainer wants Western digits (0-9) for the Design Capacity value on both the home details table and the Battery Insights screen.

Acceptance criteria

  • The details table rows align consistently (labels and values) in both LTR and RTL.
  • Design Capacity (and other numeric values) render with Western digits (0-9) on home + insights.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions