List of usage examples for android.view Window FEATURE_NO_TITLE
int FEATURE_NO_TITLE
To view the source code for android.view Window FEATURE_NO_TITLE.
Click Source Link
From source file:com.kakao.auth.authorization.authcode.KakaoWebViewDialog.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.argb(128, 0, 0, 0))); setOnCancelListener(new OnCancelListener() { @Override//from www . j a v a 2 s. c om public void onCancel(DialogInterface dialogInterface) { sendCancelToListenerIfNeeded(); } }); spinner = new ProgressDialog(getContext()); spinner.requestWindowFeature(Window.FEATURE_NO_TITLE); //spinner.setMessage(getContext().getString(R.string.core_com_kakao_sdk_loading)); spinner.setMessage("Loading"); spinner.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialogInterface) { sendCancelToListenerIfNeeded(); KakaoWebViewDialog.this.dismiss(); } }); contentFrameLayout = new FrameLayout(getContext()); createCrossImage(); int crossWidth = crossImageView.getDrawable().getIntrinsicWidth(); setUpWebView(crossWidth / 2); contentFrameLayout.addView(crossImageView, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); addContentView(contentFrameLayout, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); registerSmsReceiverIfNeeded(); }
From source file:com.mirasense.demos.ScanditSDKSampleBarcodeActivity.java
/** * Initializes and starts the bar code scanning. */// w w w .j a va2 s.c om public void initializeAndStartBarcodeScanning() { // Switch to full screen. getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); // We instantiate the automatically adjusting barcode picker that will // choose the correct picker to instantiate. Be aware that this picker // should only be instantiated if the picker is shown full screen as the // legacy picker will rotate the orientation and not properly work in // non-fullscreen. ScanditSDKAutoAdjustingBarcodePicker picker = new ScanditSDKAutoAdjustingBarcodePicker(this, sScanditSdkAppKey, ScanditSDKAutoAdjustingBarcodePicker.CAMERA_FACING_BACK); // Add both views to activity, with the scan GUI on top. setContentView(picker); mBarcodePicker = picker; // Register listener, in order to be notified about relevant events // (e.g. a successfully scanned bar code). mBarcodePicker.getOverlayView().addListener(this); // show search bar in scan user interface mBarcodePicker.getOverlayView().showSearchBar(true); // In the old version, the title and tool bar can be hidden as follows: //mBarcodePicker.getOverlayView().showTitleBar(false); //mBarcodePicker.getOverlayView().showToolBar(false); // To activate recognition of 2d codes mBarcodePicker.setQrEnabled(true); mBarcodePicker.setDataMatrixEnabled(true); }
From source file:com.commonsdroid.fragmentdialog.NumberPickerDialog.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.number_picker, null); Bundle b = getArguments();//from w ww . j a v a2 s . co m if (mLowerRange >= mUpperRange) { Toast.makeText(getActivity(), "Lower Range Can Not be Greater than or Equal To Upper Range", Toast.LENGTH_LONG).show(); } else { if (b.getInt(UPPER_RANGE) % b.getInt(INTERVAL) != 0) { Toast.makeText(getActivity(), "Interval Not Correct. Interval set to 1", Toast.LENGTH_LONG).show(); mInterval = 1; } mSeparatorView = (View) v.findViewById(R.id.headSeparate); if (isTitleBarVisible) { mSeparatorView.setVisibility(View.VISIBLE); getDialog().setTitle(b.getInt(TITLE)); } else { mSeparatorView.setVisibility(View.INVISIBLE); getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE); } getDialog().getWindow().setBackgroundDrawableResource(R.drawable.dialog_full_holo_dark); int defaultValue = b.getInt(DEFAULT_VALUE); if (defaultValue < mLowerRange) { defaultValue = mLowerRange; } else if (defaultValue > mUpperRange) { defaultValue = mUpperRange; } else if (defaultValue % mInterval != 0) { defaultValue += (defaultValue % mInterval); } mDefaultValue = defaultValue; btnSet = (Button) v.findViewById(R.id.btnSet); btnSet.setOnClickListener(this); btnCancel = (Button) v.findViewById(R.id.btnCancel); btnCancel.setOnClickListener(this); ibtnNext = (ImageButton) v.findViewById(R.id.ibtnNext); ibtnNext.setOnClickListener(this); ibtnPrev = (ImageButton) v.findViewById(R.id.ibtnPrev); ibtnPrev.setOnClickListener(this); edtSelectedValue = (EditText) v.findViewById(R.id.edtSelectedValue); lblHeaderText = (TextView) v.findViewById(R.id.lblHeaderMessage); String text = b.getString(HEADER); if (text != null) lblHeaderText.setText(text); else lblHeaderText.setText(""); edtSelectedValue.setText("" + defaultValue); lblPrevValue = (TextView) v.findViewById(R.id.lblPrevValue); if (defaultValue == mLowerRange) { lblPrevValue.setText(""); } else { lblPrevValue.setText("" + (defaultValue - mInterval)); } lblNextValue = (TextView) v.findViewById(R.id.lblNextValue); if (defaultValue == mUpperRange) { lblNextValue.setText(""); } else { lblNextValue.setText("" + (defaultValue + mInterval)); } if (defaultValue == mLowerRange) { ibtnPrev.setEnabled(false); } if (defaultValue == mUpperRange) { ibtnNext.setEnabled(false); } } if (mBackground != 0) { getDialog().getWindow().setBackgroundDrawableResource(mBackground); } if (mTextColor != 0) { lblHeaderText.setTextColor(mTextColor); lblNextValue.setTextColor(mTextColor); lblPrevValue.setTextColor(mTextColor); edtSelectedValue.setTextColor(mTextColor); } if (mButtonTextColor != 0) { btnCancel.setTextColor(mButtonTextColor); btnSet.setTextColor(mButtonTextColor); } if (mButtonArrowUp != 0 && mButtonArrowDown != 0) { ibtnNext.setImageResource(mButtonArrowDown); ibtnPrev.setImageResource(mButtonArrowUp); } if (mButtonBackground != 0) { btnCancel.setBackgroundResource(mButtonBackground); btnSet.setBackgroundResource(mButtonBackground); } edtSelectedValue.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (edtSelectedValue.getText().toString().equals("")) { } else { int newValue = Integer.parseInt(edtSelectedValue.getText().toString()); if (newValue < mLowerRange || newValue > mUpperRange) { edtSelectedValue.setText("" + mPrevValue); } else if (newValue % mInterval != 0) { } else { if (newValue != mLowerRange) lblPrevValue.setText("" + (newValue - mInterval)); else lblPrevValue.setText(""); if (newValue != mUpperRange) lblNextValue.setText("" + (newValue + mInterval)); else lblNextValue.setText(""); } } } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { if (!edtSelectedValue.getText().toString().equals("")) { mPrevValue = edtSelectedValue.getText().toString(); } } @Override public void afterTextChanged(Editable s) { } }); return v; }
From source file:com.irccloud.android.activity.LoginActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (Build.VERSION.SDK_INT >= 21) { Bitmap cloud = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); setTaskDescription(new ActivityManager.TaskDescription(getResources().getString(R.string.app_name), cloud, 0xff0b2e60));/*ww w . j av a 2s. c o m*/ cloud.recycle(); } requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); setContentView(R.layout.activity_login); loading = findViewById(R.id.loading); connecting = findViewById(R.id.connecting); connectingMsg = (TextView) findViewById(R.id.connectingMsg); progressBar = (ProgressBar) findViewById(R.id.connectingProgress); loginHint = (LinearLayout) findViewById(R.id.loginHint); signupHint = (LinearLayout) findViewById(R.id.signupHint); hostHint = (TextView) findViewById(R.id.hostHint); login = findViewById(R.id.login); name = (EditText) findViewById(R.id.name); if (savedInstanceState != null && savedInstanceState.containsKey("name")) name.setText(savedInstanceState.getString("name")); email = (AutoCompleteTextView) findViewById(R.id.email); if (BuildConfig.ENTERPRISE) email.setHint(R.string.email_enterprise); ArrayList<String> accounts = new ArrayList<String>(); AccountManager am = (AccountManager) getSystemService(Context.ACCOUNT_SERVICE); for (Account a : am.getAccounts()) { if (a.name.contains("@") && !accounts.contains(a.name)) accounts.add(a.name); } if (accounts.size() > 0) email.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, accounts.toArray(new String[accounts.size()]))); if (savedInstanceState != null && savedInstanceState.containsKey("email")) email.setText(savedInstanceState.getString("email")); password = (EditText) findViewById(R.id.password); password.setOnEditorActionListener(new OnEditorActionListener() { public boolean onEditorAction(TextView exampleView, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { new LoginTask().execute((Void) null); return true; } return false; } }); if (savedInstanceState != null && savedInstanceState.containsKey("password")) password.setText(savedInstanceState.getString("password")); host = (EditText) findViewById(R.id.host); if (BuildConfig.ENTERPRISE) host.setText(NetworkConnection.IRCCLOUD_HOST); else host.setVisibility(View.GONE); host.setOnEditorActionListener(new OnEditorActionListener() { public boolean onEditorAction(TextView exampleView, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { new LoginTask().execute((Void) null); return true; } return false; } }); if (savedInstanceState != null && savedInstanceState.containsKey("host")) host.setText(savedInstanceState.getString("host")); else host.setText(getSharedPreferences("prefs", 0).getString("host", BuildConfig.HOST)); if (host.getText().toString().equals("api.irccloud.com") || host.getText().toString().equals("www.irccloud.com")) host.setText(""); loginBtn = (Button) findViewById(R.id.loginBtn); loginBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { new LoginTask().execute((Void) null); } }); loginBtn.setFocusable(true); loginBtn.requestFocus(); sendAccessLinkBtn = (Button) findViewById(R.id.sendAccessLink); sendAccessLinkBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { new ResetPasswordTask().execute((Void) null); } }); nextBtn = (Button) findViewById(R.id.nextBtn); nextBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { if (host.getText().length() > 0) { NetworkConnection.IRCCLOUD_HOST = host.getText().toString(); trimHost(); new EnterpriseConfigTask().execute((Void) null); } } }); TOS = (TextView) findViewById(R.id.TOS); TOS.setMovementMethod(new LinkMovementMethod()); forgotPassword = (TextView) findViewById(R.id.forgotPassword); forgotPassword.setOnClickListener(forgotPasswordClickListener); enterpriseLearnMore = (TextView) findViewById(R.id.enterpriseLearnMore); enterpriseLearnMore.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { if (isPackageInstalled("com.irccloud.android", LoginActivity.this)) { startActivity(getPackageManager().getLaunchIntentForPackage("com.irccloud.android")); } else { try { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.irccloud.android"))); } catch (Exception e) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=com.irccloud.android"))); } } } private boolean isPackageInstalled(String packagename, Context context) { PackageManager pm = context.getPackageManager(); try { pm.getPackageInfo(packagename, PackageManager.GET_ACTIVITIES); return true; } catch (NameNotFoundException e) { return false; } } }); enterpriseHint = (LinearLayout) findViewById(R.id.enterpriseHint); EnterYourEmail = (TextView) findViewById(R.id.enterYourEmail); signupHint.setOnClickListener(signupHintClickListener); loginHint.setOnClickListener(loginHintClickListener); signupBtn = (Button) findViewById(R.id.signupBtn); signupBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { new LoginTask().execute((Void) null); } }); TextView version = (TextView) findViewById(R.id.version); try { version.setText("Version " + getPackageManager().getPackageInfo(getPackageName(), 0).versionName); } catch (NameNotFoundException e) { version.setVisibility(View.GONE); } Typeface LatoRegular = Typeface.createFromAsset(getAssets(), "Lato-Regular.ttf"); Typeface LatoLightItalic = Typeface.createFromAsset(getAssets(), "Lato-LightItalic.ttf"); for (int i = 0; i < signupHint.getChildCount(); i++) { View v = signupHint.getChildAt(i); if (v instanceof TextView) { ((TextView) v).setTypeface(LatoRegular); } } for (int i = 0; i < loginHint.getChildCount(); i++) { View v = loginHint.getChildAt(i); if (v instanceof TextView) { ((TextView) v).setTypeface(LatoRegular); } } LinearLayout IRCCloud = (LinearLayout) findViewById(R.id.IRCCloud); for (int i = 0; i < IRCCloud.getChildCount(); i++) { View v = IRCCloud.getChildAt(i); if (v instanceof TextView) { ((TextView) v).setTypeface(LatoRegular); } } notAProblem = (LinearLayout) findViewById(R.id.notAProblem); for (int i = 0; i < notAProblem.getChildCount(); i++) { View v = notAProblem.getChildAt(i); if (v instanceof TextView) { ((TextView) v).setTypeface((i == 0) ? LatoRegular : LatoLightItalic); } } loginSignupHint = (LinearLayout) findViewById(R.id.loginSignupHint); for (int i = 0; i < loginSignupHint.getChildCount(); i++) { View v = loginSignupHint.getChildAt(i); if (v instanceof TextView) { ((TextView) v).setTypeface(LatoRegular); ((TextView) v).setOnClickListener((i == 0) ? loginHintClickListener : signupHintClickListener); } } name.setTypeface(LatoRegular); email.setTypeface(LatoRegular); password.setTypeface(LatoRegular); host.setTypeface(LatoRegular); loginBtn.setTypeface(LatoRegular); signupBtn.setTypeface(LatoRegular); TOS.setTypeface(LatoRegular); EnterYourEmail.setTypeface(LatoRegular); hostHint.setTypeface(LatoLightItalic); if (BuildConfig.ENTERPRISE) { name.setVisibility(View.GONE); email.setVisibility(View.GONE); password.setVisibility(View.GONE); loginBtn.setVisibility(View.GONE); signupBtn.setVisibility(View.GONE); TOS.setVisibility(View.GONE); signupHint.setVisibility(View.GONE); loginHint.setVisibility(View.GONE); forgotPassword.setVisibility(View.GONE); loginSignupHint.setVisibility(View.GONE); EnterYourEmail.setVisibility(View.GONE); sendAccessLinkBtn.setVisibility(View.GONE); notAProblem.setVisibility(View.GONE); enterpriseLearnMore.setVisibility(View.VISIBLE); enterpriseHint.setVisibility(View.VISIBLE); host.setVisibility(View.VISIBLE); nextBtn.setVisibility(View.VISIBLE); hostHint.setVisibility(View.VISIBLE); host.requestFocus(); } if (savedInstanceState != null && savedInstanceState.containsKey("signup") && savedInstanceState.getBoolean("signup")) { signupHintClickListener.onClick(null); } if (savedInstanceState != null && savedInstanceState.containsKey("login") && savedInstanceState.getBoolean("login")) { loginHintClickListener.onClick(null); } if (savedInstanceState != null && savedInstanceState.containsKey("forgotPassword") && savedInstanceState.getBoolean("forgotPassword")) { forgotPasswordClickListener.onClick(null); } mResolvingError = savedInstanceState != null && savedInstanceState.getBoolean("resolving_error", false); mGoogleApiClient = new GoogleApiClient.Builder(this).addApi(Auth.CREDENTIALS_API) .addConnectionCallbacks(this).addOnConnectionFailedListener(this).build(); }
From source file:com.awrtechnologies.carbudgetsales.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { this.requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); fragmentstack = new Stack<Fragment>(); // creating connection detector class instance cd = new ConnectionDetector(MainActivity.this); rl_buttons = (RelativeLayout) findViewById(R.id.relative_layout_buttons); relativeprogress = (RelativeLayout) findViewById(R.id.relativelayoutprogressbarheader); news = (ImageView) findViewById(R.id.button_news); deals = (ImageView) findViewById(R.id.button_deals); tools = (ImageView) findViewById(R.id.button_tools); inventory = (ImageView) findViewById(R.id.button_inventroy); info = (ImageView) findViewById(R.id.button_information); service = (ImageView) findViewById(R.id.button_services); facebook = (Button) findViewById(R.id.button_facebook); twitter = (Button) findViewById(R.id.button_twitter); google = (Button) findViewById(R.id.button_google); digg = (Button) findViewById(R.id.button_digg); youtube = (Button) findViewById(R.id.button_youtube); java.io.File imageFile1 = new File( (Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) + "/." + Constants.APPNAME + "")); imageFile1.mkdirs();//from w ww. j a va 2 s .c o m User user = User.getUser(); if (user != null) { if (GeneralHelper.getInstance(MainActivity.this).isIscheck() == true || GeneralHelper.getInstance(MainActivity.this).isIscheckdonetime() == true) { // openfragment(); // GeneralHelper.getInstance(com.awrtechnologies.carbudgetsales.MainActivity.this).setIscheckfragment(false); loadData(); } else if (GeneralHelper.getInstance(MainActivity.this).isIscheck() == false || GeneralHelper.getInstance(MainActivity.this).isIscheckdonetime() == false) { loadData(); } } else { // openNewFragment(new ServiceFragment()); FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left); ft.replace(R.id.contanier, new Signin_fragment()); ft.commit(); } deals.setOnClickListener(this); inventory.setOnClickListener(this); news.setOnClickListener(this); tools.setOnClickListener(this); info.setOnClickListener(this); service.setOnClickListener(this); facebook.setOnClickListener(this); twitter.setOnClickListener(this); google.setOnClickListener(this); digg.setOnClickListener(this); youtube.setOnClickListener(this); }
From source file:com.diandi.widget.googledatetimepicker.time.TimePickerDialog.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); View view = inflater.inflate(R.layout.time_picker_dialog, null); KeyboardListener keyboardListener = new KeyboardListener(); view.findViewById(R.id.time_picker_dialog).setOnKeyListener(keyboardListener); Resources res = getResources(); mHourPickerDescription = res.getString(R.string.hour_picker_description); mSelectHours = res.getString(R.string.select_hours); mMinutePickerDescription = res.getString(R.string.minute_picker_description); mSelectMinutes = res.getString(R.string.select_minutes); mBlue = res.getColor(R.color.blue);// ww w.j a v a 2 s .c o m mBlack = res.getColor(R.color.numbers_text_color); mHourView = (TextView) view.findViewById(R.id.hours); mHourView.setOnKeyListener(keyboardListener); mHourSpaceView = (TextView) view.findViewById(R.id.hour_space); mMinuteSpaceView = (TextView) view.findViewById(R.id.minutes_space); mMinuteView = (TextView) view.findViewById(R.id.minutes); mMinuteView.setOnKeyListener(keyboardListener); mAmPmTextView = (TextView) view.findViewById(R.id.ampm_label); mAmPmTextView.setOnKeyListener(keyboardListener); String[] amPmTexts = new DateFormatSymbols().getAmPmStrings(); mAmText = amPmTexts[0]; mPmText = amPmTexts[1]; mTimePicker = (RadialPickerLayout) view.findViewById(R.id.time_picker); mTimePicker.setOnValueSelectedListener(this); mTimePicker.setOnKeyListener(keyboardListener); mTimePicker.initialize(getActivity(), mInitialHourOfDay, mInitialMinute, mIs24HourMode); int currentItemShowing = HOUR_INDEX; if (savedInstanceState != null && savedInstanceState.containsKey(KEY_CURRENT_ITEM_SHOWING)) { currentItemShowing = savedInstanceState.getInt(KEY_CURRENT_ITEM_SHOWING); } setCurrentItemShowing(currentItemShowing, false, true, true); mTimePicker.invalidate(); mHourView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { setCurrentItemShowing(HOUR_INDEX, true, false, true); mTimePicker.tryVibrate(); } }); mMinuteView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { setCurrentItemShowing(MINUTE_INDEX, true, false, true); mTimePicker.tryVibrate(); } }); mDoneButton = (TextView) view.findViewById(R.id.done_button); mDoneButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (mInKbMode && isTypedTimeFullyLegal()) { finishKbMode(false); } else { mTimePicker.tryVibrate(); } if (mCallback != null) { mCallback.onTimeSet(mTimePicker, mTimePicker.getHours(), mTimePicker.getMinutes()); } dismiss(); } }); mDoneButton.setOnKeyListener(keyboardListener); // Enable or disable the AM/PM view. mAmPmHitspace = view.findViewById(R.id.ampm_hitspace); if (mIs24HourMode) { mAmPmTextView.setVisibility(View.GONE); RelativeLayout.LayoutParams paramsSeparator = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); paramsSeparator.addRule(RelativeLayout.CENTER_IN_PARENT); TextView separatorView = (TextView) view.findViewById(R.id.separator); separatorView.setLayoutParams(paramsSeparator); } else { mAmPmTextView.setVisibility(View.VISIBLE); updateAmPmDisplay(mInitialHourOfDay < 12 ? AM : PM); mAmPmHitspace.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mTimePicker.tryVibrate(); int amOrPm = mTimePicker.getIsCurrentlyAmOrPm(); if (amOrPm == AM) { amOrPm = PM; } else if (amOrPm == PM) { amOrPm = AM; } updateAmPmDisplay(amOrPm); mTimePicker.setAmOrPm(amOrPm); } }); } mAllowAutoAdvance = true; setHour(mInitialHourOfDay, true); setMinute(mInitialMinute); // Set up for keyboard mode. mDoublePlaceholderText = res.getString(R.string.time_placeholder); mDeletedKeyFormat = res.getString(R.string.deleted_key); mPlaceholderText = mDoublePlaceholderText.charAt(0); mAmKeyCode = mPmKeyCode = -1; generateLegalTimesTree(); if (mInKbMode) { mTypedTimes = savedInstanceState.getIntegerArrayList(KEY_TYPED_TIMES); tryStartingKbMode(-1); mHourView.invalidate(); } else if (mTypedTimes == null) { mTypedTimes = new ArrayList<Integer>(); } return view; }
From source file:com.chute.android.photopickerplus.ui.activity.ServicesActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fragmentManager = getSupportFragmentManager(); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main_layout); dualPanes = getResources().getBoolean(R.bool.has_two_panes); signOut = (TextView) findViewById(R.id.gcTextViewSignOut); signOut.setOnClickListener(new SignOutListener()); retrieveValuesFromBundle(savedInstanceState); if (dualPanes && savedInstanceState == null && getResources().getConfiguration().orientation != Configuration.ORIENTATION_PORTRAIT) { replaceContentWithEmptyFragment(); }/*from w ww. j ava2 s . c o m*/ }
From source file:com.angelhack.person2person.AbstractGetNameTask.java
@Override protected void onPostExecute(Void result) { // TODO Auto-generated method stub super.onPostExecute(result); try {/*from w w w . j av a2s . c o m*/ System.out.println("On Home Page***" + AbstractGetNameTask.GOOGLE_USER_DATA); JSONObject profileData = new JSONObject(AbstractGetNameTask.GOOGLE_USER_DATA); if (profileData.has("picture")) { SocialMedia_New.userImageUrl = profileData.getString("picture"); } if (profileData.has("name")) { SocialMedia_New.textName = profileData.getString("name"); // SocialMedia_New.textViewName.setText(SocialMedia_New.textName); } dialog.dismiss(); final Dialog alert_dialog = new Dialog(mActivity); alert_dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); alert_dialog.setContentView(R.layout.dialog_custom); TextView content = (TextView) alert_dialog.findViewById(R.id.content_tv_id); TextView ok = (TextView) alert_dialog.findViewById(R.id.ok_tv_id); profile = (ImageView) alert_dialog.findViewById(R.id.image_id); new GetImageFromUrl().execute(SocialMedia_New.userImageUrl); content.setText(" Welcome " + SocialMedia_New.textName); ok.setText("Stay Connect with Us..!"); ok.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent(mActivity, Home_Activity.class); mActivity.startActivity(intent); mActivity.overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left); mActivity.finish(); } }); alert_dialog.show(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
From source file:com.entertailion.android.launcher.Dialogs.java
/** * Display introduction to the user for first time launch * //from ww w . j a v a 2 s . c o m * @param context */ public static void displayIntroduction(final Launcher context) { final Dialog dialog = new Dialog(context); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.introduction); Typeface lightTypeface = ((LauncherApplication) context.getApplicationContext()).getLightTypeface(context); TextView titleTextView = (TextView) dialog.findViewById(R.id.intro_title); titleTextView.setTypeface(lightTypeface); TextView textView1 = (TextView) dialog.findViewById(R.id.intro_text1); textView1.setTypeface(lightTypeface); TextView textView2 = (TextView) dialog.findViewById(R.id.intro_text2); textView2.setTypeface(lightTypeface); ((Button) dialog.findViewById(R.id.intro_button)).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { context.showCover(false); dialog.dismiss(); } }); dialog.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { context.showCover(false); } }); context.showCover(true); dialog.show(); Analytics.logEvent(Analytics.DIALOG_INTRODUCTION); }