Skip to content

Instantly share code, notes, and snippets.

package com.mayday.md.fragment;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.support.v4.app.Fragment;
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
android:background="#000000">
<ScrollView
package com.mayday.md.common;
import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.widget.Button;
import android.widget.EditText;
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/rounded_rect_left_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/rounded_rect_left" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:color="@color/stroke_color" android:width="@dimen/stroke_width"/>
<corners android:radius="@dimen/corner_radius"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/stroke_color"/>
<size android:width="@dimen/stroke_width"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape android:shape="rectangle">
<solid android:color="@color/fill_color_when_pressed" />
<corners android:topLeftRadius="@dimen/corner_radius" android:bottomLeftRadius="@dimen/corner_radius"/>
</shape>
</item>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape android:shape="rectangle">
<solid android:color="@color/fill_color_when_pressed" />
</shape>
</item>
<item android:state_checked="true" >
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape android:shape="rectangle">
<solid android:color="@color/fill_color_when_pressed" />
<corners android:topRightRadius="@dimen/corner_radius" android:bottomRightRadius="@dimen/corner_radius"/>
</shape>
</item>
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/fill_color_when_pressed">
<item>
<selector>
<item android:state_checked="true" >
<shape android:shape="rectangle">
<solid android:color="@color/fill_color_when_active" />
<corners android:topLeftRadius="@dimen/corner_radius" android:bottomLeftRadius="@dimen/corner_radius"/>
</shape>
</item>