use of android.support.v4.app.FragmentManager in project glitch-hq-android by tinyspeck.
the class AchievementCategoriesFragment method init.
private void init(View root) {
boolean bUpdateData = (m_categoriesList == null);
if (m_fromEncyclopedia) {
Button m_btnBack = (Button) m_root.findViewById(R.id.btnBack);
m_btnBack.setText("Encyclopedia");
m_btnBack.setSingleLine();
m_btnBack.setEllipsize(TruncateAt.END);
m_btnBack.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
FragmentManager fm = getFragmentManager();
fm.popBackStack();
}
});
m_btnBack.setVisibility(View.VISIBLE);
Button m_btnSidebar = (Button) m_root.findViewById(R.id.btnSidebar);
m_btnSidebar.setVisibility(View.GONE);
}
if (bUpdateData) {
m_categoriesList = new Vector<glitchAchievementCategory>();
}
TextView title = (TextView) root.findViewById(R.id.categories_title);
title.setTypeface(m_application.m_vagFont);
m_adapter = new AchievementCategoriesListViewAdapter(this, m_categoriesList);
m_listView = (LinearListView) root.findViewById(R.id.categories_list);
m_listView.setAdapter(m_adapter);
if (bUpdateData) {
getCategories();
} else {
showCategoriesPage();
}
}
use of android.support.v4.app.FragmentManager in project glitch-hq-android by tinyspeck.
the class EncyclopediaItemsInCategoryFragment method init.
private void init(View root) {
boolean bUpdateData = m_itemList == null;
m_btnBack = (Button) m_root.findViewById(R.id.btnBack);
m_btnBack.setText("Items");
m_btnBack.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
FragmentManager fm = getFragmentManager();
fm.popBackStack();
}
});
m_btnBack.setVisibility(View.VISIBLE);
m_btnSidebar = (Button) m_root.findViewById(R.id.btnSidebar);
m_btnSidebar.setVisibility(View.GONE);
if (bUpdateData) {
m_itemList = new Vector<glitchItem>();
}
m_adapter = new EncyclopediaItemsInCategoryListViewAdapter(this, m_itemList);
m_listView = (LinearListView) root.findViewById(R.id.encyclopedia_items_in_category_list);
m_listView.setAdapter(m_adapter);
TextView tv = (TextView) m_root.findViewById(R.id.encyclopedia_items_in_category_title);
tv.setTypeface(m_application.m_vagFont);
tv.setText(m_category.name);
if (bUpdateData) {
getItemsInCategory();
} else {
showItemsInCategoryPage();
}
}
use of android.support.v4.app.FragmentManager in project glitch-hq-android by tinyspeck.
the class EncyclopediaSkillCategoriesFragment method init.
private void init(View root) {
boolean bUpdateData = (m_categoriesList == null);
m_btnBack = (Button) m_root.findViewById(R.id.btnBack);
m_btnBack.setText("Encyclopedia");
m_btnBack.setSingleLine();
m_btnBack.setEllipsize(TruncateAt.END);
m_btnBack.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
FragmentManager fm = getFragmentManager();
fm.popBackStack();
}
});
m_btnBack.setVisibility(View.VISIBLE);
m_btnSidebar = (Button) m_root.findViewById(R.id.btnSidebar);
m_btnSidebar.setVisibility(View.GONE);
if (bUpdateData) {
m_categoriesList = new Vector<String>();
}
TextView title = (TextView) root.findViewById(R.id.encyclopedia_skill_categories_title);
title.setTypeface(m_application.m_vagFont);
m_adapter = new EncyclopediaSkillCategoriesListViewAdapter(this, m_categoriesList);
m_listView = (LinearListView) root.findViewById(R.id.encyclopedia_skill_categories_list);
m_listView.setAdapter(m_adapter);
if (bUpdateData) {
getEncyclopediaSkillCategories();
} else {
showEncyclopediaSkillCategoriesPage();
}
}
use of android.support.v4.app.FragmentManager in project glitch-hq-android by tinyspeck.
the class MailChooseRecipientFragment method init.
private void init(View root) {
boolean bUpdateData = m_recipientsList == null;
if (bUpdateData)
m_recipientsList = new Vector<glitchFriend>();
m_filterText = (EditText) root.findViewById(R.id.recipients_search_box);
m_filterText.addTextChangedListener(filterTextWatcher);
m_filterClearImg = (ImageView) root.findViewById(R.id.recipients_filter_clear);
m_filterClearImg.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
m_filterText.setText("");
}
});
m_btnClose = (Button) root.findViewById(R.id.btnCloseRecipientChooser);
m_btnClose.setVisibility(View.VISIBLE);
m_btnClose.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
FragmentManager fm = getFragmentManager();
fm.popBackStack();
}
});
m_btnSidebar = (Button) root.findViewById(R.id.btnSidebar);
m_btnSidebar.setVisibility(View.GONE);
m_adapter = new FriendsListViewAdapter(this, m_recipientsList);
m_listView = (LinearListView) root.findViewById(R.id.RecipientsListView);
m_listView.setAdapter(m_adapter);
if (bUpdateData) {
getRecipients();
} else {
updateRecipients();
}
}
use of android.support.v4.app.FragmentManager in project glitch-hq-android by tinyspeck.
the class MailComposeFragment method init.
private void init(View root) {
m_btnBackToRecipientChooser = (Button) root.findViewById(R.id.btnBackToRecipientChooser);
m_btnBackToRecipientChooser.setVisibility(View.VISIBLE);
m_btnBackToRecipientChooser.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
FlurryAgent.logEvent("MailCompose - 'To' button pressed");
// assume always have MailChooseRecipientFragment underneath
FragmentManager fm = getFragmentManager();
fm.popBackStack();
}
});
m_btnSendMail = (Button) root.findViewById(R.id.btnSendMail);
m_btnSendMail.setVisibility(View.VISIBLE);
m_btnSendMail.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
FlurryAgent.logEvent("MailCompose - 'Send' button pressed");
if (m_composer.getText().toString().length() == 0) {
Util.Alert(getActivity(), "Your message is empty, do you want to send anyway?", "Send empty message?", true, "Send", "Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (which == DialogInterface.BUTTON_POSITIVE) {
sendMail();
} else {
dialog.dismiss();
}
}
});
} else if (m_composer.getText().toString().length() > 300) {
Util.Alert(getActivity(), "Your message is longer than the 300 character limit.", "Message too long", false, "OK", "Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
} else {
sendMail();
}
}
});
m_btnSidebar = (Button) root.findViewById(R.id.btnSidebar);
m_btnSidebar.setVisibility(View.GONE);
m_recipientTextView = (TextView) root.findViewById(R.id.recipient_text_view);
m_recipientTextView.setTypeface(m_application.m_vagFont);
m_recipientTextView.setText("To: " + m_recipientLabel);
m_composer = (EditText) root.findViewById(R.id.mail_composer);
}
Aggregations