Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
l 任意のタイプのレイアウトを含むことができるオブジェクトがあります。レイアウトタイプを検出するにはどうすればよいですか? 私はtry/catchだけでアイデアを持っています。
少し不格好ですが、このような if ステートメントを持つことができます
if(this.getCurrentFocus().getId() == R.layout.myLayout) { String layoutType = "Linear"; }
または、結果に対して必要なことは何でもします