use of android.view.LayoutInflater in project openkit-android by OpenKit.
the class OKSocialLeaderboardFragment method getFBLoginRow.
private View getFBLoginRow() {
LayoutInflater inflater = this.getActivity().getLayoutInflater();
int fbLoginRowID = getResources().getIdentifier("io_openkit_list_fb_login", "layout", getActivity().getPackageName());
View fbLoginRow = inflater.inflate(fbLoginRowID, null);
int loginButtonID = getResources().getIdentifier("io_openkit_fbSignInButton", "id", getActivity().getPackageName());
Button fbLoginButton = (Button) fbLoginRow.findViewById(loginButtonID);
fbLoginButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loginToFacebook(false);
}
});
return fbLoginRow;
}
use of android.view.LayoutInflater in project openkit-android by OpenKit.
the class OKSocialLeaderboardFragment method getHeaderView.
private View getHeaderView(String headerText) {
LayoutInflater inflater = this.getActivity().getLayoutInflater();
int listHeaderViewId, listHeaderTextViewId;
listHeaderTextViewId = getResources().getIdentifier("headerTextView", "id", getActivity().getPackageName());
listHeaderViewId = getResources().getIdentifier("list_simple_header", "layout", getActivity().getPackageName());
//Inflate the list headerview
View listHeaderView = inflater.inflate(listHeaderViewId, null);
TextView listHeaderTextView = (TextView) listHeaderView.findViewById(listHeaderTextViewId);
listHeaderTextView.setText(headerText);
return listHeaderView;
}
use of android.view.LayoutInflater in project OpenMEAP by OpenMEAP.
the class MainActivity method createLoginFormDialog.
private Dialog createLoginFormDialog() {
Context mContext = this;
final Dialog dialog = new Dialog(mContext);
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
final View layout = inflater.inflate(R.layout.login_form, (ViewGroup) findViewById(R.id.login_form_container));
dialog.setContentView(layout);
dialog.setTitle("Authentication Prompt");
String infoText = loginFormCallback.getInfoText();
TextView infoTextView = (TextView) layout.findViewById(R.id.info);
infoTextView.setText(infoText);
Button proceedButton = (Button) layout.findViewById(R.id.proceed);
proceedButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
EditText passwordText = (EditText) layout.findViewById(R.id.password);
EditText usernameText = (EditText) layout.findViewById(R.id.username);
CheckBox rememberBox = (CheckBox) layout.findViewById(R.id.remember);
loginFormCallback.onProceed(usernameText.getEditableText().toString(), passwordText.getEditableText().toString(), rememberBox.isChecked());
loginFormCallback = null;
if (!rememberBox.isChecked()) {
usernameText.setText("");
passwordText.setText("");
}
dialog.dismiss();
}
});
Button cancelButton = (Button) layout.findViewById(R.id.cancel);
cancelButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
EditText passwordText = (EditText) layout.findViewById(R.id.password);
EditText usernameText = (EditText) layout.findViewById(R.id.username);
CheckBox rememberBox = (CheckBox) layout.findViewById(R.id.remember);
loginFormCallback.onCancel();
loginFormCallback = null;
if (!rememberBox.isChecked()) {
usernameText.setText("");
passwordText.setText("");
}
dialog.dismiss();
}
});
EditText usernameText = (EditText) layout.findViewById(R.id.username);
usernameText.requestFocus();
return dialog;
}
use of android.view.LayoutInflater in project Signal-Android by WhisperSystems.
the class WebRtcCallControls method initialize.
private void initialize() {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.webrtc_call_controls, this, true);
this.speakerButton = ViewUtil.findById(this, R.id.speakerButton);
this.bluetoothButton = ViewUtil.findById(this, R.id.bluetoothButton);
this.audioMuteButton = ViewUtil.findById(this, R.id.muteButton);
this.videoMuteButton = ViewUtil.findById(this, R.id.video_mute_button);
}
use of android.view.LayoutInflater in project Signal-Android by WhisperSystems.
the class AttachmentTypeSelectorAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view;
if (convertView == null) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(R.layout.icon_list_item, parent, false);
} else {
view = convertView;
}
TextView text = (TextView) view.findViewById(R.id.text1);
ImageView image = (ImageView) view.findViewById(R.id.icon);
text.setText(getItem(position).getTitle());
image.setImageResource(getItem(position).getResource());
return view;
}
Aggregations