Example usage for android.view Window FEATURE_NO_TITLE

List of usage examples for android.view Window FEATURE_NO_TITLE

Introduction

In this page you can find the example usage for android.view Window FEATURE_NO_TITLE.

Prototype

int FEATURE_NO_TITLE

To view the source code for android.view Window FEATURE_NO_TITLE.

Click Source Link

Document

Flag for the "no title" feature, turning off the title at the top of the screen.

Usage

From source file:com.feathercoin.wallet.feathercoin.util.BitmapFragment.java

@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
    final Bitmap bitmap = (Bitmap) getArguments().getParcelable(KEY_BITMAP);

    final Dialog dialog = new Dialog(activity);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.bitmap_dialog);
    dialog.setCanceledOnTouchOutside(true);

    final ImageView imageView = (ImageView) dialog.findViewById(R.id.bitmap_dialog_image);
    imageView.setImageBitmap(bitmap);//from  www .j  a  v  a2s  . c  o m
    imageView.setOnClickListener(new View.OnClickListener() {
        public void onClick(final View v) {
            dismiss();
        }
    });

    return dialog;
}

From source file:com.mirasense.scanditsdk.plugin.ScanditSDKActivity.java

@SuppressWarnings("deprecation")
public void initializeAndStartBarcodeRecognition(Bundle extras) {
    // Switch to full screen.
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    ScanSettings settings = ScanditSDKParameterParser.settingsForBundle(extras);

    mBarcodePicker = new SearchBarBarcodePicker(this, settings);

    this.setContentView(mBarcodePicker);

    Display display = getWindowManager().getDefaultDisplay();
    ScanditSDKParameterParser.updatePickerUIFromBundle(mBarcodePicker, extras, display.getWidth(),
            display.getHeight());//from  w w  w  .j ava 2  s . c  om

    if (extras.containsKey(ScanditSDKParameterParser.paramContinuousMode)) {
        mContinuousMode = extras.getBoolean(ScanditSDKParameterParser.paramContinuousMode);
    }

    // Register listener, in order to be notified about relevant events
    // (e.g. a successfully scanned bar code).
    mBarcodePicker.setOnScanListener(this);
    mBarcodePicker.setOnSearchBarListener(this);

    if (extras.containsKey(ScanditSDKParameterParser.paramPaused)
            && extras.getBoolean(ScanditSDKParameterParser.paramPaused)) {
        mStartPaused = true;
    } else {
        mStartPaused = false;
    }
}

From source file:ca.xecure.easychip.MainActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    GCMRegistrar.checkDevice(this);
    GCMRegistrar.checkManifest(this);

    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
    StrictMode.setThreadPolicy(policy);// ww w  .  j av  a  2s. c  o  m

    this.requestWindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.main);

    //Set the pager with an adapter
    ViewPager pager = (ViewPager) findViewById(R.id.pager);
    pager.setAdapter(new FlipAdapter(getSupportFragmentManager()));
    pager.setCurrentItem(1);

    //Bind the title indicator to the adapter
    TitlePageIndicator indicator = (TitlePageIndicator) findViewById(R.id.titles);
    indicator.setViewPager(pager);

    final float density = getResources().getDisplayMetrics().density;
    indicator.setBackgroundColor(0xFF7AA7D6);
    //        indicator.setBackgroundColor(0xFFDD7200);
    indicator.setFooterColor(0xFFECF1F2);
    indicator.setFooterLineHeight(0);
    indicator.setFooterIndicatorHeight(7 * density);
    indicator.setFooterIndicatorStyle(IndicatorStyle.Triangle);
    indicator.setTextColor(0xAAFFFFFF);
    indicator.setSelectedColor(0xFFFFFFFF);
    indicator.setSelectedBold(true);

    registerReceiver(confirm_payment_handler, new IntentFilter(CONFIRM_PAYMENT_ACTION));

    settings = getSharedPreferences(PREF_FILE_NAME, MODE_PRIVATE);
    String email_address = settings.getString(EMAIL_ADDRESS_PREF, null);
    if (email_address != null) {
        register_cloud_message();
    } else {
        choose_email_address();
    }
}

From source file:com.arconus.dicecommander.ui.dialogs.PowerRollResultDialog.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.power_roll_result_dialog, container, false);
    v.setOnClickListener(new OnClickListener() {
        @Override//  w  w w. j  a v  a  2 s. c o m
        public void onClick(View v) {
            dismiss();
        }
    });

    prepareRollResultDialog(v);

    getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
    return v;
}

From source file:at.barcamp.cleancity.Login.java

/** Called when the activity is first created. */
@Override//w w  w.ja  va2s. c o  m
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (APP_ID == null) {
        Util.showAlert(this, "Warning", "Facebook Applicaton ID must be " + "specified before running.");
    }

    // hide the android title bar
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.login);
    mLoginButton = (LoginButton) findViewById(R.id.login);
    mText = (TextView) this.findViewById(R.id.txt);

    mFacebook = new Facebook(APP_ID);
    mAsyncRunner = new AsyncFacebookRunner(mFacebook);

    SessionStore.restore(mFacebook, this);
    SessionEvents.addAuthListener(new SampleAuthListener());
    SessionEvents.addLogoutListener(new SampleLogoutListener());

    // Auth via facebook requesting the given permissions
    mLoginButton.init(this, mFacebook, new String[] { "offline_access", "email" });

    if (mFacebook.isSessionValid()) {
        this.startUploader();
    }

}

From source file:cc.mintcoin.wallet.util.BitmapFragment.java

@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
    final Bitmap bitmap = (Bitmap) getArguments().getParcelable(KEY_BITMAP);

    final Dialog dialog = new Dialog(activity);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.bitmap_dialog);
    dialog.setCanceledOnTouchOutside(true);

    final ImageView imageView = (ImageView) dialog.findViewById(R.id.bitmap_dialog_image);
    imageView.setImageBitmap(bitmap);//from   www. j ava  2s .co m
    imageView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(final View v) {
            dismiss();
        }
    });

    return dialog;
}

From source file:com.naddysworld.slingshot.Main.java

/** Called when the activity is first created. */
@Override/*from   w  w  w .j  a v  a 2  s  .  c om*/
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // action bar substitutes the title bar
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.ablayout);
    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
    if (prefs.getString("username", "").equals("") || prefs.getString("password", "").equals(""))
        startActivity(new Intent(this, Preferences.class));
    else
        new UpdateStationsTask().execute();
}

From source file:pam.widget.activities.EntityBoardActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.main);//  w ww  .j ava  2  s. c  o  m
    statusTv = (TextView) findViewById(R.id.status);
    titleTv = (TextView) findViewById(R.id.title);
    emptyRl = (RelativeLayout) findViewById(R.id.empty);

    displayEntityBoard();
}

From source file:com.apptentive.android.sdk.ViewActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    try {/*w w  w. j  a va  2s .c  o  m*/
        requestWindowFeature(Window.FEATURE_NO_TITLE);

        String activityContentTypeString = getIntent().getStringExtra(ActivityContent.KEY);
        String parseStringExtra = getIntent().getStringExtra("com.parse.Data");

        if (activityContentTypeString != null) {
            Log.v("Started ViewActivity normally for %s.", activityContent);
            activeContentType = ActivityContent.Type.parse(activityContentTypeString);

            try {
                switch (activeContentType) {
                case ABOUT:
                    break;
                case MESSAGE_CENTER:
                    break;
                case INTERACTION:
                    String interactionString = getIntent().getExtras().getCharSequence(Interaction.KEY_NAME)
                            .toString();
                    Interaction interaction = Interaction.Factory.parseInteraction(interactionString);
                    switch (interaction.getType()) {
                    case UpgradeMessage:
                        activityContent = new UpgradeMessageInteractionView(
                                (UpgradeMessageInteraction) interaction);
                        break;
                    case EnjoymentDialog:
                        activityContent = new EnjoymentDialogInteractionView(
                                (EnjoymentDialogInteraction) interaction);
                        break;
                    case RatingDialog:
                        activityContent = new RatingDialogInteractionView(
                                (RatingDialogInteraction) interaction);
                        break;
                    case AppStoreRating:
                        activityContent = new AppStoreRatingInteractionView(
                                (AppStoreRatingInteraction) interaction);
                        break;
                    case FeedbackDialog:
                        activityContent = new FeedbackDialogInteractionView(
                                (FeedbackDialogInteraction) interaction);
                        break;
                    case Survey:
                        activityContent = new SurveyInteractionView((SurveyInteraction) interaction);
                        break;
                    case MessageCenter:
                        // For now, we use the old method.
                        getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
                        finish();
                        Apptentive.showMessageCenter(this);
                        return;
                    case TextModal:
                        activityContent = new TextModalInteractionView((TextModalInteraction) interaction);
                        break;
                    case NavigateToLink:
                        activityContent = new NavigateToLinkInteractionView(
                                (NavigateToLinkInteraction) interaction);
                        break;
                    default:
                        break;
                    }
                    if (activityContent == null) {
                        finish();
                    } else {
                        activityContent.onCreate(this, savedInstanceState);
                    }
                    break;
                default:
                    Log.w("No Activity specified. Finishing...");
                    finish();
                    break;
                }
            } catch (Exception e) {
                Log.e("Error starting ViewActivity.", e);
                MetricModule.sendError(this, e, null, null);
            }
        } else
        // If no content was sent to this Activity, then it may have been started from a Parse push notification.
        if (parseStringExtra != null) {
            Log.i("Started ViewActivity from Parse push.");

            // Save off the callback Activity if one was passed in.
            pushCallbackActivityName = ApptentiveInternal.getPushCallbackActivityName();

            // If the callback is null and we got here, then the developer forgot to set it.
            if (pushCallbackActivityName != null) {
                returnToPushCallbackActivity = true;
                JSONObject parseJson = new JSONObject(parseStringExtra);
                String apptentiveStringData = parseJson.optString(Apptentive.APPTENTIVE_PUSH_EXTRA_KEY);
                JSONObject apptentiveJson = new JSONObject(apptentiveStringData);
                ApptentiveInternal.PushAction action = ApptentiveInternal.PushAction
                        .parse(apptentiveJson.getString(ApptentiveInternal.PUSH_ACTION));
                switch (action) {
                case pmc:
                    activeContentType = ActivityContent.Type.MESSAGE_CENTER;
                    break;
                default:
                    break;
                }
            } else {
                Log.a("Push callback Activity was not set. Make sure to call Apptentive.setPushCallback()");
                if (GlobalInfo.isAppDebuggable) {
                    Toast.makeText(this,
                            "Push callback Activity was not set. Make sure to call Apptentive.setPushCallback()",
                            Toast.LENGTH_LONG).show();
                }
                finish();
            }
        } else {
            Log.e("Started ViewActivity in a bad way.");
        }
    } catch (Exception e) {
        Log.e("Error creating ViewActivity.", e);
        MetricModule.sendError(this, e, null, null);
    }
    if (activeContentType == null) {
        finish();
    }
    Window window = getWindow();
    window.setFormat(PixelFormat.RGBA_8888);
    window.addFlags(WindowManager.LayoutParams.FLAG_DITHER);
}

From source file:com.bushstar.kobocoin_android_wallet.util.BitmapFragment.java

@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
    final Bitmap bitmap = getArguments().getParcelable(KEY_BITMAP);

    final Dialog dialog = new Dialog(activity);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.bitmap_dialog);
    dialog.setCanceledOnTouchOutside(true);

    final ImageView imageView = (ImageView) dialog.findViewById(R.id.bitmap_dialog_image);
    imageView.setImageBitmap(bitmap);// w w  w.jav a2  s  .co  m
    imageView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(final View v) {
            dismiss();
        }
    });

    return dialog;
}