This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) { | |
Text( | |
text = stringResource(id = R.string.contactUs), | |
textAlign = TextAlign.Justify, | |
modifier = Modifier | |
.fillMaxWidth() | |
) | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SensorActivity extends Activity implements SensorEventListener { | |
private final SensorManager mSensorManager; | |
private final Sensor mTempSensor; | |
private float lastTemperature= 0F | |
public SensorActivity() { | |
mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); | |
mTempSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_AMBIENT_TEMPERATURE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.NumberFormat | |
import java.util.* | |
enum class PaymentMethod(val balance: Double) { | |
CASH(14.02) { | |
override fun printFormattedAmount(): String { | |
return NumberFormat.getCurrencyInstance(Locale.US).format(balance) | |
} | |
}, |