手機調用系統的拍照和裁剪功能,假設界面有輸入框EditText,在一些手機會出現點擊EditText會彈出輸入法,卻不能輸入的情況。...

1、
拍照裁剪后 點擊EditText會彈出輸入法,卻不能輸入。可是點擊點一EdtiText就能夠輸入了,所以我就寫了一個看不見的EdtiText,切換焦點,這樣就攻克了這個奇怪的這問題,應該是android內部的問題。

這是網絡一個牛人留下的總結,可是一直沒有搞明確,怎么的隱藏。

?

在一般手機可能沒有問題,可是HTC小手機就是給發送焦點也不能使用,就是不能輸入字.

?

??? <!-- 改動在HTC A510e手機拍照后裁剪圖片后 出現輸入不了字的bug,和功能沒有關系 -->

?<!-- 這是隱藏的EditText-->
??? <EditText
??????? android:id="@+id/frist_et"
??????? android:layout_width="fill_parent"
??????? android:layout_height="10dip"
??????? android:layout_marginLeft="5dip"
??????? android:layout_marginTop="-10dip"
??????? android:background="@null"
??????? android:hint="@string/register_nick_introduction"
??????? android:singleLine="true" />

?

<!-- 這是頭像,點擊此ImageView調用底層的拍照和裁剪功能。-->

??????? <ImageView
??????????? android:id="@+id/personal_info_photo"
??????????? android:layout_width="96dip"
??????????? android:layout_height="96dip"
??????????? android:layout_centerHorizontal="true"
??????????? android:background="@drawable/img_avatar_default" />

?

這是功能須要的EditText.

??? <EditText
??????? android:id="@+id/nicknameEditText"
??????? android:layout_width="fill_parent"
??????? android:layout_height="wrap_content"
??????? android:layout_marginLeft="5dip"
??????? android:background="@null"
??????? android:hint="@string/register_nick_introduction"
??????? android:singleLine="true" />

?

通過EditText相互交換焦點的方式來解決不能輸入字的問題.

?? fristEt.clearFocus();
???nickNameEditText.requestFocus();

?

???????????? fristEt.clearFocus();
???????????? nickNameEditText.requestFocus();

?

假設大家在項目碰到到此問題,大家能夠交流一下,有更好的解決方法,謝謝!

?

轉載于:https://www.cnblogs.com/mengfanrong/p/3764477.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/376943.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/376943.shtml
英文地址,請注明出處:http://en.pswp.cn/news/376943.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Redis一個命令請求從發送到完成的步驟以及初始化服務器步驟

一個命令請求從發送到完成的步驟 如下&#xff1a; 1、客戶端將命令請求發送給服務器 當用戶在客戶端中鍵入一個命令請求時&#xff0c;客戶端會將這個命令請求轉換成協議格式&#xff0c;然后通過連接到服務器的套接字&#xff0c;將協議格式的命令請求發送給服務器。 2、服…

c打印行號和函數_使用C中的函數名稱,行號從任何函數打印錯誤消息

c打印行號和函數Sometimes, it is necessary to print some message on logic failure or anytime with the function name and line number, so that program can be debugged and fixed the issue. 有時&#xff0c;有必要在邏輯故障時或在任何時候使用功能名稱和行??號打印…

Linux SPI框架

水平有限&#xff0c;描述不當之處還請指出&#xff0c;轉載請注明出處http://blog.csdn.net/vanbreaker/article/details/7733476 Linux的SPI子系統采用主機驅動和外設驅動分離的思想&#xff0c;首先主機SPI控制器是一種平臺設備&#xff0c;因此它以platform的方式注冊進內…

dbms標識符無效_DBMS中的嵌套查詢,相關的嵌套查詢和集合比較運算符

dbms標識符無效嵌套查詢 (Nested Queries) A query embedded in a query. This type of relation is termed as Nested Query and the Embedded Query is termed as a subquery. 查詢中嵌入的查詢。 這種類型的關系稱為嵌套查詢&#xff0c;而嵌入式查詢稱為子查詢。 For exam…

重構——解決過長參數列表(long parameter list)

目錄1、Replace Param with Query2、Preserve Whole Object3、Introduce Param Object4、Remove Flag Argument5、Combine Functions into ClassReference當我們需要在超長函數中提煉子函數時&#xff0c;如果函數內有大量的參數和臨時變量&#xff0c;這將會對函數的提煉形成很…

C# 點點滴滴: out和ref

用c#很長一段時間了&#xff0c;不過基本是啥都不會&#xff0c;當C用的&#xff0c;作為寫單片機的&#xff0c;還是真心覺得C比較親切&#xff0c;呵呵。 不過總是要進步啊&#xff0c;慢慢積累唄&#xff0c;這次是寫一個CAN的上位機模板出來&#xff0c;以后的項目就要徹底…

css控制圖片最寬 最高值

.content img{width:expression_r(this.width > 500 && this.height < this.width ? 500:true);max-width:500px;height:expression_r(this.height >500 ? 500:true);max-height:500px; }轉載于:https://www.cnblogs.com/panlin/archive/2013/01/06/2848017…

踩踩踩

http://china.findlaw.cn/laodongfa/ctjg/cy/cybc/ 二、合法裁員經濟補償標準的計算 按照《勞動合同法》第四十七條規定&#xff0c;經濟補償按勞動者在本單位工作的年限&#xff0c;每滿一年支付一個月工資的標準向勞動者支付。六個月以上不滿一年的&#xff0c;按一年計算;不…

c# 字節十六進制轉十進制_用C中的十進制,八進制和十六進制數字初始化字節數組...

c# 字節十六進制轉十進制C中的字節數組 (byte array in C) In C programming language, an unsigned char type can be used to declare byte array in C programming language. An unsigned char can contain a value from 0 to 255, which is the value of a byte. 在C編程語…

從uptime、stress、mpstat、pidstat觀察CPU密集型、IO密集型、進程密集型切換的系統性能

uptime dyydyy-Lenovo-ThinkBook-14-IIL:~$ uptime10:27:10 up 7 min, 1 user, load average: 1.32, 0.99, 0.49結果分別對應&#xff1a;當前時間、系統運行時間、當前用戶數目、過去 1 分鐘、5 分鐘、15 分鐘的平均負載(Load Average) 平均負載是指單位時間內&#xff0c…

解析和創建xml

http://www.cnblogs.com/Li-Cheng/p/3610474.html 轉載于:https://www.cnblogs.com/mxw272618/p/3769900.html

python - VirtualEnv virtualenvwrapper

VirtualEnv 是什么 VirtualEnv用于在一臺機器上創建多個獨立的python運行環境&#xff0c;VirtualEnvWrapper為前者提供了一些便利的命令行上的封裝。 為什么要用 - 隔離項目之間的第三方包依賴&#xff0c;如A項目依賴django1.2.5&#xff0c;B項目依賴django1.3。- 為部署應用…

多臺計算機共享內存_共享內存多處理器和指令執行| 計算機架構

多臺計算機共享內存共享內存多處理器 (Shared Memory Multiprocessor) There are three types of shared memory multiprocessor: 共有三種類型的共享內存多處理器&#xff1a; UMA (Uniform Memory Access) UMA(統一內存訪問) NUMA (Non- uniform Memory Access) NUMA(非統一…

htop與atop

htop htop使用詳解–史上最強 atop Linux atop監控工具部署

js未看的文章

Web前端研發工程師編程能力飛升之路 在瀏覽器的背后&#xff08;一&#xff09; —— HTML語言的詞法解析 組件化的前端開發流程 用js書寫UI組件之js基礎知識 GC與JS內存泄漏 藍色理想之前端開發 w3c JavaScript Puzzlers react AngularJS入門教程 jQuery源碼分析-如何做jQuery…

方法重寫,隱藏在子類父類中的各種調用實踐

一.子類和父類方法之間的關系 1.當子類和父類有方法完全相同的方法 namespace ConsoleApplication2 {class Program{static void Main(string[] args){B b new B();A a new A();A c new B();b.Show();a.Show();c.Show();Console.Read();}}public class A{public void Show()…

向量余弦值python_向量/矩陣的余弦值打印(元素明智的操作) 使用Python的線性代數

向量余弦值pythonPrerequisite: 先決條件&#xff1a; Defining a Vector 定義向量 Defining a Matrix 定義矩陣 Numpy is the library of function that helps to construct or manipulate matrices and vectors. The function numpy.cos(x) is a function used for generati…

centos 6.5網卡dhcp不能獲得網關

環境:vmware centos6.5 添加兩個虛擬網卡。一個自動獲取ip(用于上網-橋接) 一個手動(與主機通信用于ssh-NAT)。 因為自已手動改了一下ifcfg-eth0里面的HWADDR地址。造成 eth0網卡不能識別。多出一個eth2的網卡。 配置eth2網卡&#xff0c;可以自動獲取到ip地址 但用netstat -r…

CPU上下文切換(系統調用、進程上下文、線程上下文、中斷上下文)

CPU寄存器&#xff0c;與程序計數器&#xff08;存儲CPU正在執行的指令位置&#xff0c;或者即將執行的下一條指令的位置&#xff09;共同組成CPU上下文。 CPU上下文切換指的是&#xff1a;把前一個任務的CPU上下文保存起來&#xff0c;然后加載新任務的上下文到這些寄存器和程…

(解決)從同事那里取來的工程不能編譯運行,出現以下錯誤,求幫助

錯誤 6 未能從程序集 C:\Program Files (x86)\MSBuild\Microsoft\Silverlight for Phone\v4.0\Microsoft.Phone.Build.Tasks.dll 加載任務“Microsoft.Phone.Build.Tasks.ValidateWMAppManifest”。 Could not load file or assembly Microsoft.Build.Utilities, Version2.0.0…