Example usage for android.graphics Color LTGRAY

List of usage examples for android.graphics Color LTGRAY

Introduction

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

Prototype

int LTGRAY

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

Click Source Link

Usage

From source file:plugin.google.maps.GoogleMaps.java

@SuppressWarnings("unused")
private void showDialog(final JSONArray args, final CallbackContext callbackContext) {
    if (windowLayer != null) {
        return;/*from w  w w . j a  va 2  s.  c  om*/
    }

    // window layout
    windowLayer = new LinearLayout(activity);
    windowLayer.setPadding(0, 0, 0, 0);
    LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    layoutParams.gravity = Gravity.TOP | Gravity.LEFT;
    windowLayer.setLayoutParams(layoutParams);

    // dialog window layer
    FrameLayout dialogLayer = new FrameLayout(activity);
    dialogLayer.setLayoutParams(layoutParams);
    //dialogLayer.setPadding(15, 15, 15, 0);
    dialogLayer.setBackgroundColor(Color.LTGRAY);
    windowLayer.addView(dialogLayer);

    // map frame
    final FrameLayout mapFrame = new FrameLayout(activity);
    mapFrame.setPadding(0, 0, 0, (int) (40 * density));
    dialogLayer.addView(mapFrame);

    if (this.mPluginLayout != null && this.mPluginLayout.getMyView() != null) {
        this.mPluginLayout.detachMyView();
    }

    ViewGroup.LayoutParams lParams = (ViewGroup.LayoutParams) mapView.getLayoutParams();
    if (lParams == null) {
        lParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT);
    }
    lParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
    lParams.height = ViewGroup.LayoutParams.MATCH_PARENT;
    if (lParams instanceof AbsoluteLayout.LayoutParams) {
        AbsoluteLayout.LayoutParams params = (AbsoluteLayout.LayoutParams) lParams;
        params.x = 0;
        params.y = 0;
        mapView.setLayoutParams(params);
    } else if (lParams instanceof LinearLayout.LayoutParams) {
        LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) lParams;
        params.topMargin = 0;
        params.leftMargin = 0;
        mapView.setLayoutParams(params);
    } else if (lParams instanceof FrameLayout.LayoutParams) {
        FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) lParams;
        params.topMargin = 0;
        params.leftMargin = 0;
        mapView.setLayoutParams(params);
    }
    mapFrame.addView(this.mapView);

    // button frame
    LinearLayout buttonFrame = new LinearLayout(activity);
    buttonFrame.setOrientation(LinearLayout.HORIZONTAL);
    buttonFrame.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM);
    LinearLayout.LayoutParams buttonFrameParams = new LinearLayout.LayoutParams(
            LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
    buttonFrame.setLayoutParams(buttonFrameParams);
    dialogLayer.addView(buttonFrame);

    //close button
    LinearLayout.LayoutParams buttonParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
            LayoutParams.WRAP_CONTENT, 1.0f);
    TextView closeLink = new TextView(activity);
    closeLink.setText("Close");
    closeLink.setLayoutParams(buttonParams);
    closeLink.setTextColor(Color.BLUE);
    closeLink.setTextSize(20);
    closeLink.setGravity(Gravity.LEFT);
    closeLink.setPadding((int) (10 * density), 0, 0, (int) (10 * density));
    closeLink.setOnClickListener(GoogleMaps.this);
    closeLink.setId(CLOSE_LINK_ID);
    buttonFrame.addView(closeLink);

    //license button
    TextView licenseLink = new TextView(activity);
    licenseLink.setText("Legal Notices");
    licenseLink.setTextColor(Color.BLUE);
    licenseLink.setLayoutParams(buttonParams);
    licenseLink.setTextSize(20);
    licenseLink.setGravity(Gravity.RIGHT);
    licenseLink.setPadding((int) (10 * density), (int) (20 * density), (int) (10 * density),
            (int) (10 * density));
    licenseLink.setOnClickListener(GoogleMaps.this);
    licenseLink.setId(LICENSE_LINK_ID);
    buttonFrame.addView(licenseLink);

    webView.setVisibility(View.GONE);
    root.addView(windowLayer);

    //Dummy view for the back-button event
    FrameLayout dummyLayout = new FrameLayout(activity);

    /*
    this.webView.showCustomView(dummyLayout, new WebChromeClient.CustomViewCallback() {
            
      @Override
      public void onCustomViewHidden() {
        mapFrame.removeView(mapView);
        if (mPluginLayout != null &&
    mapDivLayoutJSON != null) {
          mPluginLayout.attachMyView(mapView);
          mPluginLayout.updateViewPosition();
        }
        root.removeView(windowLayer);
        webView.setVisibility(View.VISIBLE);
        windowLayer = null;
                
                
        GoogleMaps.this.onMapEvent("map_close");
      }
    });
    */

    this.sendNoResult(callbackContext);
}

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

/**
 * Set the color of the background of the footer area.
 *///from  w  w  w  .  j  a  va  2s. com
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  a2 s .co  m
        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:com.sentaroh.android.TaskAutomation.Config.ActivityMain.java

@SuppressLint("NewApi")
final private void aboutTaskAutomation() {
    // common ??/*from  ww w  .  ja  v  a 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_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 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. j  av a 2  s.  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:com.hichinaschool.flashcards.anki.StudyOptionsFragment.java

private void updateChart(double[][] serieslist) {
    if (mSmallChart != null) {
        Resources res = getResources();
        XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
        XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
        XYSeriesRenderer r = new XYSeriesRenderer();
        r.setColor(res.getColor(R.color.stats_young));
        renderer.addSeriesRenderer(r);//www  .  j a  v a 2 s .c om
        r = new XYSeriesRenderer();
        r.setColor(res.getColor(R.color.stats_mature));
        renderer.addSeriesRenderer(r);

        for (int i = 1; i < serieslist.length; i++) {
            XYSeries series = new XYSeries("");
            for (int j = 0; j < serieslist[i].length; j++) {
                series.add(serieslist[0][j], serieslist[i][j]);
            }
            dataset.addSeries(series);
        }
        renderer.setBarSpacing(0.4);
        renderer.setShowLegend(false);
        renderer.setLabelsTextSize(13);
        renderer.setXAxisMin(-0.5);
        renderer.setXAxisMax(7.5);
        renderer.setYAxisMin(0);
        renderer.setGridColor(Color.LTGRAY);
        renderer.setShowGrid(true);
        renderer.setBackgroundColor(Color.WHITE);
        renderer.setMarginsColor(Color.WHITE);
        renderer.setAxesColor(Color.BLACK);
        renderer.setLabelsColor(Color.BLACK);
        renderer.setYLabelsColor(0, Color.BLACK);
        renderer.setYLabelsAngle(-90);
        renderer.setXLabelsColor(Color.BLACK);
        renderer.setXLabelsAlign(Align.CENTER);
        renderer.setYLabelsAlign(Align.CENTER);
        renderer.setZoomEnabled(false, false);
        // mRenderer.setMargins(new int[] { 15, 48, 30, 10 });
        renderer.setAntialiasing(true);
        renderer.setPanEnabled(true, false);
        GraphicalView chartView = ChartFactory.getBarChartView(getActivity(), dataset, renderer,
                BarChart.Type.STACKED);
        mSmallChart.addView(chartView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
        if (mDeckChart.getVisibility() == View.INVISIBLE) {
            mDeckChart.setVisibility(View.VISIBLE);
            mDeckChart.setAnimation(ViewAnimation.fade(ViewAnimation.FADE_IN, 500, 0));
        }
    }
}

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

final private void browseProfile() {
    mDialog.setContentView(R.layout.edit_profile_action_dlg);

    final TextView dlg_title = (TextView) mDialog.findViewById(R.id.edit_profile_action_title);
    dlg_title.setText(mGlblParms.context.getString(R.string.msgs_edit_profile_hdr_browse_action));
    final EditText dlg_prof_name_et = (EditText) mDialog.findViewById(R.id.edit_profile_action_profile_et_name);
    dlg_prof_name_et.setText(mCurrentProfileListItem.getProfileName());
    dlg_prof_name_et.setEnabled(false);//from ww w.j av a  2  s  .  co  m
    dlg_prof_name_et.setTextColor(Color.WHITE);
    dlg_title.setText(mGlblParms.context.getString(R.string.msgs_edit_profile_hdr_browse_action));

    final ArrayList<DataArrayEditListItem> comp_data_list = new ArrayList<DataArrayEditListItem>();
    final ArrayList<ActivityExtraDataItem> aed_edit_list = new ArrayList<ActivityExtraDataItem>();

    final CheckBox cb_active = (CheckBox) mDialog.findViewById(R.id.edit_profile_action_enabled);
    //      final TextView tv_sound_filename=(TextView)mDialog.findViewById(R.id.edit_profile_action_exec_sound_file_name);
    final CheckBox cb_music_vol = (CheckBox) mDialog
            .findViewById(R.id.edit_profile_action_profile_sound_use_volume);
    final SeekBar sb_music_vol = (SeekBar) mDialog.findViewById(R.id.edit_profile_action_profile_sound_volume);
    final Button playBtnMusic = (Button) mDialog.findViewById(R.id.edit_profile_action_profile_sound_play_back);
    final Button playBtnRingtone = (Button) mDialog
            .findViewById(R.id.edit_profile_action_profile_ringtone_play_back);
    final CheckBox cb_ringtone_vol = (CheckBox) mDialog
            .findViewById(R.id.edit_profile_action_profile_ringtone_use_volume);
    final SeekBar sb_ringtone_vol = (SeekBar) mDialog
            .findViewById(R.id.edit_profile_action_profile_ringtone_volume);
    final Spinner spinnerActionType = (Spinner) mDialog.findViewById(R.id.edit_profile_action_action_type);
    final Spinner spinnerActivityName = (Spinner) mDialog
            .findViewById(R.id.edit_profile_action_exec_activity_name);
    final Spinner spinnerActivityDataType = (Spinner) mDialog
            .findViewById(R.id.edit_profile_action_exec_activity_data_type);
    final Spinner spinnerRingtoneType = (Spinner) mDialog
            .findViewById(R.id.edit_profile_action_exec_ringtone_type);
    final Spinner spinnerRingtoneName = (Spinner) mDialog
            .findViewById(R.id.edit_profile_action_exec_ringtone_name);
    //        final Spinner spinnerCompareType = (Spinner) mDialog.findViewById(R.id.edit_profile_action_compare_type);
    //        final EditText et_comp_value1=(EditText)mDialog.findViewById(R.id.edit_profile_action_compare_value1);
    //        final EditText et_comp_value2=(EditText)mDialog.findViewById(R.id.edit_profile_action_compare_value2);
    //        final ListView lv_comp_data=(ListView)mDialog.findViewById(R.id.edit_profile_action_compare_value_listview);
    //        final Spinner spinnerCompareResult = (Spinner) mDialog.findViewById(R.id.edit_profile_action_compare_result);
    //        final Spinner spinnerCompareTarget = (Spinner) mDialog.findViewById(R.id.edit_profile_action_compare_target);
    //        final Spinner spinnerMessageType = (Spinner) mDialog.findViewById(R.id.edit_profile_action_message_type);
    //        final EditText et_msg_text=(EditText)mDialog.findViewById(R.id.edit_profile_action_message_message);
    //        final CheckBox cb_vib_used=(CheckBox)mDialog.findViewById(R.id.edit_profile_action_message_vibration);
    //        final CheckBox cb_led_used=(CheckBox)mDialog.findViewById(R.id.edit_profile_action_message_led);
    //        final RadioButton rb_msg_blue=(RadioButton)mDialog.findViewById(R.id.edit_profile_action_message_led_blue);
    //        final RadioButton rb_msg_red=(RadioButton)mDialog.findViewById(R.id.edit_profile_action_message_led_red);
    //        final RadioButton rb_msg_green=(RadioButton)mDialog.findViewById(R.id.edit_profile_action_message_led_green);
    //        final Spinner spinnerTimeType = (Spinner) mDialog.findViewById(R.id.edit_profile_action_time_type);
    //        final Spinner spinnerTimeTarget = (Spinner) mDialog.findViewById(R.id.edit_profile_action_time_target);
    //        final Spinner spinnerTaskType = (Spinner) mDialog.findViewById(R.id.edit_profile_action_task_type);
    //        final Spinner spinnerTaskTarget = (Spinner) mDialog.findViewById(R.id.edit_profile_action_task_target);
    //        final Spinner spinnerWaitTarget = (Spinner) mDialog.findViewById(R.id.edit_profile_action_wait_target);
    //        final Spinner spinnerWaitTimeoutType = (Spinner) mDialog.findViewById(R.id.edit_profile_action_wait_timeout);
    //        final Spinner spinnerWaitTimeoutValue = (Spinner) mDialog.findViewById(R.id.edit_profile_action_wait_timeout_value);
    //        final Spinner spinnerWaitTimeoutUnits = (Spinner) mDialog.findViewById(R.id.edit_profile_action_wait_timeout_units);
    final Spinner spinnerCatMethod = (Spinner) mDialog
            .findViewById(R.id.edit_profile_action_dlg_bsh_cat_method);
    final Spinner spinnerAddMethod = (Spinner) mDialog
            .findViewById(R.id.edit_profile_action_dlg_bsh_add_method);
    final EditText et_bsh_script = (EditText) mDialog
            .findViewById(R.id.edit_profile_action_dlg_bsh_script_text);

    final CustomSpinnerAdapter adapterActionType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterActivityName = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterActivityDataType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterRingtoneType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterRingtoneName = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterCompareType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    mGlblParms.actionCompareDataAdapter = new AdapterDataArrayEditList(mGlblParms.context,
            R.layout.data_array_edit_list_item, comp_data_list);
    final CustomSpinnerAdapter adapterCompareResult = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterCompareTarget = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterMessageType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterTimeType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterTimeTarget = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterTaskType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterTaskTarget = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterWaitTarget = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterWaitTimeoutType = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterWaitTimeoutValue = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);
    final CustomSpinnerAdapter adapterWaitTimeoutUnits = new CustomSpinnerAdapter(mGlblParms.context,
            R.layout.custom_simple_spinner_item);

    initProfileActionWidget(mGlblParms, mDialog, mCurrentProfileListItem, comp_data_list, aed_edit_list,
            mCurrentGroup, mGlblParms.profileAdapter, adapterActionType, adapterActivityName,
            adapterActivityDataType, adapterRingtoneType, adapterRingtoneName, adapterCompareType,
            adapterCompareResult, adapterCompareTarget, adapterMessageType, adapterTimeType, adapterTimeTarget,
            adapterTaskType, adapterTaskTarget, adapterWaitTarget, adapterWaitTimeoutType,
            adapterWaitTimeoutValue, adapterWaitTimeoutUnits);

    cb_active.setClickable(false);
    cb_music_vol.setClickable(false);
    sb_music_vol.setEnabled(false);
    playBtnMusic.setVisibility(Button.GONE);
    playBtnRingtone.setVisibility(Button.GONE);
    cb_ringtone_vol.setClickable(false);
    sb_ringtone_vol.setClickable(false);
    spinnerActionType.setClickable(false);
    spinnerActivityName.setClickable(false);
    spinnerActivityDataType.setClickable(false);
    spinnerRingtoneType.setClickable(false);
    spinnerRingtoneName.setClickable(false);

    setProfileActionActivityListener(mGlblParms, mDialog, mGlblParms.profileAdapter, mCurrentGroup,
            aed_edit_list);
    setProfileActionCompareListener(mGlblParms, mDialog, mGlblParms.profileAdapter, mCurrentGroup,
            adapterCompareType, mCurrentProfileListItem.getActionCompareType());
    setProfileActionMessageListener(mGlblParms, mDialog, mGlblParms.profileAdapter, mCurrentGroup);
    setProfileActionTimeListener(mGlblParms, mDialog, mGlblParms.profileAdapter, mCurrentGroup);
    setProfileActionTaskListener(mGlblParms, mDialog, mGlblParms.profileAdapter, mCurrentGroup, adapterTaskType,
            adapterTaskTarget, mCurrentProfileListItem.getActionTaskTarget());
    ProfileMaintenance.setProfileActionTestExecListener(mGlblParms, mDialog, mGlblParms.profileAdapter,
            mCurrentGroup, aed_edit_list);
    setProfileActionWaitListener(mGlblParms, mDialog);
    setProfileActionBshListener(mGlblParms, mDialog, mGlblParms.profileAdapter, mCurrentGroup,
            mCurrentProfileListItem);
    et_bsh_script.setEnabled(false);
    et_bsh_script.setTextColor(Color.LTGRAY);
    spinnerCatMethod.setVisibility(Spinner.GONE);
    spinnerAddMethod.setVisibility(Spinner.GONE);

    setViewVisibilityByActionType(mGlblParms, mDialog, mCurrentProfileListItem.getActionType(),
            mCurrentProfileListItem.getActionActivityDataType());
    setActionTypeSelectionListner(mGlblParms, mDialog, spinnerActionType, adapterActionType,
            spinnerActivityDataType, adapterActivityDataType);
    ProfileMaintenance.setActionRingtoneTypeSelectionListener(mGlblParms, mDialog, spinnerRingtoneType,
            spinnerRingtoneName, adapterRingtoneName);

    // Music Listing?
    Button btnListSound = (Button) mDialog.findViewById(R.id.edit_profile_action_list_sound);
    btnListSound.setVisibility(Button.GONE);
    // CANCEL?
    final Button btnCancel = (Button) mDialog.findViewById(R.id.edit_profile_action_cancel_btn);
    btnCancel.setOnClickListener(new View.OnClickListener() {
        final public void onClick(View v) {
            ProfileMaintenance.stopMusicPlayBack(mGlblParms);
            ProfileMaintenance.stopRingtonePlayBack(mGlblParms);
            mFragment.dismiss();
        }
    });
    Button btnOk = (Button) mDialog.findViewById(R.id.edit_profile_action_ok_btn);
    btnOk.setVisibility(Button.GONE);

}

From source file:com.t2.compassionMeditation.Graphs1Activity.java

public void onButtonClick(View v) {
    final int id = v.getId();
    switch (id) {
    //          case R.id.buttonBack:
    //             finish();
    //             
    //             break;
    //                    
    case R.id.buttonAddMeasure:

        boolean toggleArray[] = new boolean[mBioParameters.size()];
        for (int j = 0; j < mBioParameters.size(); ++j) {
            GraphBioParameter item = mBioParameters.get(j);
            if (item.visible)
                toggleArray[j] = true;//from   www.j  a  v a 2 s  . c o  m
            else
                toggleArray[j] = false;
        }

        String[] measureNames = new String[mBioParameters.size()];
        int i = 0;
        for (GraphBioParameter item : mBioParameters) {
            measureNames[i++] = item.title1;
        }

        // Present dialog to allow user to choose which parameters to view in this activity
        AlertDialog.Builder alert = new AlertDialog.Builder(this);
        alert.setTitle(R.string.alert_dialog_measure_selector);
        //             alert.setMultiChoiceItems(R.array.measure_select_dialog_items,
        alert.setMultiChoiceItems(measureNames, toggleArray, new DialogInterface.OnMultiChoiceClickListener() {

            public void onClick(DialogInterface dialog, int whichButton, boolean isChecked) {

                GraphBioParameter item = mBioParameters.get(whichButton);
                item.visible = item.visible ? false : true;
                saveVisibleKeyIds();
                generateChart();
            }
        });
        alert.setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                generateChart();
            }
        });

        alert.show();

        break;

    case R.id.buttonPause:
        if (mPaused == true) {
            mPaused = false;
            mPauseButton.getBackground().setColorFilter(Color.LTGRAY, PorterDuff.Mode.MULTIPLY);
            mPauseButton.setText(R.string.button_running);
            if (mLoggingEnabled) {
                try {
                    mDataOutHandler.logNote(getString(R.string.un_paused));
                } catch (DataOutHandlerException e) {
                    Log.e(TAG, e.toString());
                    e.printStackTrace();
                } // data header
            }
            if (mLogCatEnabled) {
                Log.d(TAG, "Un-Paused");
            }
        } else {
            mPaused = true;
            mPauseButton.getBackground().setColorFilter(0xFFFF0000, PorterDuff.Mode.MULTIPLY);
            mPauseButton.setText(R.string.button_pause);
            if (mLoggingEnabled) {
                try {
                    mDataOutHandler.logNote(getString(R.string.paused));
                } catch (DataOutHandlerException e) {
                    Log.e(TAG, e.toString());
                    e.printStackTrace();
                } // data header
            }
            if (mLogCatEnabled) {
                Log.d(TAG, "Paused");
            }
        }
        break;
    } // End switch      
}

From source file:saphion.services.ForegroundService.java

private XYMultipleSeriesRenderer getRenderer() {
    XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
    renderer.setAxisTitleTextSize(getDimension(10.67f));
    renderer.setChartTitleTextSize(getDimension(13.34f));
    renderer.setPointSize(0f);//from www  .  j  a  va 2 s  .  co  m
    renderer.setMargins(new int[] { (int) getDimension(20f), // 13.34
            (int) getDimension(33.34f), (int) getDimension(1f), // 10
            (int) getDimension(6.67f) });
    XYSeriesRenderer r = new XYSeriesRenderer();
    r.setColor(0xff1e8bd4);

    renderer.setBackgroundColor(0x00000000);
    // renderer.setApplyBackgroundColor(true);
    /* r.setFillBelowLine(true); */
    FillOutsideLine fol = new FillOutsideLine(XYSeriesRenderer.FillOutsideLine.Type.BOUNDS_ALL);
    fol.setColor(0xa01e8bd4);
    r.addFillOutsideLine(fol);
    renderer.setYLabelsAlign(Align.RIGHT);

    // r.setFillBelowLineColor(0xff21637c);
    r.setLineWidth(getDimension(2.67f));
    renderer.setMarginsColor(0xff111111);
    renderer.setLabelsTextSize(getDimension(10f));

    if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
        renderer.setXLabels(5);
    } else {
        renderer.setXLabels(6);
    }

    renderer.setYLabels(11);
    renderer.addSeriesRenderer(r);
    renderer.setShowGrid(true);
    renderer.setShowLegend(false);
    renderer.setInScroll(true);

    r = new XYSeriesRenderer();
    r.setPointStyle(PointStyle.POINT);
    r.setLineWidth(4);

    if (isconnected) {
        r.setColor(0xff17699f);
        FillOutsideLine fol1 = new FillOutsideLine(XYSeriesRenderer.FillOutsideLine.Type.BOUNDS_ALL);
        fol1.setColor(0xa017699f);
        r.addFillOutsideLine(fol1);

    } else {

        r.setColor(0xffff4444);
        FillOutsideLine fol2 = new FillOutsideLine(XYSeriesRenderer.FillOutsideLine.Type.BOUNDS_ALL);
        fol2.setColor(0xa0ff4444);
        r.addFillOutsideLine(fol2);
    }

    renderer.setPanEnabled(true, false);
    renderer.setShowAxes(true);
    renderer.setAntialiasing(true);
    renderer.setZoomEnabled(true, false);
    renderer.setYAxisMax(100);
    renderer.setYAxisMin(0);
    renderer.setTextTypeface(Typeface.createFromAsset(getAssets(), Constants.FONT_ROBOTO_COND));

    renderer.addSeriesRenderer(r);

    renderer.setXAxisMax(lastentry + 1800000);

    for (int i = 0; i <= 100; i = i + 10)
        renderer.addYTextLabel(i, i + " %");

    renderer.setAxesColor(Color.WHITE);
    renderer.setLabelsColor(Color.LTGRAY);
    renderer.setInScroll(false);
    return renderer;
}

From source file:com.hanbing.library.android.view.CustomTabLayout23.java

protected int getIndicatorLeft(View tabView, int position) {
    tabView.setBackgroundColor(Color.LTGRAY);
    ((ViewGroup) tabView).getChildAt(1).setBackgroundColor(Color.GRAY);
    return ((ViewGroup) tabView).getChildAt(1).getLeft() + tabView.getLeft();
}