MD5 校验值:5ead1ed7f35383ec0e7e763a064d5934
MainActivity.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.apochstudios.unitconverter2; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Spinner; import android.widget.SpinnerAdapter; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import com.apochstudios.unitconverter2.RateThisApp; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.InterstitialAd; import com.google.android.gms.ads.MobileAds; import com.google.android.gms.ads.RequestConfiguration; import com.google.android.gms.ads.initialization.InitializationStatus; import com.google.android.gms.ads.initialization.OnInitializationCompleteListener; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.ArrayList; public class MainActivity extends AppCompatActivity { int clickCount; char decimalSeperator; char decimalSeperatorForKeyboard; private AdView mAdView; private InterstitialAd mInterstitialAd; @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); char decimalSeparator = ((DecimalFormat) NumberFormat.getInstance()).getDecimalFormatSymbols().getDecimalSeparator(); this.decimalSeperator = decimalSeparator; if (decimalSeparator == '.') { this.decimalSeperatorForKeyboard = (char) 8226; } else { this.decimalSeperatorForKeyboard = decimalSeparator; } setContentView(R.layout.activity_main); MobileAds.initialize(this, new OnInitializationCompleteListener() { @Override public void onInitializationComplete(InitializationStatus initializationStatus) { } }); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); InterstitialAd interstitialAd = new InterstitialAd(this); this.mInterstitialAd = interstitialAd; interstitialAd.setAdUnitId("ca-app-pub-4961709567194640/6721379969"); this.mInterstitialAd.loadAd(new AdRequest.Builder().build()); this.clickCount = 4; RateThisApp.init(new RateThisApp.Config(7, 3)); RateThisApp.onStart(this); RateThisApp.showRateDialogIfNeeded(this); } @Override public void onBackPressed() { if (findViewById(R.id.exists) == null) { goToMeasurement(findViewById(R.id.exists)); } else { moveTaskToBack(true); } } public void ButtonClick() { int i = this.clickCount + 1; this.clickCount = i; if (i < 6 || !this.mInterstitialAd.isLoaded()) { return; } this.mInterstitialAd.show(); this.clickCount = 0; this.mInterstitialAd.loadAd(new AdRequest.Builder().build()); } public void goToMeasurement(View view) { ButtonClick(); setContentView(R.layout.activity_main); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().show(); } public void goAdvertFree(View view) { startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=com.apochstudios.unitconverterpro"))); } public void Temperature_Converter(View view) { ButtonClick(); setContentView(R.layout.temperature_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_temperature_celcius)); arrayList.add(getResources().getString(R.string.unit_temperature_kelvin)); arrayList.add(getResources().getString(R.string.unit_temperature_fahrenheit)); arrayList.add(getResources().getString(R.string.unit_temperature_rankine)); getSupportActionBar().hide(); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_temperature_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_temperature_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_temperature(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_temperature(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_temperature(); } }); ((TextView) findViewById(R.id.EditText_temperature_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_temperature(); } }); ((TextView) findViewById(R.id.temperature_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Mass_Converter(View view) { ButtonClick(); setContentView(R.layout.mass_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_mass_microgram)); arrayList.add(getResources().getString(R.string.unit_mass_milligram)); arrayList.add(getResources().getString(R.string.unit_mass_gram)); arrayList.add(getResources().getString(R.string.unit_mass_kilogram)); arrayList.add(getResources().getString(R.string.unit_mass_tonne)); arrayList.add(getResources().getString(R.string.unit_mass_imperial_ton)); arrayList.add(getResources().getString(R.string.unit_mass_USton)); arrayList.add(getResources().getString(R.string.unit_mass_stone)); arrayList.add(getResources().getString(R.string.unit_mass_pound)); arrayList.add(getResources().getString(R.string.unit_mass_ounce)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_mass_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_mass_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_mass(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_mass(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_mass(); } }); ((TextView) findViewById(R.id.EditText_mass_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_mass(); } }); ((TextView) findViewById(R.id.mass_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Length_Converter(View view) { ButtonClick(); setContentView(R.layout.length_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_length_micrometre)); arrayList.add(getResources().getString(R.string.unit_length_millimetre)); arrayList.add(getResources().getString(R.string.unit_length_centimetre)); arrayList.add(getResources().getString(R.string.unit_length_metre)); arrayList.add(getResources().getString(R.string.unit_length_kilometre)); arrayList.add(getResources().getString(R.string.unit_length_mile)); arrayList.add(getResources().getString(R.string.unit_length_yard)); arrayList.add(getResources().getString(R.string.unit_length_foot)); arrayList.add(getResources().getString(R.string.unit_length_inch)); arrayList.add(getResources().getString(R.string.unit_length_nautical_mile)); arrayList.add(getResources().getString(R.string.unit_length_league)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_length_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_length_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_length(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_length(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_length(); } }); ((TextView) findViewById(R.id.EditText_length_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_length(); } }); ((TextView) findViewById(R.id.length_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Speed_Converter(View view) { ButtonClick(); setContentView(R.layout.speed_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_speed_ms)); arrayList.add(getResources().getString(R.string.unit_speed_kmh)); arrayList.add(getResources().getString(R.string.unit_speed_fts)); arrayList.add(getResources().getString(R.string.unit_speed_mph)); arrayList.add(getResources().getString(R.string.unit_speed_knots)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_speed_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_speed_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_speed(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_speed(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_speed(); } }); ((TextView) findViewById(R.id.EditText_speed_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_speed(); } }); ((TextView) findViewById(R.id.speed_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Volume_Converter(View view) { ButtonClick(); setContentView(R.layout.volume_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_volume_ml)); arrayList.add(getResources().getString(R.string.unit_volume_L)); arrayList.add(getResources().getString(R.string.unit_volume_m3)); arrayList.add(getResources().getString(R.string.unit_volume_cm3)); arrayList.add(getResources().getString(R.string.unit_volume_in3)); arrayList.add(getResources().getString(R.string.unit_volume_ft3)); arrayList.add(getResources().getString(R.string.unit_volume_USgallon)); arrayList.add(getResources().getString(R.string.unit_volume_USquart)); arrayList.add(getResources().getString(R.string.unit_volume_USpint)); arrayList.add(getResources().getString(R.string.unit_volume_UScup)); arrayList.add(getResources().getString(R.string.unit_volume_UStablespoon)); arrayList.add(getResources().getString(R.string.unit_volume_USteaspoon)); arrayList.add(getResources().getString(R.string.unit_volume_USfluid_ounce)); arrayList.add(getResources().getString(R.string.unit_volume_Impgallon)); arrayList.add(getResources().getString(R.string.unit_volume_Impquart)); arrayList.add(getResources().getString(R.string.unit_volume_imp_pint)); arrayList.add(getResources().getString(R.string.unit_volume_imp_cup)); arrayList.add(getResources().getString(R.string.unit_volume_IMPtablespoon)); arrayList.add(getResources().getString(R.string.unit_volume_IMPteaspoon)); arrayList.add(getResources().getString(R.string.unit_volume_IMPfluid_counce)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_volume_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_volume_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_volume(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_volume(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_volume(); } }); ((TextView) findViewById(R.id.EditText_volume_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_volume(); } }); ((TextView) findViewById(R.id.volume_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Area_Converter(View view) { ButtonClick(); setContentView(R.layout.area_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_area_m2)); arrayList.add(getResources().getString(R.string.unit_area_km2)); arrayList.add(getResources().getString(R.string.unit_area_in2)); arrayList.add(getResources().getString(R.string.unit_area_ft2)); arrayList.add(getResources().getString(R.string.unit_area_yd2)); arrayList.add(getResources().getString(R.string.unit_area_mile2)); arrayList.add(getResources().getString(R.string.unit_area_acre)); arrayList.add(getResources().getString(R.string.unit_area_hectare)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_area_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_area_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_area(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_area(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_area(); } }); ((TextView) findViewById(R.id.EditText_area_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_area(); } }); ((TextView) findViewById(R.id.area_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Energy_Converter(View view) { ButtonClick(); setContentView(R.layout.energy_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_energy_joule)); arrayList.add(getResources().getString(R.string.unit_energy_kJ)); arrayList.add(getResources().getString(R.string.unit_energy_cal)); arrayList.add(getResources().getString(R.string.unit_energy_kcal)); arrayList.add(getResources().getString(R.string.unit_energy_watthour)); arrayList.add(getResources().getString(R.string.unit_energy_kWhour)); arrayList.add(getResources().getString(R.string.unit_energy_BTU)); arrayList.add(getResources().getString(R.string.unit_energy_footpound)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item_blacktext, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_energy_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item_blacktext, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_energy_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_energy(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_energy(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_energy(); } }); ((TextView) findViewById(R.id.EditText_energy_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_energy(); } }); ((TextView) findViewById(R.id.energy_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Fuel_Converter(View view) { ButtonClick(); setContentView(R.layout.fuel_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_fuel_kmperL)); arrayList.add(getResources().getString(R.string.unit_fuel_Lper100km)); arrayList.add(getResources().getString(R.string.unit_fuel_USmilespergal)); arrayList.add(getResources().getString(R.string.unit_fuel_IMPmilespergal)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_fuel_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_fuel_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_fuel(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_fuel(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_fuel(); } }); ((TextView) findViewById(R.id.EditText_fuel_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_fuel(); } }); ((TextView) findViewById(R.id.fuel_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Angle_Converter(View view) { ButtonClick(); setContentView(R.layout.angle_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_angle_degrees)); arrayList.add(getResources().getString(R.string.unit_angle_radian)); arrayList.add(getResources().getString(R.string.unit_angle_gradian)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_angle_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_angle_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_angle(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_angle(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_angle(); } }); ((TextView) findViewById(R.id.EditText_angle_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_angle(); } }); ((TextView) findViewById(R.id.angle_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Pressure_Converter(View view) { ButtonClick(); setContentView(R.layout.pressure_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_pressure_Pa)); arrayList.add(getResources().getString(R.string.unit_pressure_kPA)); arrayList.add(getResources().getString(R.string.unit_pressure_MPA)); arrayList.add(getResources().getString(R.string.unit_pressure_atm)); arrayList.add(getResources().getString(R.string.unit_pressure_bar)); arrayList.add(getResources().getString(R.string.unit_pressure_torr)); arrayList.add(getResources().getString(R.string.unit_pressure_psi)); arrayList.add(getResources().getString(R.string.unit_pressure_kgpercm2)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_pressure_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_pressure_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_pressure(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_pressure(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_pressure(); } }); ((TextView) findViewById(R.id.EditText_pressure_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_pressure(); } }); ((TextView) findViewById(R.id.pressure_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Time_Converter(View view) { ButtonClick(); setContentView(R.layout.time_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_time_s)); arrayList.add(getResources().getString(R.string.unit_time_m)); arrayList.add(getResources().getString(R.string.unit_time_hr)); arrayList.add(getResources().getString(R.string.unit_time_day)); arrayList.add(getResources().getString(R.string.unit_time_week)); arrayList.add(getResources().getString(R.string.unit_time_month)); arrayList.add(getResources().getString(R.string.unit_time_year)); arrayList.add(getResources().getString(R.string.unit_time_decade)); arrayList.add(getResources().getString(R.string.unit_time_century)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_time_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_time_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_time(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_time(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_time(); } }); ((TextView) findViewById(R.id.EditText_time_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_time(); } }); ((TextView) findViewById(R.id.time_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Digital_Converter(View view) { ButtonClick(); setContentView(R.layout.digital_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_digital_byte)); arrayList.add(getResources().getString(R.string.unit_digital_kilobyte)); arrayList.add(getResources().getString(R.string.unit_digital_Kibibyte)); arrayList.add(getResources().getString(R.string.unit_digital_Megabyte)); arrayList.add(getResources().getString(R.string.unit_digital_Mebibyte)); arrayList.add(getResources().getString(R.string.unit_digital_Gigabyte)); arrayList.add(getResources().getString(R.string.unit_digital_Gibibyte)); arrayList.add(getResources().getString(R.string.unit_digital_Terabyte)); arrayList.add(getResources().getString(R.string.unit_digital_Tebibyte)); arrayList.add(getResources().getString(R.string.unit_digital_Petabyte)); arrayList.add(getResources().getString(R.string.unit_digital_Pebibyte)); arrayList.add(getResources().getString(R.string.unit_digital_Bit)); arrayList.add(getResources().getString(R.string.unit_digital_Kilobit)); arrayList.add(getResources().getString(R.string.unit_digital_Kibibit)); arrayList.add(getResources().getString(R.string.unit_digital_Megabit)); arrayList.add(getResources().getString(R.string.unit_digital_Mebibit)); arrayList.add(getResources().getString(R.string.unit_digital_Gigabit)); arrayList.add(getResources().getString(R.string.unit_digital_Gibibit)); arrayList.add(getResources().getString(R.string.unit_digital_Terabit)); arrayList.add(getResources().getString(R.string.unit_digital_Tebibit)); arrayList.add(getResources().getString(R.string.unit_digital_Petabit)); arrayList.add(getResources().getString(R.string.unit_digital_Pebibit)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_digital_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_digital_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_digital(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_digital(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_digital(); } }); ((TextView) findViewById(R.id.EditText_digital_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_digital(); } }); ((TextView) findViewById(R.id.digital_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Force_Converter(View view) { ButtonClick(); setContentView(R.layout.force_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_force_Newton)); arrayList.add(getResources().getString(R.string.unit_force_Poundforce)); arrayList.add(getResources().getString(R.string.unit_force_Dyne)); arrayList.add(getResources().getString(R.string.unit_force_Newtonmeter)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_force_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_force_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_force(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_force(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_force(); } }); ((TextView) findViewById(R.id.EditText_force_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_force(); } }); ((TextView) findViewById(R.id.force_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Sound_Converter(View view) { ButtonClick(); setContentView(R.layout.sound_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_sound_bell)); arrayList.add(getResources().getString(R.string.unit_sound_dB)); arrayList.add(getResources().getString(R.string.unit_sound_Np)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_sound_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_sound_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_sound(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_sound(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_sound(); } }); ((TextView) findViewById(R.id.EditText_sound_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_sound(); } }); ((TextView) findViewById(R.id.sound_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Concentration_Converter(View view) { ButtonClick(); setContentView(R.layout.concentration_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_concentration_kmolm3)); arrayList.add(getResources().getString(R.string.unit_concentration_umolcm3)); arrayList.add(getResources().getString(R.string.jadx_deobf_0x00000509)); arrayList.add(getResources().getString(R.string.jadx_deobf_0x00000508)); arrayList.add(getResources().getString(R.string.unit_concentration_mmolcm3)); arrayList.add(getResources().getString(R.string.unit_concentration_mmoldm3)); arrayList.add(getResources().getString(R.string.unit_concentration_mmolL)); arrayList.add(getResources().getString(R.string.unit_concentration_mmolm3)); arrayList.add(getResources().getString(R.string.unit_concentration_mmolml)); arrayList.add(getResources().getString(R.string.unit_concentration_moldm3)); arrayList.add(getResources().getString(R.string.unit_concentration_molL)); arrayList.add(getResources().getString(R.string.unit_concentration_molm3)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item_blacktext, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_concentration_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item_blacktext, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_concentration_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_concentration(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_concentration(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_concentration(); } }); ((TextView) findViewById(R.id.EditText_concentration_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_concentration(); } }); ((TextView) findViewById(R.id.concentration_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Density_Converter(View view) { ButtonClick(); setContentView(R.layout.density_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_density_kgm3)); arrayList.add(getResources().getString(R.string.unit_density_gcm3)); arrayList.add(getResources().getString(R.string.unit_density_lbft3)); arrayList.add(getResources().getString(R.string.unit_density_lbin3)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_density_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_density_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_density(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_density(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_density(); } }); ((TextView) findViewById(R.id.EditText_density_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_density(); } }); ((TextView) findViewById(R.id.density_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Power_Converter(View view) { ButtonClick(); setContentView(R.layout.power_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_power_watt)); arrayList.add(getResources().getString(R.string.unit_power_kilowatt)); arrayList.add(getResources().getString(R.string.unit_power_megawatt)); arrayList.add(getResources().getString(R.string.unit_power_horsepower)); arrayList.add(getResources().getString(R.string.unit_power_BTUmin)); arrayList.add(getResources().getString(R.string.unit_power_BTUs)); arrayList.add(getResources().getString(R.string.unit_power_lbftmin)); arrayList.add(getResources().getString(R.string.unit_power_lbfts)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_power_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_power_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_power(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_power(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_power(); } }); ((TextView) findViewById(R.id.EditText_power_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_power(); } }); ((TextView) findViewById(R.id.power_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Space_Converter(View view) { ButtonClick(); setContentView(R.layout.space_converter_page); this.mAdView = (AdView) findViewById(R.id.adView); this.mAdView.loadAd(new AdRequest.Builder().build()); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_space_ly)); arrayList.add(getResources().getString(R.string.unit_space_parsec)); arrayList.add(getResources().getString(R.string.unit_space_au)); arrayList.add(getResources().getString(R.string.unit_space_trillionmiles)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_space_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_space_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_space(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_space(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_space(); } }); ((TextView) findViewById(R.id.EditText_space_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_space(); } }); ((TextView) findViewById(R.id.space_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void Radiation_Converter(View view) { ButtonClick(); setContentView(R.layout.radiation_converter_page); getSupportActionBar().hide(); ArrayList arrayList = new ArrayList(); arrayList.add(getResources().getString(R.string.unit_radiation_becquerel)); arrayList.add(getResources().getString(R.string.unit_radiation_curie)); arrayList.add(getResources().getString(R.string.unit_radiation_rutherford)); ArrayAdapter arrayAdapter = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner = (Spinner) findViewById(R.id.spinner_radiation_from); spinner.setAdapter((SpinnerAdapter) arrayAdapter); ArrayAdapter arrayAdapter2 = new ArrayAdapter(this, R.layout.spinner_item, arrayList); arrayAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_radiation_to); spinner2.setAdapter((SpinnerAdapter) arrayAdapter2); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_radiation(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { MainActivity.this.convert_radiation(); } }); spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onNothingSelected(AdapterView<?> adapterView) { } @Override public void onItemSelected(AdapterView<?> adapterView, View view2, int i, long j) { MainActivity.this.convert_radiation(); } }); ((TextView) findViewById(R.id.EditText_radiation_from)).addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable editable) { } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { MainActivity.this.convert_radiation(); } }); ((TextView) findViewById(R.id.radiation_point)).setText(Character.toString(this.decimalSeperatorForKeyboard)); } public void convert_temperature() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_temperature_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_temperature_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } if (!getResources().getString(R.string.unit_temperature_celcius).equals(obj)) { if (getResources().getString(R.string.unit_temperature_kelvin).equals(obj)) { bigDecimal = bigDecimal.add(new BigDecimal("-273.15")); } else if (getResources().getString(R.string.unit_temperature_fahrenheit).equals(obj)) { bigDecimal = bigDecimal.add(new BigDecimal("-32")).divide(new BigDecimal("1.8"), 4); } else if (getResources().getString(R.string.unit_temperature_rankine).equals(obj)) { bigDecimal = bigDecimal.add(new BigDecimal("-491.67")).divide(new BigDecimal("1.8"), 4); } } if (!getResources().getString(R.string.unit_temperature_celcius).equals(obj2)) { if (getResources().getString(R.string.unit_temperature_kelvin).equals(obj2)) { bigDecimal = bigDecimal.add(new BigDecimal("273.15")); } else if (getResources().getString(R.string.unit_temperature_fahrenheit).equals(obj2)) { bigDecimal = bigDecimal.multiply(new BigDecimal("1.8")).add(new BigDecimal("32")); } else if (getResources().getString(R.string.unit_temperature_rankine).equals(obj2)) { bigDecimal = bigDecimal.multiply(new BigDecimal(1.8d)).add(new BigDecimal(491.67d)); } } if (obj2.equals(obj)) { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } ((TextView) findViewById(R.id.Text_temperature_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_mass() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_mass_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_mass_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("0.000000001"); BigDecimal bigDecimal3 = new BigDecimal("0.000001"); BigDecimal bigDecimal4 = new BigDecimal("0.001"); BigDecimal bigDecimal5 = new BigDecimal("1.0"); BigDecimal bigDecimal6 = new BigDecimal("1000"); BigDecimal bigDecimal7 = new BigDecimal("1016.05"); BigDecimal bigDecimal8 = new BigDecimal("907.185"); BigDecimal bigDecimal9 = new BigDecimal("6.35029"); BigDecimal bigDecimal10 = new BigDecimal("0.453592"); BigDecimal bigDecimal11 = new BigDecimal("0.0283495"); if (getResources().getString(R.string.unit_mass_microgram).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_milligram).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_gram).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_kilogram).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_tonne).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_imperial_ton).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_USton).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_stone).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_pound).equals(obj)) { bigDecimal = bigDecimal10.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_mass_ounce).equals(obj)) { bigDecimal = bigDecimal11.multiply(bigDecimal); } if (getResources().getString(R.string.unit_mass_microgram).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_milligram).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_gram).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_kilogram).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_tonne).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_imperial_ton).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_USton).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_stone).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_pound).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal10, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_mass_ounce).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal11, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_mass_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_power() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_power_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_power_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("0.000001"); BigDecimal bigDecimal3 = new BigDecimal("0.001"); BigDecimal bigDecimal4 = new BigDecimal("1"); BigDecimal bigDecimal5 = new BigDecimal("0.0007457"); BigDecimal bigDecimal6 = new BigDecimal("0.000017584"); BigDecimal bigDecimal7 = new BigDecimal("0.001055056"); BigDecimal bigDecimal8 = new BigDecimal("0.000000023"); BigDecimal bigDecimal9 = new BigDecimal("0.000001356"); if (getResources().getString(R.string.unit_power_watt).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_power_kilowatt).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_power_megawatt).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_power_horsepower).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_power_BTUmin).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_power_BTUs).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_power_lbftmin).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_power_lbfts).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } if (getResources().getString(R.string.unit_power_watt).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_power_kilowatt).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_power_megawatt).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_power_horsepower).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_power_BTUmin).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_power_BTUs).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_power_lbftmin).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_power_lbfts).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_power_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_length() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_length_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_length_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("0.000001"); BigDecimal bigDecimal3 = new BigDecimal("0.001"); BigDecimal bigDecimal4 = new BigDecimal("0.01"); BigDecimal bigDecimal5 = new BigDecimal("1"); BigDecimal bigDecimal6 = new BigDecimal("1000"); BigDecimal bigDecimal7 = new BigDecimal("1609.34"); BigDecimal bigDecimal8 = new BigDecimal("0.9144"); BigDecimal bigDecimal9 = new BigDecimal("0.3048"); BigDecimal bigDecimal10 = new BigDecimal("0.0254"); BigDecimal bigDecimal11 = new BigDecimal("1852"); BigDecimal bigDecimal12 = new BigDecimal("4828.032"); if (getResources().getString(R.string.unit_length_micrometre).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_millimetre).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_centimetre).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_metre).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_kilometre).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_mile).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_yard).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_foot).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_inch).equals(obj)) { bigDecimal = bigDecimal10.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_nautical_mile).equals(obj)) { bigDecimal = bigDecimal11.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_length_league).equals(obj)) { bigDecimal = bigDecimal12.multiply(bigDecimal); } if (getResources().getString(R.string.unit_length_micrometre).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_millimetre).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_centimetre).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_metre).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_kilometre).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_mile).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_yard).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_foot).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_inch).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal10, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_nautical_mile).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal11, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_length_league).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal12, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_length_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_speed() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_speed_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_speed_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); new BigDecimal("0.277778"); BigDecimal bigDecimal3 = new BigDecimal("0.3048"); BigDecimal bigDecimal4 = new BigDecimal("0.44704"); BigDecimal bigDecimal5 = new BigDecimal("0.5144444"); if (getResources().getString(R.string.unit_speed_ms).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_speed_kmh).equals(obj)) { bigDecimal = bigDecimal.divide(new BigDecimal("3.6"), 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_speed_fts).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_speed_mph).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_speed_knots).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } if (getResources().getString(R.string.unit_speed_ms).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_speed_kmh).equals(obj2)) { bigDecimal = bigDecimal.multiply(new BigDecimal("3.6")); } else if (getResources().getString(R.string.unit_speed_fts).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_speed_mph).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_speed_knots).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_speed_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_volume() { BigDecimal bigDecimal; BigDecimal bigDecimal2; String obj = ((Spinner) findViewById(R.id.spinner_volume_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_volume_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal3 = new BigDecimal("0.001"); BigDecimal bigDecimal4 = new BigDecimal("1"); BigDecimal bigDecimal5 = new BigDecimal("1000"); BigDecimal bigDecimal6 = new BigDecimal("0.016387"); BigDecimal bigDecimal7 = new BigDecimal("28.3168"); BigDecimal bigDecimal8 = new BigDecimal("3.78541"); BigDecimal bigDecimal9 = new BigDecimal("0.946353"); BigDecimal bigDecimal10 = new BigDecimal("0.473176"); BigDecimal bigDecimal11 = new BigDecimal("0.24"); BigDecimal bigDecimal12 = new BigDecimal("0.014787"); BigDecimal bigDecimal13 = new BigDecimal("0.004929"); BigDecimal bigDecimal14 = new BigDecimal("4.54609"); BigDecimal bigDecimal15 = new BigDecimal("1.13652"); BigDecimal bigDecimal16 = new BigDecimal("0.568261"); BigDecimal bigDecimal17 = new BigDecimal("0.284131"); BigDecimal bigDecimal18 = new BigDecimal("0.017758"); BigDecimal bigDecimal19 = new BigDecimal("0.005919"); BigDecimal bigDecimal20 = new BigDecimal("0.0295735"); BigDecimal bigDecimal21 = new BigDecimal("0.0284131"); BigDecimal bigDecimal22 = new BigDecimal("0.001"); if (getResources().getString(R.string.unit_volume_ml).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_L).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_m3).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_in3).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_ft3).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_USgallon).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_USquart).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_USpint).equals(obj)) { bigDecimal = bigDecimal10.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_UScup).equals(obj)) { bigDecimal = bigDecimal11.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_UStablespoon).equals(obj)) { bigDecimal = bigDecimal12.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_USteaspoon).equals(obj)) { bigDecimal = bigDecimal13.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_Impgallon).equals(obj)) { bigDecimal = bigDecimal14.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_Impquart).equals(obj)) { bigDecimal = bigDecimal15.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_imp_pint).equals(obj)) { bigDecimal = bigDecimal16.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_imp_cup).equals(obj)) { bigDecimal = bigDecimal17.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_IMPtablespoon).equals(obj)) { bigDecimal = bigDecimal18.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_IMPteaspoon).equals(obj)) { bigDecimal = bigDecimal19.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_USfluid_ounce).equals(obj)) { bigDecimal = bigDecimal20.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_IMPfluid_counce).equals(obj)) { bigDecimal = bigDecimal21.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_volume_cm3).equals(obj)) { bigDecimal2 = bigDecimal22; bigDecimal = bigDecimal2.multiply(bigDecimal); BigDecimal bigDecimal23 = bigDecimal2; if (!getResources().getString(R.string.unit_volume_ml).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_L).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_m3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_in3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_ft3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_USgallon).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_USquart).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_USpint).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal10, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_UScup).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal11, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_UStablespoon).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal12, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_USteaspoon).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal13, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_Impgallon).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal14, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_Impquart).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal15, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_imp_pint).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal16, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_imp_cup).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal17, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_IMPtablespoon).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal18, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_IMPteaspoon).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal19, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_USfluid_ounce).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal20, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_IMPfluid_counce).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal21, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_volume_cm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal23, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_volume_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } bigDecimal2 = bigDecimal22; BigDecimal bigDecimal232 = bigDecimal2; if (!getResources().getString(R.string.unit_volume_ml).equals(obj2)) { } ((TextView) findViewById(R.id.Text_volume_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_area() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_area_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_area_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("1000000"); BigDecimal bigDecimal4 = new BigDecimal("0.00064516"); BigDecimal bigDecimal5 = new BigDecimal("0.092903"); BigDecimal bigDecimal6 = new BigDecimal("0.836127"); BigDecimal bigDecimal7 = new BigDecimal("2590000"); BigDecimal bigDecimal8 = new BigDecimal("4046.86"); BigDecimal bigDecimal9 = new BigDecimal("10000"); if (getResources().getString(R.string.unit_area_m2).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_area_km2).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_area_in2).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_area_ft2).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_area_yd2).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_area_mile2).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_area_acre).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_area_hectare).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } if (getResources().getString(R.string.unit_area_m2).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_area_km2).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_area_in2).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_area_ft2).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_area_yd2).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_area_mile2).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_area_acre).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_area_hectare).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_area_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_energy() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_energy_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_energy_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("0.001"); BigDecimal bigDecimal3 = new BigDecimal("1"); BigDecimal bigDecimal4 = new BigDecimal("0.004184"); BigDecimal bigDecimal5 = new BigDecimal("4.184"); BigDecimal bigDecimal6 = new BigDecimal("3.6"); BigDecimal bigDecimal7 = new BigDecimal("3600"); BigDecimal bigDecimal8 = new BigDecimal("1.05506"); BigDecimal bigDecimal9 = new BigDecimal("0.00135582"); if (getResources().getString(R.string.unit_energy_joule).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_energy_kJ).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_energy_cal).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_energy_kcal).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_energy_watthour).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_energy_kWhour).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_energy_BTU).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_energy_footpound).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } if (getResources().getString(R.string.unit_energy_joule).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_energy_kJ).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_energy_cal).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_energy_kcal).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_energy_watthour).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_energy_kWhour).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_energy_BTU).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_energy_footpound).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_energy_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_fuel() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_fuel_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_fuel_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("100"); BigDecimal bigDecimal4 = new BigDecimal("0.425144"); BigDecimal bigDecimal5 = new BigDecimal("0.354006"); if (getResources().getString(R.string.unit_fuel_kmperL).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_fuel_Lper100km).equals(obj)) { if (bigDecimal.compareTo(BigDecimal.ZERO) == 0) { bigDecimal = BigDecimal.ZERO; } else { bigDecimal = bigDecimal3.divide(bigDecimal, 2, RoundingMode.HALF_UP); } } else if (getResources().getString(R.string.unit_fuel_USmilespergal).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_fuel_IMPmilespergal).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } if (getResources().getString(R.string.unit_fuel_kmperL).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_fuel_Lper100km).equals(obj2)) { if (bigDecimal.compareTo(BigDecimal.ZERO) == 0) { bigDecimal = BigDecimal.ZERO; } else { bigDecimal = bigDecimal3.divide(bigDecimal, 100, RoundingMode.HALF_UP); } } else if (getResources().getString(R.string.unit_fuel_USmilespergal).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_fuel_IMPmilespergal).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_fuel_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_angle() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_angle_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_angle_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("57.296"); BigDecimal bigDecimal4 = new BigDecimal("0.9"); if (getResources().getString(R.string.unit_angle_degrees).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_angle_radian).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_angle_gradian).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } if (getResources().getString(R.string.unit_angle_degrees).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_angle_radian).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_angle_gradian).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_angle_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_pressure() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_pressure_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_pressure_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("1000"); BigDecimal bigDecimal4 = new BigDecimal("101325"); BigDecimal bigDecimal5 = new BigDecimal("100000"); BigDecimal bigDecimal6 = new BigDecimal("133.322"); BigDecimal bigDecimal7 = new BigDecimal("6894.76"); BigDecimal bigDecimal8 = new BigDecimal("98066.5"); BigDecimal bigDecimal9 = new BigDecimal("1000000"); if (getResources().getString(R.string.unit_pressure_Pa).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_pressure_kPA).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_pressure_atm).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_pressure_bar).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_pressure_torr).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_pressure_psi).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_pressure_kgpercm2).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_pressure_MPA).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } if (getResources().getString(R.string.unit_pressure_Pa).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_pressure_kPA).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_pressure_atm).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_pressure_bar).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_pressure_torr).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_pressure_psi).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_pressure_kgpercm2).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_pressure_MPA).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_pressure_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_time() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_time_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_time_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } new BigDecimal("0.000277777777777777778"); new BigDecimal("0.016666666666666666667"); BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("24"); BigDecimal bigDecimal4 = new BigDecimal("168"); BigDecimal bigDecimal5 = new BigDecimal("730.001"); BigDecimal bigDecimal6 = new BigDecimal("8760"); BigDecimal bigDecimal7 = new BigDecimal("87600"); BigDecimal bigDecimal8 = new BigDecimal("876000"); if (getResources().getString(R.string.unit_time_s).equals(obj)) { bigDecimal = bigDecimal.divide(new BigDecimal("3600"), 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_m).equals(obj)) { bigDecimal = bigDecimal.divide(new BigDecimal("60"), 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_hr).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_time_day).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_time_week).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_time_month).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_time_year).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_time_decade).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_time_century).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } if (getResources().getString(R.string.unit_time_s).equals(obj2)) { bigDecimal = bigDecimal.multiply(new BigDecimal("3600")); } else if (getResources().getString(R.string.unit_time_m).equals(obj2)) { bigDecimal = bigDecimal.multiply(new BigDecimal("60")); } else if (getResources().getString(R.string.unit_time_hr).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_day).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_week).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_month).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_year).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_decade).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_time_century).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_time_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_digital() { BigDecimal bigDecimal; BigDecimal bigDecimal2; String obj = ((Spinner) findViewById(R.id.spinner_digital_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_digital_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal3 = new BigDecimal("0.000001"); BigDecimal bigDecimal4 = new BigDecimal("0.001"); BigDecimal bigDecimal5 = new BigDecimal("1"); BigDecimal bigDecimal6 = new BigDecimal("1000"); BigDecimal bigDecimal7 = new BigDecimal("1000000"); BigDecimal bigDecimal8 = new BigDecimal("1000000000"); BigDecimal bigDecimal9 = new BigDecimal("0.000000125"); BigDecimal bigDecimal10 = new BigDecimal("0.000125"); BigDecimal bigDecimal11 = new BigDecimal("0.125"); BigDecimal bigDecimal12 = new BigDecimal("125"); BigDecimal bigDecimal13 = new BigDecimal("125000"); BigDecimal bigDecimal14 = new BigDecimal("125000000"); BigDecimal bigDecimal15 = new BigDecimal("0.000128"); BigDecimal bigDecimal16 = new BigDecimal("0.131072"); BigDecimal bigDecimal17 = new BigDecimal("134.218"); BigDecimal bigDecimal18 = new BigDecimal("137439"); BigDecimal bigDecimal19 = new BigDecimal("140700000"); BigDecimal bigDecimal20 = new BigDecimal("0.001024"); BigDecimal bigDecimal21 = new BigDecimal("1.04858"); BigDecimal bigDecimal22 = new BigDecimal("1073.74"); BigDecimal bigDecimal23 = new BigDecimal("1100000"); BigDecimal bigDecimal24 = new BigDecimal("1126000000"); if (getResources().getString(R.string.unit_digital_byte).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_kilobyte).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Megabyte).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Gigabyte).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Terabyte).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Petabyte).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Bit).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Kilobit).equals(obj)) { bigDecimal = bigDecimal10.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Megabit).equals(obj)) { bigDecimal = bigDecimal11.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Gigabit).equals(obj)) { bigDecimal = bigDecimal12.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Terabit).equals(obj)) { bigDecimal = bigDecimal13.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Petabit).equals(obj)) { bigDecimal = bigDecimal14.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Kibibit).equals(obj)) { bigDecimal = bigDecimal15.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Mebibit).equals(obj)) { bigDecimal = bigDecimal16.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Gibibit).equals(obj)) { bigDecimal = bigDecimal17.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Tebibit).equals(obj)) { bigDecimal = bigDecimal18.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Pebibit).equals(obj)) { bigDecimal = bigDecimal19.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Kibibyte).equals(obj)) { bigDecimal = bigDecimal20.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Mebibyte).equals(obj)) { bigDecimal = bigDecimal21.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Gibibyte).equals(obj)) { bigDecimal = bigDecimal22.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Tebibyte).equals(obj)) { bigDecimal = bigDecimal23.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_digital_Pebibyte).equals(obj)) { bigDecimal2 = bigDecimal24; bigDecimal = bigDecimal2.multiply(bigDecimal); BigDecimal bigDecimal25 = bigDecimal2; if (!getResources().getString(R.string.unit_digital_byte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_kilobyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Megabyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Gigabyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Terabyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Petabyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Bit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Kilobit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal10, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Megabit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal11, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Gigabit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal12, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Terabit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal13, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Petabit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal14, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Kibibit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal15, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Mebibit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal16, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Gibibit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal17, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Tebibit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal18, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Pebibit).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal19, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Kibibyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal20, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Mebibyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal21, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Gibibyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal22, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Tebibyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal23, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_digital_Pebibyte).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal25, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_digital_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } bigDecimal2 = bigDecimal24; BigDecimal bigDecimal252 = bigDecimal2; if (!getResources().getString(R.string.unit_digital_byte).equals(obj2)) { } ((TextView) findViewById(R.id.Text_digital_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_force() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_force_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_force_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("4.448"); BigDecimal bigDecimal4 = new BigDecimal("0.00001"); BigDecimal bigDecimal5 = new BigDecimal("1"); if (getResources().getString(R.string.unit_force_Newton).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_force_Poundforce).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_force_Dyne).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_force_Newtonmeter).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } if (getResources().getString(R.string.unit_force_Newton).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_force_Poundforce).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_force_Dyne).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_force_Newtonmeter).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_force_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_sound() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_sound_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_sound_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("10"); BigDecimal bigDecimal3 = new BigDecimal("1"); BigDecimal bigDecimal4 = new BigDecimal("8.685889638"); if (getResources().getString(R.string.unit_sound_bell).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_sound_dB).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_sound_Np).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } if (getResources().getString(R.string.unit_sound_bell).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_sound_dB).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_sound_Np).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_sound_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_concentration() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_concentration_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_concentration_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1000"); BigDecimal bigDecimal3 = new BigDecimal("1"); BigDecimal bigDecimal4 = new BigDecimal("0.001"); BigDecimal bigDecimal5 = new BigDecimal("0.001"); BigDecimal bigDecimal6 = new BigDecimal("1000"); BigDecimal bigDecimal7 = new BigDecimal("1"); BigDecimal bigDecimal8 = new BigDecimal("1"); BigDecimal bigDecimal9 = new BigDecimal("0.001"); BigDecimal bigDecimal10 = new BigDecimal("1000"); BigDecimal bigDecimal11 = new BigDecimal("1000"); BigDecimal bigDecimal12 = new BigDecimal("1000"); BigDecimal bigDecimal13 = new BigDecimal("1"); if (getResources().getString(R.string.unit_concentration_kmolm3).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_umolcm3).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.jadx_deobf_0x00000509).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.jadx_deobf_0x00000508).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_mmolcm3).equals(obj)) { bigDecimal = bigDecimal6.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_mmoldm3).equals(obj)) { bigDecimal = bigDecimal7.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_mmolL).equals(obj)) { bigDecimal = bigDecimal8.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_mmolm3).equals(obj)) { bigDecimal = bigDecimal9.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_mmolml).equals(obj)) { bigDecimal = bigDecimal10.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_moldm3).equals(obj)) { bigDecimal = bigDecimal11.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_molL).equals(obj)) { bigDecimal = bigDecimal12.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_concentration_molm3).equals(obj)) { bigDecimal = bigDecimal13.multiply(bigDecimal); } if (getResources().getString(R.string.unit_concentration_kmolm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_umolcm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.jadx_deobf_0x00000509).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.jadx_deobf_0x00000508).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_mmolcm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal6, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_mmoldm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal7, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_mmolL).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal8, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_mmolm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal9, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_mmolml).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal10, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_moldm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal11, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_molL).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal12, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_concentration_molm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal13, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_concentration_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_density() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_density_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_density_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("1000"); BigDecimal bigDecimal4 = new BigDecimal("16.02"); BigDecimal bigDecimal5 = new BigDecimal("27680"); if (getResources().getString(R.string.unit_density_kgm3).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_density_gcm3).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_density_lbft3).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_density_lbin3).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } if (getResources().getString(R.string.unit_density_kgm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_density_gcm3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_density_lbft3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_density_lbin3).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_density_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_space() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_space_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_space_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("3.2615638"); BigDecimal bigDecimal4 = new BigDecimal("0.0000158125"); BigDecimal bigDecimal5 = new BigDecimal("0.170107806"); if (getResources().getString(R.string.unit_space_ly).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_space_parsec).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_space_au).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_space_trillionmiles).equals(obj)) { bigDecimal = bigDecimal5.multiply(bigDecimal); } if (getResources().getString(R.string.unit_space_ly).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_space_parsec).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_space_au).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_space_trillionmiles).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal5, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_space_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public void convert_radiation() { BigDecimal bigDecimal; String obj = ((Spinner) findViewById(R.id.spinner_radiation_from)).getSelectedItem().toString(); String obj2 = ((Spinner) findViewById(R.id.spinner_radiation_to)).getSelectedItem().toString(); TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); if (charSequence == null || charSequence.isEmpty()) { bigDecimal = new BigDecimal("0"); } else { bigDecimal = new BigDecimal(textView.getText().toString().replace(this.decimalSeperator, '.')); } BigDecimal bigDecimal2 = new BigDecimal("1"); BigDecimal bigDecimal3 = new BigDecimal("37000000000"); BigDecimal bigDecimal4 = new BigDecimal("1000000"); if (getResources().getString(R.string.unit_radiation_becquerel).equals(obj)) { bigDecimal = bigDecimal2.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_radiation_curie).equals(obj)) { bigDecimal = bigDecimal3.multiply(bigDecimal); } else if (getResources().getString(R.string.unit_radiation_rutherford).equals(obj)) { bigDecimal = bigDecimal4.multiply(bigDecimal); } if (getResources().getString(R.string.unit_radiation_becquerel).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal2, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_radiation_curie).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal3, 100, RoundingMode.HALF_UP); } else if (getResources().getString(R.string.unit_radiation_rutherford).equals(obj2)) { bigDecimal = bigDecimal.divide(bigDecimal4, 100, RoundingMode.HALF_UP); } ((TextView) findViewById(R.id.Text_radiation_to)).setText(convertBigDecimalStringToHumanReadable(bigDecimal.toString())); } public String convertBigDecimalStringToHumanReadable(String str) { System.out.println("VALUE: " + str); if (str.contains("E")) { System.out.println("SCIENTIFIC NOTATION"); int indexOf = str.indexOf("E"); String substring = str.substring(0, indexOf); String substring2 = str.substring(indexOf + 1, str.length()); if (substring.length() > 8) { substring = substring.substring(0, 9); } while (substring != null && substring.length() > 0 && substring.contains(".") && (substring.charAt(substring.length() - 1) == '0' || substring.charAt(substring.length() - 1) == '.')) { substring = substring.substring(0, substring.length() - 1); } str = (substring.length() == 0 || substring.equals("0")) ? "0" : substring + "E" + substring2; } else { System.out.println("NOT SCIENTIFIC NOTATION"); if (str.contains(".")) { System.out.println("HAS DECIMAL"); int indexOf2 = str.indexOf("."); String substring3 = str.substring(0, indexOf2); String substring4 = str.substring(indexOf2 + 1, str.length()); int length = substring3.length(); if (length > 6) { System.out.println("HAS MORE THAN 6 SIGNIFICANT DIGITS, CONVERTING TO SCIENTIFIC"); String str2 = substring3.substring(0, 1) + "." + substring3.substring(1, substring3.length()); while (str2 != null && str2.length() > 0 && str2.charAt(str2.length() - 1) == '0') { str2 = str2.substring(0, str2.length() - 1); } if (str2.length() < 8) { str2 = str2 + substring4; while (str2 != null && str2.length() > 0 && str2.contains(".") && (str2.charAt(str2.length() - 1) == '0' || str2.charAt(str2.length() - 1) == '.')) { str2 = str2.substring(0, str2.length() - 1); } } if (str2.length() > 8) { str2 = str2.substring(0, 8); } str = str2 + "E" + (length - 1); } else { System.out.println("LESS THAN 6 SIGNIFICANT DIGITS, NOT CONVERTING TO SCIENTIFIC"); while (true) { if ((str == null || str.length() <= 0 || !str.contains(".") || str.charAt(str.length() - 1) != '0') && str.charAt(str.length() - 1) != '.') { break; } str = str.substring(0, str.length() - 1); } if (str.length() > 10) { str = str.substring(0, 10); } } } else { System.out.println("NO DECIMAL"); int length2 = str.length(); if (str.length() > 8) { System.out.println("HAS MORE THEN 6 SIGNIFICANT DIGITS, CONVERTING TO SCIENTIFIC"); String str3 = str.substring(0, 1) + "." + str.substring(1, 8); while (true) { if ((str3 == null || str3.length() <= 0 || !str3.contains(".") || str3.charAt(str3.length() - 1) != '0') && str3.charAt(str3.length() - 1) != '.') { break; } str3 = str3.substring(0, str3.length() - 1); } str = str3 + "E" + (length2 - 1); } } } System.out.println("Current Decimal Seperator: " + this.decimalSeperator); return str.replace('.', this.decimalSeperator); } public void decimal_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_temperature(View view) { ((TextView) findViewById(R.id.EditText_temperature_from)).setText("0"); } public void backspace_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1 || (charSequence.length() == 2 && charSequence.contains("-"))) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "1"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-1" : charSequence + "1"; } textView.setText(str); } public void add_two_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "2"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-2" : charSequence + "2"; } textView.setText(str); } public void add_three_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "3"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-3" : charSequence + "3"; } textView.setText(str); } public void add_four_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "4"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-4" : charSequence + "4"; } textView.setText(str); } public void add_five_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "5"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-5" : charSequence + "5"; } textView.setText(str); } public void add_six_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "6"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-6" : charSequence + "6"; } textView.setText(str); } public void add_seven_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "7"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-7" : charSequence + "7"; } textView.setText(str); } public void add_eight_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "8"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-8" : charSequence + "8"; } textView.setText(str); } public void add_nine_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "9"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-9" : charSequence + "9"; } textView.setText(str); } public void add_zero_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String charSequence = textView.getText().toString(); String str = "0"; if (!charSequence.equals("0")) { str = charSequence.equals("-0") ? "-0" : charSequence + "0"; } textView.setText(str); } public void negative_temperature(View view) { TextView textView = (TextView) findViewById(R.id.EditText_temperature_from); String replace = textView.getText().toString().replace(this.decimalSeperator, '.'); Double valueOf = Double.valueOf(Double.valueOf(Double.parseDouble(textView.getText().toString().replace(this.decimalSeperator, '.'))).doubleValue() * (-1.0d)); if (replace.contains(".")) { String d = valueOf.toString(); if (d.length() > 9) { textView.setText(replace.replace('.', this.decimalSeperator)); return; } else { textView.setText(d.replace('.', this.decimalSeperator)); return; } } String substring = valueOf.toString().replace(".", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED).substring(0, r1.length() - 1); if (substring.length() > 9) { textView.setText(replace.replace('.', this.decimalSeperator)); } else { textView.setText(substring.replace('.', this.decimalSeperator)); } } public void switch_temperature(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_temperature_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_temperature_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_mass(View view) { ((TextView) findViewById(R.id.EditText_mass_from)).setText("0"); } public void backspace_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_mass(View view) { TextView textView = (TextView) findViewById(R.id.EditText_mass_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_mass(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_mass_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_mass_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_length(View view) { ((TextView) findViewById(R.id.EditText_length_from)).setText("0"); } public void backspace_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_length(View view) { TextView textView = (TextView) findViewById(R.id.EditText_length_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_length(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_length_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_length_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_angle(View view) { ((TextView) findViewById(R.id.EditText_angle_from)).setText("0"); } public void backspace_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_angle(View view) { TextView textView = (TextView) findViewById(R.id.EditText_angle_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_angle(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_angle_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_angle_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_area(View view) { ((TextView) findViewById(R.id.EditText_area_from)).setText("0"); } public void backspace_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_area(View view) { TextView textView = (TextView) findViewById(R.id.EditText_area_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_area(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_area_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_area_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_concentration(View view) { ((TextView) findViewById(R.id.EditText_concentration_from)).setText("0"); } public void backspace_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_concentration(View view) { TextView textView = (TextView) findViewById(R.id.EditText_concentration_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_concentration(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_concentration_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_concentration_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_density(View view) { ((TextView) findViewById(R.id.EditText_density_from)).setText("0"); } public void backspace_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_density(View view) { TextView textView = (TextView) findViewById(R.id.EditText_density_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_density(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_density_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_density_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_digital(View view) { ((TextView) findViewById(R.id.EditText_digital_from)).setText("0"); } public void backspace_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_digital(View view) { TextView textView = (TextView) findViewById(R.id.EditText_digital_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_digital(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_digital_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_digital_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_energy(View view) { ((TextView) findViewById(R.id.EditText_energy_from)).setText("0"); } public void backspace_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_energy(View view) { TextView textView = (TextView) findViewById(R.id.EditText_energy_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_energy(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_energy_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_energy_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_force(View view) { ((TextView) findViewById(R.id.EditText_force_from)).setText("0"); } public void backspace_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_force(View view) { TextView textView = (TextView) findViewById(R.id.EditText_force_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_force(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_force_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_force_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_fuel(View view) { ((TextView) findViewById(R.id.EditText_fuel_from)).setText("0"); } public void backspace_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_fuel(View view) { TextView textView = (TextView) findViewById(R.id.EditText_fuel_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_fuel(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_fuel_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_fuel_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_power(View view) { ((TextView) findViewById(R.id.EditText_power_from)).setText("0"); } public void backspace_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_power(View view) { TextView textView = (TextView) findViewById(R.id.EditText_power_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_power(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_power_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_power_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_pressure(View view) { ((TextView) findViewById(R.id.EditText_pressure_from)).setText("0"); } public void backspace_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_pressure(View view) { TextView textView = (TextView) findViewById(R.id.EditText_pressure_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_pressure(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_pressure_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_pressure_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_sound(View view) { ((TextView) findViewById(R.id.EditText_sound_from)).setText("0"); } public void backspace_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_sound(View view) { TextView textView = (TextView) findViewById(R.id.EditText_sound_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_sound(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_sound_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_sound_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_space(View view) { ((TextView) findViewById(R.id.EditText_space_from)).setText("0"); } public void backspace_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_space(View view) { TextView textView = (TextView) findViewById(R.id.EditText_space_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_space(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_space_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_space_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_speed(View view) { ((TextView) findViewById(R.id.EditText_speed_from)).setText("0"); } public void backspace_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_speed(View view) { TextView textView = (TextView) findViewById(R.id.EditText_speed_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_speed(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_speed_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_speed_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_time(View view) { ((TextView) findViewById(R.id.EditText_time_from)).setText("0"); } public void backspace_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_time(View view) { TextView textView = (TextView) findViewById(R.id.EditText_time_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_time(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_time_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_time_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_volume(View view) { ((TextView) findViewById(R.id.EditText_volume_from)).setText("0"); } public void backspace_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_volume(View view) { TextView textView = (TextView) findViewById(R.id.EditText_volume_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_volume(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_volume_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_volume_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } public void decimal_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); if (!charSequence.contains(Character.toString(this.decimalSeperator))) { charSequence = charSequence + Character.toString(this.decimalSeperator); } textView.setText(charSequence); } public void clear_radiation(View view) { ((TextView) findViewById(R.id.EditText_radiation_from)).setText("0"); } public void backspace_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); if (charSequence.length() == 1) { charSequence = "0"; } else if (charSequence != null) { charSequence = charSequence.substring(0, charSequence.length() - 1); } textView.setText(charSequence); } public void add_one_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "1" : charSequence + "1"); } public void add_two_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "2" : charSequence + "2"); } public void add_three_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "3" : charSequence + "3"); } public void add_four_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "4" : charSequence + "4"); } public void add_five_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "5" : charSequence + "5"); } public void add_six_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "6" : charSequence + "6"); } public void add_seven_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "7" : charSequence + "7"); } public void add_eight_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "8" : charSequence + "8"); } public void add_nine_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "9" : charSequence + "9"); } public void add_zero_radiation(View view) { TextView textView = (TextView) findViewById(R.id.EditText_radiation_from); String charSequence = textView.getText().toString(); textView.setText(charSequence.equals("0") ? "0" : charSequence + "0"); } public void switch_radiation(View view) { Integer.valueOf(0); Integer.valueOf(0); Spinner spinner = (Spinner) findViewById(R.id.spinner_radiation_from); Integer valueOf = Integer.valueOf(spinner.getSelectedItemPosition()); Spinner spinner2 = (Spinner) findViewById(R.id.spinner_radiation_to); spinner.setSelection(Integer.valueOf(spinner2.getSelectedItemPosition()).intValue()); spinner2.setSelection(valueOf.intValue()); } }