?
One, im the chat interface relationship nesting
The Attachcontroller class defines the following container
Sessbottomcontrller defines some emoticons, and so on.
?
The Fragchatviewcontroller interface is in this body + bottom
?
Fragchat fragment need to call the view above
?
Real activity, call the fragment above
?
?
Enter text, cover container, we must let container disappear.
?
Second, about the soft keyboard and EditView
Reference: http://blog.sina.com.cn/s/blog_671d2e4f0101f8fd.html#userconsent#Android_editview related to soft keyboard
To solve the problem:
?? When I press back
Become this
But that's what I want?
?
There should be no middle tier
?
?
Problem exploration:
Can I catch the listening events of my keyboard?
But event snooping is a priority. Look at the event distribution mechanism
Instead of pressing back for the first time, the keyboard shrinks down and the second layer Back?view. The third time back? The incident was just executed?
How do I find the first back key when the method is executed???
?
Reference: http://blog.csdn.net/lmj623565791/article/details/38960443 Event Distribution
Imitated items: http://www.apkbus.com/forum.php?mod=viewthread&tid=242633&highlight=%E5%BE%AE%E4%BF%A1
?
Third, soft keyboard related issues
?
Problem Analysis:
?
1, more than a few times add expression, system problems
?
2, the system dead frequency is too high
?
3, control container display and hide, not in the actchat.
?
4, the life cycle: When the third time onbackpause \ OnPause to execute
?
5, the soft keyboard is not monitored
?
Conclusion: It is not a problem of soft keyboard, it is a logic problem.
?
?
Iv. Other Introductions
?
The Actionbardrawertoggle tool class is mainly used to combine the functions of drawerlayout and Actionbar.
?
?
?
V. Methods of interaction between Eventbus components
Reference article: http://blog.csdn.net/bboyfeiyu/article/details/43450553? Android Event Bus (androideventbus) Open Source Library published
The main purpose is to invoke the event (multiple functions) that we have registered (in another object) in another component.
Then, in the current object, we publish the event (which can have a label), and then in another object, the event is automatically executed with the label and the default.
(Note: When a project is reopened, the simulator cannot be found, we just need to close the current emulator and then reopen an emulator.) )
Demo:
Effect:
When we press the button to jump from mainactivity to youractivity, the log comes out:
?
Note: It is important to ensure that the code for the published events is executed, and that you do not see what is done.
?
Among the mainactivity:
In youractivity:
?
?
VI. Integrated Ring-letter JDK:
When we pretend to have some resources, direct calls can be directly @drawale/xxxx
This picture resource is typically placed in
However, if one of our controls has multiple states and requires multiple resources (perhaps pictures, graphics), then the first method of direct loading fails, and we need to customize some of the resource files.
The file might look like this:
Soft keyboard issues