This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="ApplicationName">MoneyBack</string> | |
<string name="titleMenu">Menu:</string> | |
<string name="btnPeople">Zarządzaj osobami</string> | |
<string name="titleName">Imię</string> | |
<string name="titleLastName">Nazwisko</string> | |
<string name="titlePhoneNumber">Numer telefonu</string> | |
<string name="btnSavePerson">Zapisz osobę</string> | |
<string name="btnPeopleList">Lista osób</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TextView | |
android:text="@string/titleMenu" | |
android:id="@+id/titleMenu" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plurals name="numberOfPeople"> | |
<item quantity="one">There is %d person in your database.</item> | |
<item quantity="other">There are %d people in your database..</item> | |
</plurals> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:minWidth="25px" | |
android:minHeight="25px"> | |
<FrameLayout | |
android:minWidth="25px" | |
android:minHeight="25px" | |
android:layout_width="match_parent" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PeopleListFragment : ListFragment | |
{ | |
private List<Person> _peopleList; | |
public override void OnActivityCreated(Bundle savedInstanceState) | |
{ | |
base.OnActivityCreated(savedInstanceState); | |
InitializePeopleList(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AddTab(string tabText, Fragment view) | |
{ | |
var tab = this.ActionBar.NewTab(); | |
tab.SetText(tabText); | |
tab.TabSelected += delegate (object sender, ActionBar.TabEventArgs e) | |
{ | |
var fragment = this.FragmentManager.FindFragmentById(Resource.Id.tabFragmentsContainer); | |
if (fragment != null) | |
e.FragmentTransaction.Remove(fragment); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override bool OnOptionsItemSelected(IMenuItem item) | |
{ | |
if (item.ItemId == Resource.Id.menuAdd) | |
{ | |
OpenAddingNewPerson(); | |
return true; | |
} | |
return base.OnOptionsItemSelected(item); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Person class modelling People table | |
[Table("People")] | |
public class Person | |
{ | |
[PrimaryKey, AutoIncrement] | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public string LastName { get; set; } |