mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
Add symbols for all units in converter
This commit is contained in:
@ -6,74 +6,88 @@ object AreaConverter : Converter {
|
||||
override val nameResId: Int = R.string.unit_area
|
||||
override val imageResId: Int = R.drawable.ic_box_vector
|
||||
|
||||
sealed class Unit(nameResId: Int, factor: Double) : Converter.Unit(nameResId, factor) {
|
||||
sealed class Unit(nameResId: Int, formatResId: Int, factor: Double) : Converter.Unit(nameResId, formatResId, factor) {
|
||||
data object SquareKilometer : Unit(
|
||||
nameResId = R.string.unit_area_square_kilometer,
|
||||
formatResId = R.string.unit_area_square_kilometer_format,
|
||||
factor = 1000000.0
|
||||
)
|
||||
|
||||
data object SquareMeter : Unit(
|
||||
nameResId = R.string.unit_area_square_meter,
|
||||
formatResId = R.string.unit_area_square_meter_format,
|
||||
factor = 1.0
|
||||
)
|
||||
|
||||
data object SquareCentimeter : Unit(
|
||||
nameResId = R.string.unit_area_square_centimeter,
|
||||
formatResId = R.string.unit_area_square_centimeter_format,
|
||||
factor = 0.0001
|
||||
)
|
||||
|
||||
data object SquareMillimeter : Unit(
|
||||
nameResId = R.string.unit_area_square_millimeter,
|
||||
formatResId = R.string.unit_area_square_millimeter_format,
|
||||
factor = 0.000001
|
||||
)
|
||||
|
||||
data object SquareMile : Unit(
|
||||
nameResId = R.string.unit_area_square_mile,
|
||||
formatResId = R.string.unit_area_square_mile_format,
|
||||
factor = 2_589_988.110336
|
||||
)
|
||||
|
||||
data object SquareYard : Unit(
|
||||
nameResId = R.string.unit_area_square_yard,
|
||||
formatResId = R.string.unit_area_square_yard_format,
|
||||
factor = 0.83612736
|
||||
)
|
||||
|
||||
data object SquareFoot : Unit(
|
||||
nameResId = R.string.unit_area_square_foot,
|
||||
formatResId = R.string.unit_area_square_foot_format,
|
||||
factor = 0.09290304
|
||||
)
|
||||
|
||||
data object SquareInch : Unit(
|
||||
nameResId = R.string.unit_area_square_inch,
|
||||
formatResId = R.string.unit_area_square_inch_format,
|
||||
factor = 0.00064516
|
||||
)
|
||||
|
||||
data object SquareMil : Unit(
|
||||
nameResId = R.string.unit_area_square_mil,
|
||||
formatResId = R.string.unit_area_square_mil_format,
|
||||
factor = 0.00000000064516
|
||||
)
|
||||
|
||||
data object SquareRod : Unit(
|
||||
nameResId = R.string.unit_area_square_rod,
|
||||
formatResId = R.string.unit_area_square_rod_format,
|
||||
factor = 25.29285264
|
||||
)
|
||||
|
||||
data object Acre : Unit(
|
||||
nameResId = R.string.unit_area_acre,
|
||||
formatResId = R.string.unit_area_acre_format,
|
||||
factor = 4_046.8564224
|
||||
)
|
||||
|
||||
data object Are : Unit(
|
||||
nameResId = R.string.unit_area_are,
|
||||
formatResId = R.string.unit_area_are_format,
|
||||
factor = 100.0
|
||||
)
|
||||
|
||||
data object Dunam : Unit(
|
||||
nameResId = R.string.unit_area_dunam,
|
||||
formatResId = R.string.unit_area_dunam_format,
|
||||
factor = 1000.0
|
||||
)
|
||||
|
||||
data object Hectare : Unit(
|
||||
nameResId = R.string.unit_area_hectare,
|
||||
formatResId = R.string.unit_area_hectare_format,
|
||||
factor = 10_000.0
|
||||
)
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.simplemobiletools.calculator.helpers.converters
|
||||
|
||||
import android.content.Context
|
||||
import com.simplemobiletools.calculator.R
|
||||
|
||||
interface Converter {
|
||||
companion object {
|
||||
val ALL = listOf(
|
||||
@ -24,6 +27,7 @@ interface Converter {
|
||||
|
||||
open class Unit(
|
||||
val nameResId: Int,
|
||||
val formatResId: Int,
|
||||
val factor: Double
|
||||
) {
|
||||
|
||||
@ -32,6 +36,14 @@ interface Converter {
|
||||
open fun fromBase(value: Double) = value / factor
|
||||
|
||||
fun withValue(value: Double) = ValueWithUnit(value, this)
|
||||
|
||||
fun format(context: Context, value: String) = context.getString(formatResId, value)
|
||||
|
||||
fun getNameWithSymbol(context: Context) = context.getString(
|
||||
R.string.unit_name_with_symbol_format,
|
||||
context.getString(nameResId),
|
||||
format(context, "").trim()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
package com.simplemobiletools.calculator.helpers.converters
|
||||
|
||||
object Converters {
|
||||
val ALL = listOf(LengthConverter)
|
||||
|
||||
object Mass
|
||||
|
||||
object Temperature
|
||||
|
||||
object Speed
|
||||
|
||||
object Time
|
||||
|
||||
object Fuel
|
||||
|
||||
object Energy
|
||||
|
||||
object Pressure
|
||||
}
|
@ -6,129 +6,154 @@ object LengthConverter : Converter {
|
||||
override val nameResId: Int = R.string.unit_length
|
||||
override val imageResId: Int = R.drawable.ic_height_vector
|
||||
|
||||
sealed class Unit(nameResId: Int, factor: Double) : Converter.Unit(nameResId, factor) {
|
||||
sealed class Unit(nameResId: Int, formatResId: Int, factor: Double) : Converter.Unit(nameResId, formatResId, factor) {
|
||||
data object Kilometer : Unit(
|
||||
nameResId = R.string.unit_length_kilometer,
|
||||
formatResId = R.string.unit_length_kilometer_format,
|
||||
factor = 1000.0
|
||||
)
|
||||
|
||||
data object Hectometer : Unit(
|
||||
nameResId = R.string.unit_length_hectometer,
|
||||
formatResId = R.string.unit_length_hectometer_format,
|
||||
factor = 100.0
|
||||
)
|
||||
|
||||
data object Decameter : Unit(
|
||||
nameResId = R.string.unit_length_decameter,
|
||||
formatResId = R.string.unit_length_decameter_format,
|
||||
factor = 10.0
|
||||
)
|
||||
|
||||
data object Meter : Unit(
|
||||
nameResId = R.string.unit_length_meter,
|
||||
formatResId = R.string.unit_length_meter_format,
|
||||
factor = 1.0
|
||||
)
|
||||
|
||||
data object Decimeter : Unit(
|
||||
nameResId = R.string.unit_length_decimeter,
|
||||
formatResId = R.string.unit_length_decimeter_format,
|
||||
factor = 0.1
|
||||
)
|
||||
|
||||
data object Centimeter : Unit(
|
||||
nameResId = R.string.unit_length_centimeter,
|
||||
formatResId = R.string.unit_length_centimeter_format,
|
||||
factor = 0.01
|
||||
)
|
||||
|
||||
data object Millimeter : Unit(
|
||||
nameResId = R.string.unit_length_millimeter,
|
||||
formatResId = R.string.unit_length_millimeter_format,
|
||||
factor = 0.001
|
||||
)
|
||||
|
||||
data object Micrometer : Unit(
|
||||
nameResId = R.string.unit_length_micrometer,
|
||||
formatResId = R.string.unit_length_micrometer_format,
|
||||
factor = 0.000001
|
||||
)
|
||||
|
||||
data object Nanometer : Unit(
|
||||
nameResId = R.string.unit_length_nanometer,
|
||||
formatResId = R.string.unit_length_nanometer_format,
|
||||
factor = 0.000000001
|
||||
)
|
||||
|
||||
data object Picometer : Unit(
|
||||
nameResId = R.string.unit_length_picometer,
|
||||
formatResId = R.string.unit_length_picometer_format,
|
||||
factor = 0.000000000001
|
||||
)
|
||||
|
||||
data object Angstrom : Unit(
|
||||
nameResId = R.string.unit_length_angstrom,
|
||||
formatResId = R.string.unit_length_angstrom_format,
|
||||
factor = 1e-10
|
||||
)
|
||||
|
||||
data object Mile : Unit(
|
||||
nameResId = R.string.unit_length_mile,
|
||||
formatResId = R.string.unit_length_mile_format,
|
||||
factor = 1_609.344
|
||||
)
|
||||
|
||||
data object Chain : Unit(
|
||||
nameResId = R.string.unit_length_chain,
|
||||
formatResId = R.string.unit_length_chain_format,
|
||||
factor = 20.1168
|
||||
)
|
||||
|
||||
data object Yard : Unit(
|
||||
nameResId = R.string.unit_length_yard,
|
||||
formatResId = R.string.unit_length_yard_format,
|
||||
factor = 0.9144
|
||||
)
|
||||
|
||||
data object Foot : Unit(
|
||||
nameResId = R.string.unit_length_foot,
|
||||
formatResId = R.string.unit_length_foot_format,
|
||||
factor = 0.3048
|
||||
)
|
||||
|
||||
data object Mil : Unit(
|
||||
nameResId = R.string.unit_length_mil,
|
||||
formatResId = R.string.unit_length_mil_format,
|
||||
factor = 0.0000254
|
||||
)
|
||||
|
||||
data object Inch : Unit(
|
||||
nameResId = R.string.unit_length_inch,
|
||||
formatResId = R.string.unit_length_inch_format,
|
||||
factor = 0.0254
|
||||
)
|
||||
|
||||
data object Fathom : Unit(
|
||||
nameResId = R.string.unit_length_fathom,
|
||||
formatResId = R.string.unit_length_fathom_format,
|
||||
factor = 1.852
|
||||
)
|
||||
|
||||
data object Cable : Unit(
|
||||
nameResId = R.string.unit_length_cable,
|
||||
formatResId = R.string.unit_length_cable_format,
|
||||
factor = 185.2
|
||||
)
|
||||
|
||||
data object NauticalMile : Unit(
|
||||
nameResId = R.string.unit_length_nautical_mile,
|
||||
formatResId = R.string.unit_length_nautical_mile_format,
|
||||
factor = 1_852.0
|
||||
)
|
||||
|
||||
data object Link : Unit(
|
||||
nameResId = R.string.unit_length_link,
|
||||
formatResId = R.string.unit_length_link_format,
|
||||
factor = 0.201168
|
||||
)
|
||||
|
||||
data object Rod : Unit(
|
||||
nameResId = R.string.unit_length_rod,
|
||||
formatResId = R.string.unit_length_rod_format,
|
||||
factor = 5.0292
|
||||
)
|
||||
|
||||
data object AstronomicalUnit : Unit(
|
||||
nameResId = R.string.unit_length_astronomical_unit,
|
||||
formatResId = R.string.unit_length_astronomical_unit_format,
|
||||
factor = 1.495979e+11
|
||||
)
|
||||
|
||||
data object Parsec : Unit(
|
||||
nameResId = R.string.unit_length_parsec,
|
||||
formatResId = R.string.unit_length_parsec_format,
|
||||
factor = 3.0857e+16
|
||||
)
|
||||
|
||||
data object LightYear : Unit(
|
||||
nameResId = R.string.unit_length_light_year,
|
||||
formatResId = R.string.unit_length_light_year_format,
|
||||
factor = 9.4607e+15
|
||||
)
|
||||
}
|
||||
|
@ -6,74 +6,88 @@ object MassConverter : Converter {
|
||||
override val nameResId: Int = R.string.unit_mass
|
||||
override val imageResId: Int = R.drawable.ic_scale_vector
|
||||
|
||||
sealed class Unit(nameResId: Int, factor: Double) : Converter.Unit(nameResId, factor) {
|
||||
sealed class Unit(nameResId: Int, formatResId: Int, factor: Double) : Converter.Unit(nameResId, formatResId, factor) {
|
||||
data object Gram : Unit(
|
||||
nameResId = R.string.unit_mass_gram,
|
||||
formatResId = R.string.unit_mass_gram_format,
|
||||
factor = 0.001
|
||||
)
|
||||
|
||||
data object Kilogram : Unit(
|
||||
nameResId = R.string.unit_mass_kilogram,
|
||||
formatResId = R.string.unit_mass_kilogram_format,
|
||||
factor = 1.0
|
||||
)
|
||||
|
||||
data object Milligram : Unit(
|
||||
nameResId = R.string.unit_mass_milligram,
|
||||
formatResId = R.string.unit_mass_milligram_format,
|
||||
factor = 0.000001
|
||||
)
|
||||
|
||||
data object Microgram : Unit(
|
||||
nameResId = R.string.unit_mass_microgram,
|
||||
formatResId = R.string.unit_mass_microgram_format,
|
||||
factor = 0.000000001
|
||||
)
|
||||
|
||||
data object Tonne : Unit(
|
||||
nameResId = R.string.unit_mass_tonne,
|
||||
formatResId = R.string.unit_mass_tonne_format,
|
||||
factor = 1_000.0
|
||||
)
|
||||
|
||||
data object Pound : Unit(
|
||||
nameResId = R.string.unit_mass_pound,
|
||||
formatResId = R.string.unit_mass_pound_format,
|
||||
factor = 0.45359237
|
||||
)
|
||||
|
||||
data object Ounce : Unit(
|
||||
nameResId = R.string.unit_mass_ounce,
|
||||
formatResId = R.string.unit_mass_ounce_format,
|
||||
factor = 0.028349523125
|
||||
)
|
||||
|
||||
data object Grain : Unit(
|
||||
nameResId = R.string.unit_mass_grain,
|
||||
formatResId = R.string.unit_mass_grain_format,
|
||||
factor = 0.00006479891
|
||||
)
|
||||
|
||||
data object Dram : Unit(
|
||||
nameResId = R.string.unit_mass_dram,
|
||||
formatResId = R.string.unit_mass_dram_format,
|
||||
factor = 0.0017718451953125
|
||||
)
|
||||
|
||||
data object Stone : Unit(
|
||||
nameResId = R.string.unit_mass_stone,
|
||||
formatResId = R.string.unit_mass_stone_format,
|
||||
factor = 6.35029318
|
||||
)
|
||||
|
||||
data object LongTon : Unit(
|
||||
nameResId = R.string.unit_mass_long_ton,
|
||||
formatResId = R.string.unit_mass_long_ton_format,
|
||||
factor = 1_016.0469088
|
||||
)
|
||||
|
||||
data object ShortTon : Unit(
|
||||
nameResId = R.string.unit_mass_short_ton,
|
||||
formatResId = R.string.unit_mass_short_ton_format,
|
||||
factor = 907.18474
|
||||
)
|
||||
|
||||
data object Carat : Unit(
|
||||
nameResId = R.string.unit_mass_carat,
|
||||
formatResId = R.string.unit_mass_carat_format,
|
||||
factor = 0.0002051965483
|
||||
)
|
||||
|
||||
data object CaratMetric : Unit(
|
||||
nameResId = R.string.unit_mass_carat_metric,
|
||||
formatResId = R.string.unit_mass_carat_metric_format,
|
||||
factor = 0.0002
|
||||
)
|
||||
}
|
||||
|
@ -6,10 +6,11 @@ object TemperatureConverter : Converter {
|
||||
override val nameResId: Int = R.string.unit_temperature
|
||||
override val imageResId: Int = R.drawable.ic_thermostat_vector
|
||||
|
||||
sealed class Unit(nameResId: Int, factor: Double) : Converter.Unit(nameResId, factor) {
|
||||
sealed class Unit(nameResId: Int, formatResId: Int, factor: Double) : Converter.Unit(nameResId, formatResId, factor) {
|
||||
|
||||
data object Celsius : Unit(
|
||||
nameResId = R.string.unit_temperature_celsius,
|
||||
formatResId = R.string.unit_temperature_celsius_format,
|
||||
factor = 1.0
|
||||
) {
|
||||
const val KELVIN_OFFSET = 273.15
|
||||
@ -20,6 +21,7 @@ object TemperatureConverter : Converter {
|
||||
|
||||
data object Delisle : Unit(
|
||||
nameResId = R.string.unit_temperature_delisle,
|
||||
formatResId = R.string.unit_temperature_delisle_format,
|
||||
factor = 2.0 / 3
|
||||
) {
|
||||
private const val KELVIN_OFFSET = 373.15
|
||||
@ -31,6 +33,7 @@ object TemperatureConverter : Converter {
|
||||
|
||||
data object Fahrenheit : Unit(
|
||||
nameResId = R.string.unit_temperature_fahrenheit,
|
||||
formatResId = R.string.unit_temperature_fahrenheit_format,
|
||||
factor = 9.0 / 5
|
||||
) {
|
||||
private const val CELSIUS_OFFSET = 32
|
||||
@ -42,6 +45,7 @@ object TemperatureConverter : Converter {
|
||||
|
||||
data object Newton : Unit(
|
||||
nameResId = R.string.unit_temperature_newton,
|
||||
formatResId = R.string.unit_temperature_newton_format,
|
||||
factor = 100.0 / 33
|
||||
) {
|
||||
private const val KELVIN_OFFSET = Celsius.KELVIN_OFFSET
|
||||
@ -53,11 +57,13 @@ object TemperatureConverter : Converter {
|
||||
|
||||
data object Rankine : Unit(
|
||||
nameResId = R.string.unit_temperature_rankine,
|
||||
formatResId = R.string.unit_temperature_rankine_format,
|
||||
factor = 5.0 / 9
|
||||
)
|
||||
|
||||
data object Reaumur : Unit(
|
||||
nameResId = R.string.unit_temperature_reaumur,
|
||||
formatResId = R.string.unit_temperature_reaumur_format,
|
||||
factor = 5.0 / 4
|
||||
) {
|
||||
private const val KELVIN_OFFSET = Celsius.KELVIN_OFFSET
|
||||
@ -69,6 +75,7 @@ object TemperatureConverter : Converter {
|
||||
|
||||
data object Romer : Unit(
|
||||
nameResId = R.string.unit_temperature_romer,
|
||||
formatResId = R.string.unit_temperature_romer_format,
|
||||
factor = 40.0 / 21
|
||||
) {
|
||||
private const val KELVIN_OFFSET = Celsius.KELVIN_OFFSET
|
||||
@ -81,6 +88,7 @@ object TemperatureConverter : Converter {
|
||||
|
||||
data object GasMark : Unit(
|
||||
nameResId = R.string.unit_temperature_gas_mark,
|
||||
formatResId = R.string.unit_temperature_gas_mark_format,
|
||||
factor = 25.0
|
||||
) {
|
||||
private const val FAHRENHEIT_OFFSET = 250
|
||||
@ -92,6 +100,7 @@ object TemperatureConverter : Converter {
|
||||
|
||||
data object Kelvin : Unit(
|
||||
nameResId = R.string.unit_temperature_kelvin,
|
||||
formatResId = R.string.unit_temperature_kelvin_format,
|
||||
factor = 1.0
|
||||
)
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ object TimeConverter : Converter {
|
||||
override val nameResId: Int = R.string.unit_time
|
||||
override val imageResId: Int = com.simplemobiletools.commons.R.drawable.ic_clock_vector
|
||||
|
||||
sealed class Unit(nameResId: Int, factor: Double) : Converter.Unit(nameResId, factor) {
|
||||
sealed class Unit(nameResId: Int, formatResId: Int, factor: Double) : Converter.Unit(nameResId, formatResId, factor) {
|
||||
companion object {
|
||||
private const val MINUTE = 60.0
|
||||
private const val HOUR = 60.0 * MINUTE
|
||||
@ -16,116 +16,139 @@ object TimeConverter : Converter {
|
||||
|
||||
data object Hour : Unit(
|
||||
nameResId = R.string.unit_time_hour,
|
||||
formatResId = R.string.unit_time_hour_format,
|
||||
factor = HOUR
|
||||
)
|
||||
|
||||
data object Minute : Unit(
|
||||
nameResId = R.string.unit_time_minute,
|
||||
formatResId = R.string.unit_time_minute_format,
|
||||
factor = MINUTE
|
||||
)
|
||||
|
||||
data object Second : Unit(
|
||||
nameResId = R.string.unit_time_second,
|
||||
formatResId = R.string.unit_time_second_format,
|
||||
factor = 1.0
|
||||
)
|
||||
|
||||
data object Millisecond : Unit(
|
||||
nameResId = R.string.unit_time_millisecond,
|
||||
formatResId = R.string.unit_time_millisecond_format,
|
||||
factor = 0.001
|
||||
)
|
||||
|
||||
data object Microsecond : Unit(
|
||||
nameResId = R.string.unit_time_microsecond,
|
||||
formatResId = R.string.unit_time_microsecond_format,
|
||||
factor = 0.000001
|
||||
)
|
||||
|
||||
data object Nanosecond : Unit(
|
||||
nameResId = R.string.unit_time_nanosecond,
|
||||
formatResId = R.string.unit_time_nanosecond_format,
|
||||
factor = 0.000000001
|
||||
)
|
||||
|
||||
data object Picosecond : Unit(
|
||||
nameResId = R.string.unit_time_picosecond,
|
||||
formatResId = R.string.unit_time_picosecond_format,
|
||||
factor = 0.000000000001
|
||||
)
|
||||
|
||||
data object Day : Unit(
|
||||
nameResId = R.string.unit_time_day,
|
||||
formatResId = R.string.unit_time_day_format,
|
||||
factor = DAY
|
||||
)
|
||||
|
||||
data object Week : Unit(
|
||||
nameResId = R.string.unit_time_week,
|
||||
formatResId = R.string.unit_time_week_format,
|
||||
factor = DAY * 7
|
||||
)
|
||||
|
||||
data object MonthFull : Unit(
|
||||
nameResId = R.string.unit_time_month_full,
|
||||
formatResId = R.string.unit_time_month_full_format,
|
||||
factor = DAY * 30
|
||||
)
|
||||
|
||||
data object MonthHollow : Unit(
|
||||
nameResId = R.string.unit_time_month_hollow,
|
||||
formatResId = R.string.unit_time_month_hollow_format,
|
||||
factor = DAY * 29
|
||||
)
|
||||
|
||||
data object MonthSynodic : Unit(
|
||||
nameResId = R.string.unit_time_month_synodic,
|
||||
formatResId = R.string.unit_time_month_synodic_format,
|
||||
factor = DAY * 29.530589
|
||||
)
|
||||
|
||||
data object MonthGregorianAverage : Unit(
|
||||
nameResId = R.string.unit_time_month_gregorian_average,
|
||||
formatResId = R.string.unit_time_month_gregorian_average_format,
|
||||
factor = DAY * 30.346875
|
||||
)
|
||||
|
||||
data object YearLeap : Unit(
|
||||
nameResId = R.string.unit_time_year_leap,
|
||||
formatResId = R.string.unit_time_year_leap_format,
|
||||
factor = DAY * 366
|
||||
)
|
||||
|
||||
data object YearGregorian : Unit(
|
||||
nameResId = R.string.unit_time_year_gregorian,
|
||||
formatResId = R.string.unit_time_year_gregorian_format,
|
||||
factor = GREGORIAN_YEAR
|
||||
)
|
||||
|
||||
data object YearJulian : Unit(
|
||||
nameResId = R.string.unit_time_year_julian,
|
||||
formatResId = R.string.unit_time_year_julian_format,
|
||||
factor = DAY * 365.25
|
||||
)
|
||||
|
||||
data object Jiffy : Unit(
|
||||
nameResId = R.string.unit_time_jiffy,
|
||||
formatResId = R.string.unit_time_jiffy_format,
|
||||
factor = 1 / 60.0
|
||||
)
|
||||
|
||||
data object Moment : Unit(
|
||||
nameResId = R.string.unit_time_moment,
|
||||
formatResId = R.string.unit_time_moment_format,
|
||||
factor = 90.0
|
||||
)
|
||||
|
||||
data object Fortnight : Unit(
|
||||
nameResId = R.string.unit_time_fortnight,
|
||||
formatResId = R.string.unit_time_fortnight_format,
|
||||
factor = DAY * 7 * 2
|
||||
)
|
||||
|
||||
data object Decade : Unit(
|
||||
nameResId = R.string.unit_time_decade,
|
||||
formatResId = R.string.unit_time_decade_format,
|
||||
factor = GREGORIAN_YEAR * 10
|
||||
)
|
||||
|
||||
data object Century : Unit(
|
||||
nameResId = R.string.unit_time_century,
|
||||
formatResId = R.string.unit_time_century_format,
|
||||
factor = GREGORIAN_YEAR * 100
|
||||
)
|
||||
|
||||
data object Millennium : Unit(
|
||||
nameResId = R.string.unit_time_millennium,
|
||||
formatResId = R.string.unit_time_millennium_format,
|
||||
factor = GREGORIAN_YEAR * 1000
|
||||
)
|
||||
|
||||
data object AtomicUnit : Unit(
|
||||
nameResId = R.string.unit_time_atomic_unit,
|
||||
formatResId = R.string.unit_time_atomic_unit_format,
|
||||
factor = 0.00000000000000002418884254
|
||||
)
|
||||
}
|
||||
|
@ -6,159 +6,190 @@ object VolumeConverter : Converter {
|
||||
override val nameResId: Int = R.string.unit_volume
|
||||
override val imageResId: Int = R.drawable.ic_drop_vector
|
||||
|
||||
sealed class Unit(nameResId: Int, factor: Double) : Converter.Unit(nameResId, factor) {
|
||||
sealed class Unit(nameResId: Int, formatResId: Int, factor: Double) : Converter.Unit(nameResId, formatResId, factor) {
|
||||
data object CubicMeter : Unit(
|
||||
nameResId = R.string.unit_volume_cubic_meter,
|
||||
formatResId = R.string.unit_volume_cubic_meter_format,
|
||||
factor = 1.0
|
||||
)
|
||||
|
||||
data object CubicDecimeter : Unit(
|
||||
nameResId = R.string.unit_volume_cubic_decimeter,
|
||||
formatResId = R.string.unit_volume_cubic_decimeter_format,
|
||||
factor = 0.001
|
||||
)
|
||||
|
||||
data object CubicCentimeter : Unit(
|
||||
nameResId = R.string.unit_volume_cubic_centimeter,
|
||||
formatResId = R.string.unit_volume_cubic_centimeter_format,
|
||||
factor = 0.000001
|
||||
)
|
||||
|
||||
data object CubicMillimeter : Unit(
|
||||
nameResId = R.string.unit_volume_cubic_millimeter,
|
||||
formatResId = R.string.unit_volume_cubic_millimeter_format,
|
||||
factor = 0.000000001
|
||||
)
|
||||
|
||||
data object Liter : Unit(
|
||||
nameResId = R.string.unit_volume_liter,
|
||||
formatResId = R.string.unit_volume_liter_format,
|
||||
factor = 0.001
|
||||
)
|
||||
|
||||
data object Centiliter : Unit(
|
||||
nameResId = R.string.unit_volume_centiliter,
|
||||
formatResId = R.string.unit_volume_centiliter_format,
|
||||
factor = 0.0001
|
||||
)
|
||||
|
||||
data object Deciliter : Unit(
|
||||
nameResId = R.string.unit_volume_deciliter,
|
||||
formatResId = R.string.unit_volume_deciliter_format,
|
||||
factor = 0.00001
|
||||
)
|
||||
|
||||
data object Milliliter : Unit(
|
||||
nameResId = R.string.unit_volume_milliliter,
|
||||
formatResId = R.string.unit_volume_milliliter_format,
|
||||
factor = 0.000001
|
||||
)
|
||||
|
||||
data object AcreFoot : Unit(
|
||||
nameResId = R.string.unit_volume_acre_foot,
|
||||
formatResId = R.string.unit_volume_acre_foot_format,
|
||||
factor = 1_233.48183754752
|
||||
)
|
||||
|
||||
data object CubicYard : Unit(
|
||||
nameResId = R.string.unit_volume_cubic_yard,
|
||||
formatResId = R.string.unit_volume_cubic_yard_format,
|
||||
factor = 0.764554857984
|
||||
)
|
||||
|
||||
data object CubicFoot : Unit(
|
||||
nameResId = R.string.unit_volume_cubic_foot,
|
||||
formatResId = R.string.unit_volume_cubic_foot_format,
|
||||
factor = 0.028316846592
|
||||
)
|
||||
|
||||
data object CubicInch : Unit(
|
||||
nameResId = R.string.unit_volume_cubic_inch,
|
||||
formatResId = R.string.unit_volume_cubic_inch_format,
|
||||
factor = 0.000016387064
|
||||
)
|
||||
|
||||
data object BarrelUS : Unit(
|
||||
nameResId = R.string.unit_volume_barrel_us,
|
||||
formatResId = R.string.unit_volume_barrel_us_format,
|
||||
factor = 0.119240471196
|
||||
)
|
||||
|
||||
data object GallonUS : Unit(
|
||||
nameResId = R.string.unit_volume_gallon_us,
|
||||
formatResId = R.string.unit_volume_gallon_us_format,
|
||||
factor = 0.003785411784
|
||||
)
|
||||
|
||||
data object QuartUS : Unit(
|
||||
nameResId = R.string.unit_volume_quart_us,
|
||||
formatResId = R.string.unit_volume_quart_us_format,
|
||||
factor = 0.000946352946
|
||||
)
|
||||
|
||||
data object PintUS : Unit(
|
||||
nameResId = R.string.unit_volume_pint_us,
|
||||
formatResId = R.string.unit_volume_pint_us_format,
|
||||
factor = 0.000473176473
|
||||
)
|
||||
|
||||
data object GillUS : Unit(
|
||||
nameResId = R.string.unit_volume_gill_us,
|
||||
formatResId = R.string.unit_volume_gill_us_format,
|
||||
factor = 0.00011829411825
|
||||
)
|
||||
|
||||
data object FluidOunceUS : Unit(
|
||||
nameResId = R.string.unit_volume_fluid_ounce_us,
|
||||
formatResId = R.string.unit_volume_fluid_ounce_us_format,
|
||||
factor = 0.00003
|
||||
)
|
||||
|
||||
data object DropUS : Unit(
|
||||
nameResId = R.string.unit_volume_drop_us,
|
||||
formatResId = R.string.unit_volume_drop_us_format,
|
||||
factor = 0.00000008214869322916
|
||||
)
|
||||
|
||||
data object TeaspoonUS : Unit(
|
||||
nameResId = R.string.unit_volume_teaspoon_us,
|
||||
formatResId = R.string.unit_volume_teaspoon_us_format,
|
||||
factor = 0.000005
|
||||
)
|
||||
|
||||
data object TablespoonUS : Unit(
|
||||
nameResId = R.string.unit_volume_tablespoon_us,
|
||||
formatResId = R.string.unit_volume_tablespoon_us_format,
|
||||
factor = 0.000015
|
||||
)
|
||||
|
||||
data object CupUS : Unit(
|
||||
nameResId = R.string.unit_volume_cup_us,
|
||||
formatResId = R.string.unit_volume_cup_us_format,
|
||||
factor = 0.00024
|
||||
)
|
||||
|
||||
data object BarrelImperial : Unit(
|
||||
nameResId = R.string.unit_volume_barrel_imperial,
|
||||
formatResId = R.string.unit_volume_barrel_imperial_format,
|
||||
factor = 0.16365924
|
||||
)
|
||||
|
||||
data object GallonImperial : Unit(
|
||||
nameResId = R.string.unit_volume_gallon_imperial,
|
||||
formatResId = R.string.unit_volume_gallon_imperial_format,
|
||||
factor = 0.00454609
|
||||
)
|
||||
|
||||
data object QuartImperial : Unit(
|
||||
nameResId = R.string.unit_volume_quart_imperial,
|
||||
formatResId = R.string.unit_volume_quart_imperial_format,
|
||||
factor = 0.0011365225
|
||||
)
|
||||
|
||||
data object PintImperial : Unit(
|
||||
nameResId = R.string.unit_volume_pint_imperial,
|
||||
formatResId = R.string.unit_volume_pint_imperial_format,
|
||||
factor = 0.00056826125
|
||||
)
|
||||
|
||||
data object GillImperial : Unit(
|
||||
nameResId = R.string.unit_volume_gill_imperial,
|
||||
formatResId = R.string.unit_volume_gill_imperial_format,
|
||||
factor = 0.0001420653125
|
||||
)
|
||||
|
||||
data object FluidOunceImperial : Unit(
|
||||
nameResId = R.string.unit_volume_fluid_ounce_imperial,
|
||||
formatResId = R.string.unit_volume_fluid_ounce_imperial_format,
|
||||
factor = 0.0000284130625
|
||||
)
|
||||
|
||||
data object DropImperial : Unit(
|
||||
nameResId = R.string.unit_volume_drop_imperial,
|
||||
formatResId = R.string.unit_volume_drop_imperial_format,
|
||||
factor = 0.0000000986564670138
|
||||
)
|
||||
|
||||
data object TeaspoonImperial : Unit(
|
||||
nameResId = R.string.unit_volume_teaspoon_imperial,
|
||||
formatResId = R.string.unit_volume_teaspoon_imperial_format,
|
||||
factor = 0.00000591938802083
|
||||
)
|
||||
|
||||
data object TablespoonImperial : Unit(
|
||||
nameResId = R.string.unit_volume_tablespoon_imperial,
|
||||
formatResId = R.string.unit_volume_tablespoon_imperial_format,
|
||||
factor = 0.0000177581640625
|
||||
)
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import android.content.res.ColorStateList
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import com.simplemobiletools.calculator.R
|
||||
import com.simplemobiletools.calculator.databinding.ViewConverterBinding
|
||||
@ -13,6 +14,7 @@ import com.simplemobiletools.calculator.helpers.COMMA
|
||||
import com.simplemobiletools.calculator.helpers.DOT
|
||||
import com.simplemobiletools.calculator.helpers.NumberFormatHelper
|
||||
import com.simplemobiletools.calculator.helpers.converters.Converter
|
||||
import com.simplemobiletools.calculator.helpers.converters.ValueWithUnit
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
@ -55,7 +57,7 @@ class ConverterView @JvmOverloads constructor(
|
||||
topUnit = converter.defaultTopUnit
|
||||
bottomUnit = converter.defaultBottomUnit
|
||||
|
||||
binding.topUnitText.text = "0"
|
||||
binding.topUnitText.setFormattedUnitText(topUnit!!.withValue(0.0))
|
||||
updateBottomValue()
|
||||
updateUnitLabels()
|
||||
}
|
||||
@ -79,8 +81,8 @@ class ConverterView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
binding.topUnitText.text = "0"
|
||||
binding.bottomUnitText.text = "0"
|
||||
binding.topUnitText.setFormattedUnitText(topUnit!!.withValue(0.0))
|
||||
binding.bottomUnitText.setFormattedUnitText(bottomUnit!!.withValue(0.0))
|
||||
}
|
||||
|
||||
fun numpadClicked(id: Int) {
|
||||
@ -102,7 +104,7 @@ class ConverterView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun decimalClicked() {
|
||||
var value = binding.topUnitText.text.toString()
|
||||
var value = binding.topUnitText.text.removeUnit()
|
||||
if (!value.contains(decimalSeparator)) {
|
||||
when (value) {
|
||||
"0" -> value = "0$decimalSeparator"
|
||||
@ -110,30 +112,31 @@ class ConverterView @JvmOverloads constructor(
|
||||
else -> value += decimalSeparator
|
||||
}
|
||||
|
||||
binding.topUnitText.text = value
|
||||
binding.topUnitText.text = topUnit?.format(context, value)
|
||||
}
|
||||
}
|
||||
|
||||
private fun zeroClicked() {
|
||||
val value = binding.topUnitText.text
|
||||
val value = binding.topUnitText.text.removeUnit()
|
||||
if (value != "0" || value.contains(decimalSeparator)) {
|
||||
addDigit(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun addDigit(digit: Int) {
|
||||
var value = binding.topUnitText.text.toString()
|
||||
var value = binding.topUnitText.text.removeUnit()
|
||||
if (value == "0") {
|
||||
value = ""
|
||||
}
|
||||
|
||||
value += digit
|
||||
value = formatter.addGroupingSeparators(value)
|
||||
binding.topUnitText.text = value
|
||||
binding.topUnitText.text = topUnit!!.format(context, value)
|
||||
}
|
||||
|
||||
private fun switch() {
|
||||
::topUnit.swapWith(::bottomUnit)
|
||||
updateTopValue()
|
||||
updateBottomValue()
|
||||
updateUnitLabels()
|
||||
}
|
||||
@ -143,10 +146,14 @@ class ConverterView @JvmOverloads constructor(
|
||||
binding.bottomUnitName.text = bottomUnit?.nameResId?.let { context.getString(it) }
|
||||
}
|
||||
|
||||
private fun updateTopValue() {
|
||||
binding.topUnitText.setFormattedUnitText(topUnit!!.withValue(binding.topUnitText.getValue()))
|
||||
}
|
||||
|
||||
private fun updateBottomValue() {
|
||||
converter?.apply {
|
||||
val converted = convert(topUnit!!.withValue(formatter.removeGroupingSeparator(binding.topUnitText.text.toString()).toDouble()), bottomUnit!!).value
|
||||
binding.bottomUnitText.text = formatter.doubleToString(converted)
|
||||
val converted = convert(topUnit!!.withValue(binding.topUnitText.getValue()), bottomUnit!!).value
|
||||
binding.bottomUnitText.setFormattedUnitText(bottomUnit!!.withValue(converted))
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,11 +163,21 @@ class ConverterView @JvmOverloads constructor(
|
||||
this.groupingSeparator = groupingSeparator
|
||||
formatter.decimalSeparator = decimalSeparator
|
||||
formatter.groupingSeparator = groupingSeparator
|
||||
binding.topUnitText.text = "0"
|
||||
binding.bottomUnitText.text = "0"
|
||||
binding.topUnitText.setFormattedUnitText(topUnit!!.withValue(0.0))
|
||||
binding.bottomUnitText.setFormattedUnitText(bottomUnit!!.withValue(0.0))
|
||||
}
|
||||
}
|
||||
|
||||
private fun TextView.setFormattedUnitText(value: ValueWithUnit<*>) {
|
||||
text = value.unit.format(context, formatter.doubleToString(value.value))
|
||||
}
|
||||
|
||||
private fun TextView.getValue(): Double {
|
||||
return formatter.removeGroupingSeparator(text.removeUnit()).toDouble()
|
||||
}
|
||||
|
||||
private fun CharSequence.removeUnit() = filter { it.isDigit() || it == '.' || it == ',' }.toString()
|
||||
|
||||
private fun <T> KMutableProperty0<T>.swapWith(other: KMutableProperty0<T>) {
|
||||
this.get().also {
|
||||
this.set(other.get())
|
||||
@ -171,7 +188,7 @@ class ConverterView @JvmOverloads constructor(
|
||||
private fun View.setClickListenerForUnitSelector(propertyToChange: KMutableProperty0<Converter.Unit?>, otherProperty: KMutableProperty0<Converter.Unit?>) {
|
||||
setOnClickListener {
|
||||
val items = ArrayList(converter!!.units.mapIndexed { index, unit ->
|
||||
RadioItem(index, context.getString(unit.nameResId), unit)
|
||||
RadioItem(index, unit.getNameWithSymbol(context), unit)
|
||||
})
|
||||
RadioGroupDialog(context as Activity, items, converter!!.units.indexOf(propertyToChange.get())) {
|
||||
val unit = it as Converter.Unit
|
||||
@ -179,6 +196,7 @@ class ConverterView @JvmOverloads constructor(
|
||||
switch()
|
||||
} else if (unit != propertyToChange.get()) {
|
||||
propertyToChange.set(unit)
|
||||
updateTopValue()
|
||||
updateBottomValue()
|
||||
}
|
||||
updateUnitLabels()
|
||||
|
@ -2,6 +2,124 @@
|
||||
<resources>
|
||||
<string name="package_name">com.simplemobiletools.calculator</string>
|
||||
|
||||
<string name="unit_name_with_symbol_format">%s (%s)</string>
|
||||
<string name="unit_length_kilometer_format">%s km</string>
|
||||
<string name="unit_length_hectometer_format">%s hm</string>
|
||||
<string name="unit_length_decameter_format">%s dam</string>
|
||||
<string name="unit_length_meter_format">%s m</string>
|
||||
<string name="unit_length_decimeter_format">%s dm</string>
|
||||
<string name="unit_length_centimeter_format">%s cm</string>
|
||||
<string name="unit_length_millimeter_format">%s mm</string>
|
||||
<string name="unit_length_micrometer_format">%s μm</string>
|
||||
<string name="unit_length_nanometer_format">%s nm</string>
|
||||
<string name="unit_length_picometer_format">%s pm</string>
|
||||
<string name="unit_length_angstrom_format">%s Å</string>
|
||||
<string name="unit_length_mile_format">%s mi</string>
|
||||
<string name="unit_length_chain_format">%s ch</string>
|
||||
<string name="unit_length_yard_format">%s yd</string>
|
||||
<string name="unit_length_foot_format">%s ft</string>
|
||||
<string name="unit_length_mil_format">%s mil</string>
|
||||
<string name="unit_length_inch_format">%s in</string>
|
||||
<string name="unit_length_fathom_format">%s fathom</string>
|
||||
<string name="unit_length_cable_format">%s cable</string>
|
||||
<string name="unit_length_nautical_mile_format">%s NM</string>
|
||||
<string name="unit_length_link_format">%s lnk</string>
|
||||
<string name="unit_length_rod_format">%s rd</string>
|
||||
<string name="unit_length_astronomical_unit_format">%s au</string>
|
||||
<string name="unit_length_parsec_format">%s pc</string>
|
||||
<string name="unit_length_light_year_format">%s ly</string>
|
||||
<string name="unit_area_square_kilometer_format">%s km²</string>
|
||||
<string name="unit_area_square_meter_format">%s m²</string>
|
||||
<string name="unit_area_square_centimeter_format">%s cm²</string>
|
||||
<string name="unit_area_square_millimeter_format">%s mm²</string>
|
||||
<string name="unit_area_square_mile_format">%s sq mi</string>
|
||||
<string name="unit_area_square_yard_format">%s sq yd</string>
|
||||
<string name="unit_area_square_foot_format">%s sq ft</string>
|
||||
<string name="unit_area_square_mil_format">%s sq mil</string>
|
||||
<string name="unit_area_square_inch_format">%s sq in</string>
|
||||
<string name="unit_area_square_rod_format">%s sq rd</string>
|
||||
<string name="unit_area_acre_format">%s ac</string>
|
||||
<string name="unit_area_are_format">%s a</string>
|
||||
<string name="unit_area_dunam_format">%s dunam</string>
|
||||
<string name="unit_area_hectare_format">%s ha</string>
|
||||
<string name="unit_volume_cubic_meter_format">%s m³</string>
|
||||
<string name="unit_volume_cubic_decimeter_format">%s dm³</string>
|
||||
<string name="unit_volume_cubic_centimeter_format">%s cm³</string>
|
||||
<string name="unit_volume_cubic_millimeter_format">%s mm³</string>
|
||||
<string name="unit_volume_liter_format">%s l</string>
|
||||
<string name="unit_volume_centiliter_format">%s cl</string>
|
||||
<string name="unit_volume_deciliter_format">%s dl</string>
|
||||
<string name="unit_volume_milliliter_format">%s ml</string>
|
||||
<string name="unit_volume_acre_foot_format">%s ac ft</string>
|
||||
<string name="unit_volume_cubic_yard_format">%s yd³</string>
|
||||
<string name="unit_volume_cubic_foot_format">%s ft³</string>
|
||||
<string name="unit_volume_cubic_inch_format">%s in³</string>
|
||||
<string name="unit_volume_barrel_us_format">%s fl bl (US)</string>
|
||||
<string name="unit_volume_gallon_us_format">%s gal (US)</string>
|
||||
<string name="unit_volume_quart_us_format">%s qt (US)</string>
|
||||
<string name="unit_volume_pint_us_format">%s pt (US fl)</string>
|
||||
<string name="unit_volume_gill_us_format">%s gi (US)</string>
|
||||
<string name="unit_volume_fluid_ounce_us_format">%s US fl oz</string>
|
||||
<string name="unit_volume_drop_us_format">%s gtt</string>
|
||||
<string name="unit_volume_teaspoon_us_format">%s tsp</string>
|
||||
<string name="unit_volume_tablespoon_us_format">%s tbsp</string>
|
||||
<string name="unit_volume_cup_us_format">%s c (US)</string>
|
||||
<string name="unit_volume_barrel_imperial_format">%s bl (imp)</string>
|
||||
<string name="unit_volume_gallon_imperial_format">%s gal (imp)</string>
|
||||
<string name="unit_volume_quart_imperial_format">%s qt (imp)</string>
|
||||
<string name="unit_volume_pint_imperial_format">%s pt (imp)</string>
|
||||
<string name="unit_volume_gill_imperial_format">%s gi (imp)</string>
|
||||
<string name="unit_volume_fluid_ounce_imperial_format">%s fl oz (imp)</string>
|
||||
<string name="unit_volume_drop_imperial_format">%s gtt</string>
|
||||
<string name="unit_volume_teaspoon_imperial_format">%s tsp</string>
|
||||
<string name="unit_volume_tablespoon_imperial_format">%s tbsp</string>
|
||||
<string name="unit_mass_gram_format">%s g</string>
|
||||
<string name="unit_mass_kilogram_format">%s kg</string>
|
||||
<string name="unit_mass_milligram_format">%s mg</string>
|
||||
<string name="unit_mass_microgram_format">%s μm</string>
|
||||
<string name="unit_mass_tonne_format">%s t</string>
|
||||
<string name="unit_mass_pound_format">%s lb</string>
|
||||
<string name="unit_mass_ounce_format">%s oz</string>
|
||||
<string name="unit_mass_grain_format">%s gr</string>
|
||||
<string name="unit_mass_dram_format">%s dr</string>
|
||||
<string name="unit_mass_stone_format">%s st</string>
|
||||
<string name="unit_mass_long_ton_format">%s ton</string>
|
||||
<string name="unit_mass_short_ton_format">%s sh tn</string>
|
||||
<string name="unit_mass_carat_format">%s kt</string>
|
||||
<string name="unit_mass_carat_metric_format">%s ct</string>
|
||||
<string name="unit_temperature_celsius_format">%s°C</string>
|
||||
<string name="unit_temperature_delisle_format">%s°De</string>
|
||||
<string name="unit_temperature_fahrenheit_format">%s°F</string>
|
||||
<string name="unit_temperature_newton_format">%s°N</string>
|
||||
<string name="unit_temperature_rankine_format">%s°R</string>
|
||||
<string name="unit_temperature_reaumur_format">%s°Ré</string>
|
||||
<string name="unit_temperature_romer_format">%s°Rø</string>
|
||||
<string name="unit_temperature_gas_mark_format">%s GM</string>
|
||||
<string name="unit_temperature_kelvin_format">%s K</string>
|
||||
<string name="unit_time_hour_format">%s h</string>
|
||||
<string name="unit_time_minute_format">%s m</string>
|
||||
<string name="unit_time_second_format">%s s</string>
|
||||
<string name="unit_time_millisecond_format">%s ms</string>
|
||||
<string name="unit_time_microsecond_format">%s µs</string>
|
||||
<string name="unit_time_nanosecond_format">%s ns</string>
|
||||
<string name="unit_time_picosecond_format">%s ps</string>
|
||||
<string name="unit_time_day_format">%s d</string>
|
||||
<string name="unit_time_week_format">%s wk</string>
|
||||
<string name="unit_time_month_full_format">%s mo</string>
|
||||
<string name="unit_time_month_hollow_format">%s mo</string>
|
||||
<string name="unit_time_month_synodic_format">%s mo</string>
|
||||
<string name="unit_time_month_gregorian_average_format">%s mo</string>
|
||||
<string name="unit_time_year_leap_format">%s y</string>
|
||||
<string name="unit_time_year_gregorian_format">%s y</string>
|
||||
<string name="unit_time_year_julian_format">%s y</string>
|
||||
<string name="unit_time_jiffy_format">%s j</string>
|
||||
<string name="unit_time_moment_format">%s moment</string>
|
||||
<string name="unit_time_fortnight_format">%s fn</string>
|
||||
<string name="unit_time_decade_format">%s dec</string>
|
||||
<string name="unit_time_century_format">%s c</string>
|
||||
<string name="unit_time_millennium_format">%s millennium</string>
|
||||
<string name="unit_time_atomic_unit_format">%s a.u.</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_28">Allow customizing the bottom navigation bar color</string>
|
||||
<string name="release_18">Added a toggle for preventing the phone from sleeping, enabled by default</string>
|
||||
|
Reference in New Issue
Block a user