Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
View CheckVoterServiceOneNine.java
/* Synchronous in Retrofit 1.9 */
public interface CheckVoterService {
@GET("api")
Voter searchVoter(
@Query("voter_name") String voterName,
@QueryMap Map<String, String> optionalQueries
);
}
/* Asynchronous in Retrofit 1.9 */
View CheckVoterService.java
public interface CheckVoterService {
@GET("api")
Call<Voter> searchVoter(
@Query("voter_name") String voterName,
@QueryMap Map<String, String> optionalQueries
);
}
View Voter.java
public class Voter {
@SerializedName("dateofbirth") private String dateOfBirth;
private String village;
@SerializedName("father_name") private String fatherName;
private String nrcno;
private String state;
@SerializedName("voter_name") private String voterName;
@SerializedName("dateofbirth_num") private String dateofbirthNum;
@SerializedName("mother_name") private String motherName;
private String township;
View flood.json
[
{
"Name": "ရန္ကုန္အေၿခစုိက္ ပရဟိတ လူငယ္ကြန္ရက္",
"Facebook URL": "https://www.facebook.com/YDYVN",
"Description": "ေကာလင္းေရေဘးအတြက္ အလႉေငြ သိန္း ၁၂၀ ဖိုးအား အလႉ႐ွင္မ်ား ကိုယ္စား ကြန္ရက္မွ ၃၀.၀၇.၂၀၁၅ မွာ သြားေရာက္လႉဒါန္းပါမည္.......",
"Contact Phones": "အိပြင့္ရီွဇံ 09254077923 / ေက်ာ္ၾကား 09254210978 / ျမတ္ၿဖိဳး 09401539798 / တင္ေမာင္ျမင့္ 09972864643",
"Donation Location": ""
},
{
"Name": "Center for Youth & Social Harmony (လူငယ္ႏွင့္္ လူမွုသဟဇာတၿဖစ္ေၿမာက္ေရးစင္တာ)",
View opcode.cc
enum OpCode {
OP_TALK,
OP_END
};
@yelinaung
yelinaung / MainActivity.java
Created Jun 18, 2015
MMAUG Simple Databinding - After binding MainActivity.java
View MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
User user = new User("MeowYLA", "16", "Yangon, Myanmar");
binding.setUser(user);
}
}
@yelinaung
yelinaung / mmaug_simple_databinding_after_binding_layout.xml
Created Jun 18, 2015
MMAUG Simple Databinding - After binding activity_main.xml Layout
View mmaug_simple_databinding_after_binding_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="user"
type="org.mmaug.simpledatabinding.User"/>
</data>
@yelinaung
yelinaung / User.java
Created Jun 18, 2015
MMAUG Simple Databinding - User Object class
View User.java
public class User {
public String name;
public String age;
public String address;
public User(String name, String age, String address) {
this.name = name;
this.age = age;
this.address = address;
}
@yelinaung
yelinaung / MainActivity.java
Created Jun 18, 2015
MMAUG Simple Databinding - Normal MainActivity.java
View MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView userName = (TextView) findViewById(R.id.userName);
TextView userAge = (TextView) findViewById(R.id.userAge);
TextView userAddress = (TextView) findViewById(R.id.userAddress);
@yelinaung
yelinaung / mmaug_simple_databinding_normal_layout.xml
Last active Aug 29, 2015
MMAUG Simple Databinding - Normal activity_main.xml Layout
View mmaug_simple_databinding_normal_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:padding="@dimen/activity_horizontal_margin"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView