Skip to content

Commit

Permalink
Adde new measurement units for Volume and Length
Browse files Browse the repository at this point in the history
  • Loading branch information
nevack committed Feb 16, 2017
1 parent efe910d commit c44dc13
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public LengthConverter(Context context) {
units.add(new Unit(context.getString(R.string.mile), 1609.344d, context.getString(R.string.milesymbol)));
units.add(new Unit(context.getString(R.string.foot), 0.3048d, context.getString(R.string.footsymbol)));
units.add(new Unit(context.getString(R.string.yard), 0.9144d, context.getString(R.string.yardsymbol)));
units.add(new Unit(context.getString(R.string.astronomicalunit), 149597870700d, context.getString(R.string.astronomicalunitsymbol)));
units.add(new Unit(context.getString(R.string.parsec), 3.0856776e16, context.getString(R.string.parsecsymbol)));
units.add(new Unit(context.getString(R.string.lightyear), 9460730472580800d, context.getString(R.string.lightyearsymbol)));
}

public int getTitle() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public VolumeConverter(Context context) {
units.add(new Unit(context.getString(R.string.litre), 0.001d, context.getString(R.string.litresymbol)));
units.add(new Unit(context.getString(R.string.cubicmetre), 1d, context.getString(R.string.metresymbol) + CUBIC_POSTFIX));
units.add(new Unit(context.getString(R.string.millilitre), 0.000001d, context.getString(R.string.millilitresymbol)));
units.add(new Unit(context.getString(R.string.gallon), 0.00378541d, context.getString(R.string.gallonsymbol)));
units.add(new Unit(context.getString(R.string.barrel), 0.158988d, context.getString(R.string.barrelsymbol)));
}

public int getTitle() {
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values-be/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,14 @@
<string name="description_copy_button">Кнопка скапіяваць вынік</string>
<string name="description_paste_button">Кнопка ўставіць значэнне</string>
<string name="zero_hint">0</string>
<string name="gallon">Галон ЗША</string>
<string name="gallonsymbol">гал</string>
<string name="barrel">Барэль</string>
<string name="barrelsymbol">ба</string>
<string name="astronomicalunit">Астранамічная адзінка</string>
<string name="astronomicalunitsymbol">а.а.</string>
<string name="parsec">Парсек</string>
<string name="parsecsymbol">пс</string>
<string name="lightyear">Светлавы год</string>
<string name="lightyearsymbol">св.г.</string>
</resources>
10 changes: 10 additions & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,14 @@
<string name="description_copy_button">Кнопка скопировать релультат</string>
<string name="description_paste_button">Кнопка вставить значение</string>
<string name="zero_hint">0</string>
<string name="gallon">Галлон США</string>
<string name="gallonsymbol">гал</string>
<string name="barrel">Баррель</string>
<string name="barrelsymbol">ба</string>
<string name="astronomicalunit">Астрономическая единица</string>
<string name="astronomicalunitsymbol">а.е.</string>
<string name="parsec">Парсек</string>
<string name="parsecsymbol">пк</string>
<string name="lightyear">Световой год</string>
<string name="lightyearsymbol">св.г.</string>
</resources>
10 changes: 10 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,15 @@
<string name="description_paste_button">Paste value button</string>
<string name="description_icon" translatable="false">Category icon</string>
<string name="zero_hint">0</string>
<string name="gallon">US Gallon</string>
<string name="gallonsymbol">gal</string>
<string name="barrel">Barrel</string>
<string name="barrelsymbol">ba</string>
<string name="astronomicalunit">Astronomical unit</string>
<string name="astronomicalunitsymbol">au</string>
<string name="parsec">Parsec</string>
<string name="parsecsymbol">pc</string>
<string name="lightyear">Light-year</string>
<string name="lightyearsymbol">ly</string>

</resources>

0 comments on commit c44dc13

Please sign in to comment.