FlashLight App for Android updated with Material Deisgn
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
Add the permissions in your app/manifests/AndroidManifest.xml file
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.flash" />
app/res/values/styles.xml
<!--Custom Theme with no ActionBar-->
<style name="AppThemefull" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimaryDark">@color/offLightColor</item>
<item name = "android:windowActionBar">false</item>
<item name = "android:windowNoTitle">true</item>
</style>
Added dimensions app/res/values/dimens.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="buttonHeight">120dp</dimen>
<dimen name="buttonWidth">120dp</dimen>
</resources>
Added colors app/res/values/colors.xml
<color name="offLightColor">#212121</color>
<color name="onLightColor">#FAFAFA</color>