这是来自同一question in Spanish的翻译,由于我认为您可以提供比我们的小社区更多的信息,因此我将其发布在这里。
我从出生起就一直是盲人,我正在大学里学习系统工程的职业。
我想知道如何在Android Studio中对应用程序的图形界面进行编程。我搜索了教程,发现其中一些教程,例如,添加一个按钮,将其拖到您想要的位置,然后它会自动添加到其中。
在我看来,这是不可能的,因为我的屏幕阅读器没有资格进行此类工作。因此,我的问题是如何在看不见的情况下对android图形界面进行编程?
答案 0 :(得分:1)
您可以使用XML对布局进行编码。 用XML编写使您可以完全控制如何编码布局。 我也有视觉障碍,而且多年来我都在用XML编码布局。 在tutorialpoint上有一个很好的教程可以帮助您。另外,我将从我的应用程序粘贴布局的xml代码示例之一,以供您参考。您可以在链接下面找到代码: 教程: https://www.tutorialspoint.com/android/android_user_interface_layouts
XML布局示例:
Traceback (most recent call last):
File "/home/pata/venvs/lib/python3.6/site-packages/mongoengine/document.py", line 389, in save
object_id = self._save_create(doc, force_insert, write_concern)
File "/home/pata/venvs/lib/python3.6/site-packages/mongoengine/document.py", line 452, in _save_create
object_id = wc_collection.insert_one(doc).inserted_id
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/collection.py", line 693, in insert_one
session=session),
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/collection.py", line 607, in _insert
bypass_doc_val, session)
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/collection.py", line 595, in _insert_one
acknowledged, _insert_command, session)
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/mongo_client.py", line 1248, in _retryable_write
return self._retry_with_session(retryable, func, s, None)
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/mongo_client.py", line 1201, in _retry_with_session
return func(session, sock_info, retryable)
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/collection.py", line 592, in _insert_command
_check_write_command_response(result)
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/helpers.py", line 217, in _check_write_command_response
_raise_last_write_error(write_errors)
File "/home/pata/venvs/lib/python3.6/site-packages/pymongo/helpers.py", line 198, in _raise_last_write_error
raise DuplicateKeyError(error.get("errmsg"), 11000, error)
pymongo.errors.DuplicateKeyError: E11000 duplicate key error collection: test_db.search_word index: word_1 dup key: { : "word" }
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pata/venvs/lib/python3.6/site-packages/flask_admin/contrib/mongoengine/view.py", line 566, in create_model
model.save()
File "/home/pata/venvs/lib/python3.6/site-packages/mongoengine/document.py", line 412, in save
raise NotUniqueError(message % six.text_type(err))
mongoengine.errors.NotUniqueError: Tried to save duplicate unique keys (E11000 duplicate key error collection: test_db.search_word index: word_1 dup key: { : "word" })