Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 1.7 KB

README.md

File metadata and controls

70 lines (44 loc) · 1.7 KB

FlashLightApp

FlashLight App for Android updated with Material Deisgn

flashlightapp

google-play-badge copy-v2

Dependencies


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'

Permissions

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" />

Styling

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>

Dimensions

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>

Colors

Added colors app/res/values/colors.xml

<color name="offLightColor">#212121</color>
<color name="onLightColor">#FAFAFA</color>