Android Chat background image deformation, usually due to the keyboard (this is their own flirting with the Candy app in the problem, the time to solve today). You can refer to the address addressed by StackOverflow: http://stackoverflow.com/questions/5307264/ How-to-prevent-soft-keyboard-from-resizing-background-image
Here's how I use it:
The workaround is simple:
1. Activity configuration in Androidmanifest.xml file: android:windowsoftinputmode= "Adjustresize|statealwayshidden"
eg
<activity android:name= ". Mainactivity "android:label=" @string/app_name "android:windowsoftinputmode=" Adjustresize|statealwayshidden "/>
2, do not put the background image in the XML layout file, but with code implementation, in the OnCreate method add: GetWindow (). Setbackgrounddrawableresource (R.DRAWABLE.AA);
eg
Setcontentview (R.layout.activity_main);
GetWindow (). Setbackgrounddrawableresource (r.drawable.bg);
3, add android:transcriptmode= in the ListView "normal" or set to Android:transcriptmode= "Alwaysscroll" (this does not seem to modify the changes do not affect)
eg
<listview
Android:id= "@+id/lv"
Android:layout_width= "Match_parent"
android:layout_height= "0DP"
android:layout_weight= "1"
Android:divider= "@null"
Android:listselector= "@android: Color/transparent"
Android:transcriptmode= "Alwaysscroll"
/>
4, listening EditText Click event, set as follows:
EditText = (editText) Findviewbyid (R.id.edittext);
Edittext.postdelayed (New Runnable () {
public void Run () {
listview.setselection (Lists.size ()-1);
}
}, 100);
Android Chat background Image morphing solution