Skip to content

Instantly share code, notes, and snippets.

/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@weikipeng
weikipeng / MainActivity.java
Last active September 21, 2015 06:37 — forked from quangdh/MainActivity.java
Capture the 'virtual keyboard show/hide' event in Android
public class MainActivity extends Activity
implements ResizeRelativeLayout.OnResizeLayout{
//...
private ResizeRelativeLayout layout;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContainView(R.layout.activity_main);
//...
@weikipeng
weikipeng / RestApi.md
Last active September 6, 2015 05:14 — forked from tomkoptel/RestApi.md
Retrofit 2.0 converter for plain/text requests
  interface RestApi {
      @Multipart
      @Headers({"Accept:text/plain"})
      @POST(value = "/j_spring_security_check")
      Call<com.squareup.okhttp.Response> authenticate(
        @Part(value = "username") String username,
        @Part(value = "password") String password
        @PartMap Map<String, String> params);
 }