UI: disabled the positive button for null validation and made default hotspot name as device name
Closes #347 #136
What has been done to verify that this works as intended?
- Checked whether the positive button is disabling when the length of the text is null
- Checked any new warnings are producing or failing any tests, working perfectly as expected
- Checked by changing the orientation
- Checked the default name for the hotspot is device name or not
Why is this the best possible solution? Were any other approaches considered?
I implemented the editTextWatcher to check for every text change
In the method of onEditTextChanged checked if the length of the editText is zero then I am disabling the positive button of the alert dialog, and I wrote the tests according to that
I made the one more change that I changed the CheckBoxPreference to SwitchPreference as according to material design switches are used to toggle the state of a single setting on or off and checkboxes are used for select one or more items from a set like selecting the forms
For default name of hotspot as @shobhitagarwal1612 suggested I made that as skunkworks-crow deviceName in my case it is skunkworks-crow SM-J810G
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
By adding this feature user can directly know that he did not have to give the null value in edit text or else he has to select the preference once again then he has to edit and save
By making default hotspot name as the device name so it will be like unique
GIF

Before submitting this PR, please make sure you have:
- [x] run
./gradlew checkCodeand confirmed all checks still pass OR confirm CircleCI build passes - [x] verified that any code or assets from external sources are properly credited in comments and/or in the about file.