Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update activity_main.xml #1188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update activity_main.xml #1188

wants to merge 1 commit into from

Conversation

wxm2004
Copy link

@wxm2004 wxm2004 commented Oct 25, 2024

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

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

  • ./gradlew assembleDebug assembleRelease
  • ./gradlew checkstyle

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codeclimate bot commented Oct 25, 2024

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

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant