Swati4star / Images-to-PDF

An app to convert images to PDF file!
GNU General Public License v3.0
1.22k stars 812 forks source link

Update activity_main.xml #1188

Open wxm2004 opened 4 weeks ago

wxm2004 commented 4 weeks ago

Description

Firstly, I searched for the relevant code for the delete button and identified the code files to be modified, including the layout files (res/layout/activity_main.xml and activity_preview.xml) and the corresponding Activity files for each interface (java/swati4star/creatpdf/activity). Then, find the delete button in the layout file: in activity_main.xml and activity_preview.xml, find the code that defines the delete button and add a unique ID to the button. Next, I modified the click event of the delete button in the Activity files of each interface, found the original code for setting the click event of the delete button, and added a check condition before clicking the delete button to confirm whether a PDF has been created. If no PDF exists, disable the button or pop up a prompt. Next, I will implement checkIfPdfCreatid(), which checks if any PDFs have been created (database query operation). The last iteration was to improve the corresponding UI by calling deleteButton. setEnabled (true or false) when creating and deleting PDFs, ensuring that the UI refreshes when the state changes. If the state of the delete button depends on the creation state of the PDF, then after creating or deleting the PDF, ensure that the button state can be dynamically updated. Fixes #(issue)

Type of change

Just put an x in the [] which are valid.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

codeclimate[bot] commented 4 weeks ago

Code Climate has analyzed commit 73af28dd and detected 0 issues on this pull request.

View more on Code Climate.