Example usage for android.graphics Color DKGRAY

List of usage examples for android.graphics Color DKGRAY

Introduction

In this page you can find the example usage for android.graphics Color DKGRAY.

Prototype

int DKGRAY

To view the source code for android.graphics Color DKGRAY.

Click Source Link

Usage

From source file:com.dragon4.owo.ar_trace.ARCore.MixView.java

@Override
protected void onResume() {
    super.onResume();

    try {//from   ww w. j av  a  2  s  .c  om
        this.mWakeLock.acquire(); // ?? ?

        killOnError(); // ?  ?
        mixContext.mixView = this; // ??  
        dataView.doStart(); // ?? 
        dataView.clearEvents(); // ? ?

        double angleX, angleY; // ? x, y

        /*? ?  ? */
        angleX = Math.toRadians(-90);
        m1.set(1f, 0f, 0f, 0f, (float) Math.cos(angleX), (float) -Math.sin(angleX), 0f,
                (float) Math.sin(angleX), (float) Math.cos(angleX));

        angleX = Math.toRadians(-90);
        angleY = Math.toRadians(-90);
        m2.set(1f, 0f, 0f, 0f, (float) Math.cos(angleX), (float) -Math.sin(angleX), 0f,
                (float) Math.sin(angleX), (float) Math.cos(angleX));
        m3.set((float) Math.cos(angleY), 0f, (float) Math.sin(angleY), 0f, 1f, 0f, (float) -Math.sin(angleY),
                0f, (float) Math.cos(angleY));

        m4.toIdentity();

        for (int i = 0; i < histR.length; i++) {
            histR[i] = new Matrix();
        }
        /*   */

        //  ? 
        sensorMgr = (SensorManager) getSystemService(SENSOR_SERVICE);

        // ?  ?
        // ?? 
        sensors = sensorMgr.getSensorList(Sensor.TYPE_ACCELEROMETER);
        if (sensors.size() > 0) {
            sensorGrav = sensors.get(0);
        }

        // ? 
        sensors = sensorMgr.getSensorList(Sensor.TYPE_MAGNETIC_FIELD);
        if (sensors.size() > 0) {
            sensorMag = sensors.get(0);
        }
        //// TODO: 2016-06-01
        if (sensors.size() > 0) {
            sensors = sensorMgr_ori.getSensorList(Sensor.TYPE_ORIENTATION);
            orientationSensor = sensors.get(0);
        }
        //  ??  ? ? ? ?
        sensorMgr.registerListener(this, sensorGrav, SENSOR_DELAY_GAME);
        sensorMgr.registerListener(this, sensorMag, SENSOR_DELAY_GAME);

        if (orientationSensor != null) {
            sensorMgr_ori.registerListener(this, orientationSensor, sensorMgr_ori.SENSOR_DELAY_GAME);
        }

        try {
            // ?? (Criteria)
            // http://developer.android.com/reference/android/location/Criteria.html
            Criteria c = new Criteria();

            // ? 
            c.setAccuracy(Criteria.ACCURACY_FINE);
            //c.setBearingRequired(true);

            // ?  
            locationMgr = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
            // ?? ? ?  ? . 2 , 3 
            locationMgr.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 4, this);

            // ?? ? ,   
            String bestP = locationMgr.getBestProvider(c, true);
            isGpsEnabled = locationMgr.isProviderEnabled(bestP);

            // gps, ? ? ?   
            Location hardFix = new Location("reverseGeocoded");

            try {
                //  ? gps, ??     
                Location gps = locationMgr.getLastKnownLocation(LocationManager.GPS_PROVIDER);
                Location network = locationMgr.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);

                //  ?  ?   
                //  gps > ? > 
                if (gps != null)
                    mixContext.curLoc = gps;
                else if (network != null)
                    mixContext.curLoc = network;
                else
                    mixContext.curLoc = hardFix;

            } catch (Exception ex2) { //  ? 
                ex2.printStackTrace(); //  
                mixContext.curLoc = hardFix; //   
            }
            // ? ?  ??  
            mixContext.setLocationAtLastDownload(mixContext.curLoc);

            // ?? .   ?   
            GeomagneticField gmf = new GeomagneticField((float) mixContext.curLoc.getLatitude(),
                    (float) mixContext.curLoc.getLongitude(), (float) mixContext.curLoc.getAltitude(),
                    System.currentTimeMillis());

            // ??   
            angleY = Math.toRadians(-gmf.getDeclination());
            m4.set((float) Math.cos(angleY), 0f, (float) Math.sin(angleY), 0f, 1f, 0f,
                    (float) -Math.sin(angleY), 0f, (float) Math.cos(angleY));
            mixContext.declination = gmf.getDeclination();
        } catch (Exception ex) {
            Log.d("mixare", "GPS Initialize Error", ex); //  ? 
        }
        //  ? 
        downloadThread = new Thread(mixContext.downloadManager);
        downloadThread.start();

    } catch (Exception ex) {
        doError(ex); // ? 

        try {
            // ???  
            if (sensorMgr != null) {
                sensorMgr.unregisterListener(this, sensorGrav);
                sensorMgr.unregisterListener(this, sensorMag);
                sensorMgr = null;
            }
            //  ??   
            if (locationMgr != null) {
                locationMgr.removeUpdates(this);
                locationMgr = null;
            }
            // ??  ?? 
            if (mixContext != null) {
                if (mixContext.downloadManager != null)
                    mixContext.downloadManager.stop();
            }
        } catch (Exception ignore) {
        }
    }

    //  ?? 
    // ??   ? ( ?? ) ?    
    if (dataView.isFrozen() && searchNotificationTxt == null) {
        searchNotificationTxt = new TextView(this);
        searchNotificationTxt.setWidth(dWindow.getWidth());
        searchNotificationTxt.setPadding(10, 2, 0, 0);
        searchNotificationTxt.setBackgroundColor(Color.DKGRAY);
        searchNotificationTxt.setTextColor(Color.WHITE);

        searchNotificationTxt.setOnTouchListener(this);
        addContentView(searchNotificationTxt,
                new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    } else if (!dataView.isFrozen() && searchNotificationTxt != null) {
        searchNotificationTxt.setVisibility(View.GONE);
        searchNotificationTxt = null;
    }
}

From source file:com.ruesga.timelinechart.TimelineChartView.java

/**
 * Set the color of the background of the footer area.
 *//*  w  w  w.  j  av  a 2s  . c om*/
public void setFooterAreaBackground(int color) {
    if (mFooterAreaBgPaint.getColor() != color) {
        mFooterAreaBgPaint.setColor(color);
        mTickLabelFgPaint.setColor(MaterialPaletteHelper.isDarkColor(color) ? Color.LTGRAY : Color.DKGRAY);
        ViewCompat.postInvalidateOnAnimation(this);
    }
}

From source file:com.egloos.hyunyi.musicinfo.LinkPopUp.java

private void adjBottomColor(Drawable d) {
    Bitmap b = ((BitmapDrawable) d).getBitmap();
    int b_sum = 0;
    int g_sum = 0;
    int r_sum = 0;

    for (int i = 0; i < 10; i++) {
        int x = (int) ((double) b.getWidth() * Math.random());
        int y = (int) ((double) b.getHeight() * Math.random());
        int pixel = b.getPixel(x, y);

        int redValue = Color.red(pixel);
        int blueValue = Color.blue(pixel);
        int greenValue = Color.green(pixel);

        b_sum += blueValue;/* w  w  w. ja  v  a2s  . c  om*/
        g_sum += greenValue;
        r_sum += redValue;
    }

    int av_r = r_sum / 10;
    int av_g = g_sum / 10;
    int av_b = b_sum / 10;

    iBottomPanel.setBackgroundColor(Color.rgb(av_r, av_g, av_b));
    ArtistImage.setBackgroundColor(Color.rgb(av_r, av_g, av_b));

    int ave_sum = (av_b + av_g + av_r);
    Log.d("musicInfo", "ave_sum = " + ave_sum);

    if (ave_sum > 400) {
        tEchoNest.setTextColor(Color.parseColor("#8f363c6b"));
        for (int i = 0; i < lLinkList.getChildCount(); i++) {
            ((TextView) lLinkList.getChildAt(i)).setTextColor(Color.DKGRAY);
        }
    } else {
        tEchoNest.setTextColor(Color.parseColor("#8fc9cfff"));
        for (int i = 0; i < lLinkList.getChildCount(); i++) {
            ((TextView) lLinkList.getChildAt(i)).setTextColor(Color.LTGRAY);
        }
    }
}

From source file:org.csp.everyaware.offline.Map.java

/****************** DISEGNA PATH ****************************************************/

//draw path from a list of points
public void drawPath() {
    ExtendedLatLng newLatLng = null;//  ww  w.  ja v a  2  s. co  m
    ExtendedLatLng precLatLng = null;
    int color = Color.DKGRAY;

    try {
        Log.d("Map", "polyline count: " + mLatLngPoints.size());

        for (int i = 0; i < mLatLngPoints.size(); i++) {
            newLatLng = mLatLngPoints.get(i);
            color = Color.DKGRAY; //color for a segment without bc value

            //10 is upper limit in scale, so a black carbon of 10 (multiplied by 10) must be drawn in dark red
            if ((newLatLng.mBc > 0) && (newLatLng.mBc <= 10))
                color = ColorHelper.numberToColor(newLatLng.mBc * BC_MULTIPLIER);
            else
                color = ColorHelper.numberToColor(100);

            //draw segment with appropriate color (dark grey if no bc value is present) 
            if (precLatLng != null)
                mGoogleMap.addPolyline(new PolylineOptions().add(newLatLng.mLatLng).add(precLatLng.mLatLng)
                        .width(5).color(color));

            String annotation = newLatLng.mUserAnn;

            if (!annotation.equals("")) {
                BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.annotation_marker);
                mGoogleMap.addMarker(
                        new MarkerOptions().position(newLatLng.mLatLng).title("AQI: " + newLatLng.mBc)
                                .snippet("Annotation: " + annotation).icon(icon).anchor(0.25f, 1f)); //Map Markers are 'anchored' by default to the middle of the bottom of layout (i.e., anchor(0.5,1)).
            }

            precLatLng = newLatLng;
        }

        //center camera on last trackn position
        //if((mTrackMode)&&(mCameraTrackOn))
        try {
            mGoogleMap.animateCamera(CameraUpdateFactory
                    .newLatLngZoom(mLatLngPoints.get(mLatLngPoints.size() - 1).mLatLng, mZoom));
        } catch (NullPointerException e) {
            e.printStackTrace();
        }
    } catch (Exception e) {

    }
}

From source file:com.sentaroh.android.SMBSync2.ActivityMain.java

private void setButtonColor(Button btn) {
    if (Build.VERSION.SDK_INT < 11) {
        btn.setBackgroundColor(Color.DKGRAY);
    }
}

From source file:com.sentaroh.android.TaskAutomation.Config.ActivityMain.java

@SuppressLint("NewApi")
final private void aboutTaskAutomation() {
    // common ??/*from   w  w w.  j  a v a 2  s . com*/
    final Dialog dialog = new Dialog(this);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.about_dialog);
    ((TextView) dialog.findViewById(R.id.about_dialog_title))
            .setText(getString(R.string.msgs_about_dlg_title) + " Ver " + getApplVersionName());
    final WebView func_view = (WebView) dialog.findViewById(R.id.about_dialog_function);
    //       func_view.setWebViewClient(new WebViewClient());
    //       func_view.getSettings().setJavaScriptEnabled(true); 
    func_view.getSettings().setSupportZoom(true);
    //      func_view.setVerticalScrollbarOverlay(true);
    func_view.setBackgroundColor(Color.LTGRAY);
    //      func_view.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
    func_view.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
    func_view.setVerticalScrollBarEnabled(true);
    func_view.setScrollbarFadingEnabled(false);
    if (Build.VERSION.SDK_INT > 10) {
        func_view.getSettings().setDisplayZoomControls(true);
        func_view.getSettings().setBuiltInZoomControls(true);
    } else {
        func_view.getSettings().setBuiltInZoomControls(true);
    }
    func_view.loadUrl("file:///android_asset/" + getString(R.string.msgs_about_dlg_func_html));

    final WebView change_view = (WebView) dialog.findViewById(R.id.about_dialog_change_history);
    if (Build.VERSION.SDK_INT > 10) {
        func_view.getSettings().setDisplayZoomControls(true);
        func_view.getSettings().setBuiltInZoomControls(true);
    } else {
        func_view.getSettings().setBuiltInZoomControls(true);
    }
    change_view.loadDataWithBaseURL("file:///android_asset/", getString(R.string.msgs_about_dlg_change_desc),
            "text/html", "UTF-8", "");
    change_view.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
    change_view.getSettings().setSupportZoom(true);
    if (Build.VERSION.SDK_INT > 10) {
        change_view.getSettings().setDisplayZoomControls(true);
        change_view.getSettings().setBuiltInZoomControls(true);
    } else {
        change_view.getSettings().setBuiltInZoomControls(true);
    }

    final Button btnFunc = (Button) dialog.findViewById(R.id.about_dialog_btn_show_func);
    final Button btnChange = (Button) dialog.findViewById(R.id.about_dialog_btn_show_change);
    final Button btnOk = (Button) dialog.findViewById(R.id.about_dialog_btn_ok);

    func_view.setVisibility(TextView.VISIBLE);
    change_view.setVisibility(TextView.GONE);
    btnChange.setBackgroundResource(R.drawable.button_back_ground_color_selector);
    btnFunc.setBackgroundResource(R.drawable.button_back_ground_color_selector);
    btnChange.setTextColor(Color.DKGRAY);
    btnFunc.setTextColor(Color.GREEN);
    btnFunc.setEnabled(false);

    CommonDialog.setDlgBoxSizeLimit(dialog, true);

    // func?
    btnFunc.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            change_view.setVisibility(TextView.GONE);
            func_view.setVisibility(TextView.VISIBLE);
            CommonDialog.setDlgBoxSizeLimit(dialog, true);
            btnFunc.setTextColor(Color.GREEN);
            btnChange.setTextColor(Color.DKGRAY);
            btnChange.setEnabled(true);
            btnFunc.setEnabled(false);
        }
    });

    // change?
    btnChange.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            change_view.setVisibility(TextView.VISIBLE);
            func_view.setVisibility(TextView.GONE);
            CommonDialog.setDlgBoxSizeLimit(dialog, true);
            btnChange.setTextColor(Color.GREEN);
            btnFunc.setTextColor(Color.DKGRAY);
            btnChange.setEnabled(false);
            btnFunc.setEnabled(true);
        }
    });

    // OK?
    btnOk.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            dialog.dismiss();
        }
    });
    // Cancel?
    dialog.setOnCancelListener(new Dialog.OnCancelListener() {
        @Override
        public void onCancel(DialogInterface arg0) {
            btnOk.performClick();
        }
    });
    //      dialog.setOnKeyListener(new DialogOnKeyListener(context));
    //      dialog.setCancelable(false);
    dialog.show();

}

From source file:com.skytree.epubtest.BookViewActivity.java

public void makeSeekBox() {
    RelativeLayout.LayoutParams param = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); // width,height
    seekBox = new SkyBox(this);
    seekBox.setBoxColor(Color.DKGRAY);
    seekBox.setArrowDirection(true); // to Down Arrow
    seekBox.setArrowHeight(ps(25));//from w  w w  .jav  a  2s.c om
    param.leftMargin = ps(0);
    param.topMargin = ps(0);
    param.width = ps(300);
    param.height = ps(65);
    seekBox.setLayoutParams(param);
    // public TextView makeLabel(int id, String text, int gravity,float textSize,int textColor, int width, int height) {
    seekLabel = this.makeLabel(2000, "", Gravity.CENTER_HORIZONTAL, 13, Color.WHITE);
    this.setLocation(seekLabel, ps(10), ps(6));
    seekBox.addView(seekLabel);
    //      rv.customView.addView(seekBox);
    ePubView.addView(seekBox);
    this.hideSeekBox();
}

From source file:com.sentaroh.android.SMBSync.SMBSyncMain.java

private void aboutSMBSync() {

    // common ??//  w w w.ja va  2  s . c  om
    final Dialog dialog = new Dialog(this);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(R.layout.about_dialog);
    ((TextView) dialog.findViewById(R.id.about_dialog_title))
            .setText(getString(R.string.msgs_dlg_title_about) + "(Ver " + packageVersionName + ")");
    final WebView func_view = (WebView) dialog.findViewById(R.id.about_dialog_function);
    //      func_view.loadDataWithBaseURL("file:///android_asset/",
    //            getString(R.string.msgs_dlg_title_about_func_desc),"text/html","UTF-8","");
    func_view.loadUrl("file:///android_asset/" + getString(R.string.msgs_dlg_title_about_func_desc));
    func_view.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
    func_view.getSettings().setBuiltInZoomControls(true);

    final WebView change_view = (WebView) dialog.findViewById(R.id.about_dialog_change_history);
    change_view.loadUrl("file:///android_asset/" + getString(R.string.msgs_dlg_title_about_change_desc));
    change_view.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
    change_view.getSettings().setBuiltInZoomControls(true);

    final Button btnFunc = (Button) dialog.findViewById(R.id.about_dialog_btn_show_func);
    final Button btnChange = (Button) dialog.findViewById(R.id.about_dialog_btn_show_change);
    final Button btnOk = (Button) dialog.findViewById(R.id.about_dialog_btn_ok);

    func_view.setVisibility(TextView.VISIBLE);
    change_view.setVisibility(TextView.GONE);
    btnChange.setBackgroundResource(R.drawable.button_bg_color_selector);
    btnFunc.setBackgroundResource(R.drawable.button_bg_color_selector);
    btnChange.setTextColor(Color.DKGRAY);
    btnFunc.setTextColor(Color.GREEN);
    btnFunc.setEnabled(false);

    //      btnOk.setTextColor(Color.DKGRAY);
    //      btnOk.setTextColor(Color.GREEN);
    //      btnOk.setBackgroundResource(R.drawable.button_back_ground_color_selector);

    CommonDialog.setDlgBoxSizeLimit(dialog, true);

    // func?
    btnFunc.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            change_view.setVisibility(TextView.GONE);
            func_view.setVisibility(TextView.VISIBLE);
            CommonDialog.setDlgBoxSizeLimit(dialog, true);
            //            func_view.setEnabled(true);
            //            change_view.setEnabled(false);
            btnFunc.setTextColor(Color.GREEN);
            btnChange.setTextColor(Color.DKGRAY);
            btnChange.setEnabled(true);
            btnFunc.setEnabled(false);
        }
    });

    // change?
    btnChange.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            change_view.setVisibility(TextView.VISIBLE);
            func_view.setVisibility(TextView.GONE);
            CommonDialog.setDlgBoxSizeLimit(dialog, true);
            //            func_view.setEnabled(true);
            //            change_view.setEnabled(false);
            btnChange.setTextColor(Color.GREEN);
            btnFunc.setTextColor(Color.DKGRAY);
            btnChange.setEnabled(false);
            btnFunc.setEnabled(true);
        }
    });

    // OK?
    btnOk.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            dialog.dismiss();
        }
    });
    // Cancel?
    dialog.setOnCancelListener(new Dialog.OnCancelListener() {
        @Override
        public void onCancel(DialogInterface arg0) {
            btnOk.performClick();
        }
    });
    //      dialog.setOnKeyListener(new DialogOnKeyListener(mContext));
    //      dialog.setCancelable(false);
    dialog.show();

}

From source file:com.skytree.epubtest.BookViewActivity.java

public void makeMenuBox() {
    RelativeLayout.LayoutParams param = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); // width,height
    menuBox = new SkyBox(this);
    menuBox.setBoxColor(Color.DKGRAY);
    menuBox.setArrowHeight(ps(25));/*from   w  w  w . jav a  2s . c om*/
    menuBox.setArrowDirection(true);
    param.leftMargin = ps(100);
    param.topMargin = ps(100);
    param.width = ps(280);
    param.height = ps(85);
    menuBox.setLayoutParams(param);
    menuBox.setArrowDirection(false);
    highlightMenuButton = new Button(this);
    highlightMenuButton.setText("Highlight");
    highlightMenuButton.setId(6000);
    highlightMenuButton.setBackgroundColor(Color.TRANSPARENT);
    highlightMenuButton.setTextColor(Color.LTGRAY);
    highlightMenuButton.setTextSize(15);
    highlightMenuButton.setOnClickListener(listener);
    highlightMenuButton.setOnTouchListener(new ButtonHighlighterOnTouchListener(highlightMenuButton));
    this.setFrame(highlightMenuButton, ps(20), ps(0), ps(130), ps(65));
    menuBox.contentView.addView(highlightMenuButton);
    noteMenuButton = new Button(this);
    noteMenuButton.setText("Note");
    noteMenuButton.setId(6001);
    noteMenuButton.setBackgroundColor(Color.TRANSPARENT);
    noteMenuButton.setTextColor(Color.LTGRAY);
    noteMenuButton.setTextSize(15);
    noteMenuButton.setOnClickListener(listener);
    noteMenuButton.setOnTouchListener(new ButtonHighlighterOnTouchListener(noteMenuButton));
    this.setFrame(noteMenuButton, ps(150), ps(0), ps(130), ps(65));
    menuBox.contentView.addView(noteMenuButton);
    //      rv.customView.addView(menuBox);
    ePubView.addView(menuBox);
    this.hideMenuBox();
}

From source file:info.guardianproject.otr.app.im.app.ChatView.java

void updateWarningView() {

    int visibility = View.GONE;
    int iconVisibility = View.GONE;
    String message = null;/*from ww w.ja v  a  2s.co  m*/
    boolean isConnected;

    try {
        checkConnection();
        isConnected = (mConn == null) ? false : mConn.getState() == ImConnection.LOGGED_IN;

    } catch (Exception e) {

        isConnected = false;
    }

    if (this.isGroupChat()) {
        //anything to do here?
        /*
        visibility = View.VISIBLE;
        message = getContext().getString(R.string.this_is_a_group_chat);
        mWarningText.setTextColor(Color.WHITE);
        mStatusWarningView.setBackgroundColor(Color.LTGRAY);
        */

        mButtonAttach.setVisibility(View.GONE);

        mSendButton.setImageResource(R.drawable.ic_send_holo_light);

        mComposeMessage.setHint(R.string.this_is_a_group_chat);

    } else if (mCurrentChatSession != null) {
        IOtrChatSession otrChatSession = null;

        try {
            otrChatSession = mCurrentChatSession.getOtrChatSession();

            //check if the chat is otr or not
            if (otrChatSession != null) {
                try {
                    mLastSessionStatus = SessionStatus.values()[otrChatSession.getChatStatus()];
                } catch (RemoteException e) {
                    Log.w("Gibber", "Unable to call remote OtrChatSession from ChatView", e);
                }
            }

        } catch (RemoteException e) {
            LogCleaner.error(ImApp.LOG_TAG, "error getting OTR session in ChatView", e);
        }

        if (mContactType == Imps.Contacts.TYPE_GROUP) {
            message = "";
        } else if ((mSubscriptionType == Imps.Contacts.SUBSCRIPTION_TYPE_FROM)) {
            bindSubscription(mProviderId, mRemoteAddress);
            visibility = View.VISIBLE;
            //message = mContext.getString(R.string.contact_not_in_list_warning, mRemoteNickname);
            //mWarningText.setTextColor(Color.WHITE);
            //mStatusWarningView.setBackgroundColor(Color.DKGRAY);

        } else {

            visibility = View.GONE;

        }

        if (mLastSessionStatus == SessionStatus.PLAINTEXT) {

            mSendButton.setImageResource(R.drawable.ic_send_holo_light);
            mComposeMessage.setHint(R.string.compose_hint);

        } else if (mLastSessionStatus == SessionStatus.ENCRYPTED) {

            if (mIsStartingOtr) {
                mIsStartingOtr = false; //it's started!
                mProgressBarOtr.setVisibility(View.GONE);
            }

            mComposeMessage.setHint(R.string.compose_hint_secure);
            mSendButton.setImageResource(R.drawable.ic_send_secure);

            try {
                String rFingerprint = otrChatSession.getRemoteFingerprint();
                mIsVerified = otrChatSession.isKeyVerified(mRemoteAddress);

            } catch (RemoteException re) {
            }

        } else if (mLastSessionStatus == SessionStatus.FINISHED) {

            mSendButton.setImageResource(R.drawable.ic_send_holo_light);
            mComposeMessage.setHint(R.string.compose_hint);

            mWarningText.setTextColor(Color.WHITE);
            mStatusWarningView.setBackgroundColor(Color.DKGRAY);
            message = mContext.getString(R.string.otr_session_status_finished);

            visibility = View.VISIBLE;
        }

    }

    if (!isConnected) {
        //  visibility = View.VISIBLE;
        //   iconVisibility = View.VISIBLE;
        // mWarningText.setTextColor(Color.WHITE);
        // mStatusWarningView.setBackgroundColor(Color.DKGRAY);
        // message = mContext.getString(R.string.disconnected_warning);
        mComposeMessage.setHint(R.string.error_suspended_connection);

    }

    mStatusWarningView.setVisibility(visibility);

    if (visibility == View.VISIBLE) {
        if (message != null && message.length() > 0) {
            mWarningText.setText(message);
            mWarningText.setVisibility(View.VISIBLE);
        } else {
            mWarningText.setVisibility(View.GONE);
        }
    }

    mNewChatActivity.updateEncryptionMenuState();

}