Example usage for android.graphics Color TRANSPARENT

List of usage examples for android.graphics Color TRANSPARENT

Introduction

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

Prototype

int TRANSPARENT

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

Click Source Link

Usage

From source file:com.mindorks.framework.mvp.ui.base.BaseDialog.java

@NonNull
@Override/*  ww w . ja v a  2  s. c o m*/
public Dialog onCreateDialog(Bundle savedInstanceState) {
    // the content
    final RelativeLayout root = new RelativeLayout(getActivity());
    root.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.WRAP_CONTENT));

    // creating the fullscreen dialog
    final Dialog dialog = new Dialog(getContext());
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(root);
    if (dialog.getWindow() != null) {
        dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    }
    dialog.setCanceledOnTouchOutside(false);

    return dialog;
}

From source file:com.htc.dotdesign.DrawingView.java

public void reset() {
    unregisterForToolBoxChange(mContext);
    if (mAlertDialog != null) {
        mAlertDialog.dismiss();/*w ww.  ja v a2  s  .c  o m*/
        mAlertDialog = null;
    }
    dismissLoadingDlg();
    mCurrBrushColor = Color.TRANSPARENT;
    mEraseColor = Color.TRANSPARENT;
}

From source file:com.abcvoipsip.ui.account.AccountsEditListFragment.java

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

    //getListView().setSelector(R.drawable.transparent);
    getListView().setCacheColorHint(Color.TRANSPARENT);

    // View management
    View detailsFrame = getActivity().findViewById(R.id.details);
    dualPane = detailsFrame != null && detailsFrame.getVisibility() == View.VISIBLE;

    if (savedInstanceState != null) {
        // Restore last state for checked position.
        curCheckPosition = savedInstanceState.getLong(CURRENT_CHOICE, SipProfile.INVALID_ID);
        //curCheckWizard = savedInstanceState.getString(CURRENT_WIZARD);
    }/*w ww.ja va  2s.  c o  m*/

    AccountsEditListAdapter adapter = new AccountsEditListAdapter(getActivity(), null);
    adapter.setOnCheckedRowListener(this);
    //getListView().setEmptyView(getActivity().findViewById(R.id.progress_container));
    //getActivity().findViewById(android.R.id.empty).setVisibility(View.GONE);
    setListAdapter(adapter);
    registerForContextMenu(getListView());

    // Prepare the loader.  Either re-connect with an existing one,
    // or start a new one.
    getLoaderManager().initLoader(0, null, this);

    getListView().setVerticalFadingEdgeEnabled(true);

    if (dualPane) {
        // In dual-pane mode, the list view highlights the selected item.
        Log.d("lp", "dual pane mode");
        getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        //getListView().setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_LEFT);
        getListView().setVerticalScrollBarEnabled(false);
        getListView().setFadingEdgeLength(50);

        updateCheckedItem();
        // Make sure our UI is in the correct state.
        //showDetails(curCheckPosition, curCheckWizard);
    } else {
        //getListView().setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_RIGHT);
        getListView().setVerticalScrollBarEnabled(true);
        getListView().setFadingEdgeLength(100);
    }
}

From source file:com.miz.mizuu.TvShowEpisodeDetails.java

@Override
public void onCreate(Bundle savedInstanceState) {
    mBus = MizuuApplication.getBus();/*from w  w w.  ja  va2 s .  co m*/
    super.onCreate(savedInstanceState);

    // Set theme
    setTheme(R.style.Mizuu_Theme_NoBackground);

    ViewUtils.setupWindowFlagsForStatusbarOverlay(getWindow(), true);

    ViewUtils.setProperToolbarSize(this, mToolbar);

    mShowId = getIntent().getExtras().getString(SHOW_ID);
    mSeason = getIntent().getExtras().getInt("season");
    mEpisode = getIntent().getExtras().getInt("episode");

    mDatabaseHelper = MizuuApplication.getTvEpisodeDbAdapter();

    Cursor cursor = mDatabaseHelper.getEpisodes(mShowId);
    try {
        while (cursor.moveToNext()) {
            mEpisodes.add(new TvShowEpisode(this, mShowId,
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE_TITLE)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE_PLOT)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_SEASON)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE_AIRDATE)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE_DIRECTOR)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE_WRITER)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE_GUESTSTARS)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_EPISODE_RATING)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_HAS_WATCHED)),
                    cursor.getString(cursor.getColumnIndex(DbAdapterTvShowEpisodes.KEY_FAVOURITE))));
        }
    } catch (Exception e) {
    } finally {
        cursor.close();
    }

    mShowTitle = MizuuApplication.getTvDbAdapter().getShowTitle(mShowId);
    setTitle(mShowTitle);

    mViewPager = (ViewPager) findViewById(R.id.awesomepager);
    mViewPager.setAdapter(new TvShowEpisodeDetailsAdapter(getSupportFragmentManager()));
    mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
        @Override
        public void onPageSelected(int position) {
            ViewUtils.updateToolbarBackground(TvShowEpisodeDetails.this, mToolbar, 0,
                    mEpisodes.get(position).getTitle(), Color.TRANSPARENT);
        }
    });

    if (savedInstanceState != null) {
        mViewPager.setCurrentItem(savedInstanceState.getInt("tab", 0));
    } else {
        for (int i = 0; i < mEpisodes.size(); i++) {
            if (mEpisodes.get(i).getSeason().equals(MizLib.addIndexZero(mSeason))
                    && mEpisodes.get(i).getEpisode().equals(MizLib.addIndexZero(mEpisode))) {
                mViewPager.setCurrentItem(i);
                break;
            }
        }
    }
}

From source file:com.app.sample.chatting.activity.chat.FacePageFragment.java

@Override
protected void initWidget(View rootView) {
    super.initWidget(rootView);
    mPagerFace = (ViewPager) rootView.findViewById(R.id.frag_pager_face);
    pagePointLayout = (LinearLayout) rootView.findViewById(R.id.frag_point);

    int total = datas.size();
    int pages = total / ITEM_PAGE_COUNT + (total % ITEM_PAGE_COUNT == 0 ? 0 : 1);

    allPageViews = new GridView[pages];
    pointViews = new RadioButton[pages];

    for (int x = 0; x < pages; x++) {
        int start = x * ITEM_PAGE_COUNT;
        int end = (start + ITEM_PAGE_COUNT) > total ? total : (start + ITEM_PAGE_COUNT);
        final List<Faceicon> itemDatas = datas.subList(start, end);
        GridView view = new GridView(aty);
        FaceAdapter faceAdapter = new FaceAdapter(view, itemDatas);
        view.setAdapter(faceAdapter);/*from w  w  w.j a  v  a  2  s.  c  o  m*/

        view.setNumColumns(4);
        view.setBackgroundColor(Color.TRANSPARENT);
        view.setHorizontalSpacing(1);
        view.setVerticalSpacing(1);
        view.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
        view.setCacheColorHint(0);
        view.setVerticalScrollBarEnabled(false);
        view.setPadding(5, 0, 5, 0);
        view.setSelector(new ColorDrawable(Color.TRANSPARENT));
        view.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
        view.setGravity(Gravity.CENTER);

        view.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                if (listener != null) {
                    listener.selectedFace(itemDatas.get(position));
                }
            }
        });
        allPageViews[x] = view;

        RadioButton tip = new RadioButton(aty);
        tip.setBackgroundResource(R.drawable.selector_bg_tip);
        RadioGroup.LayoutParams layoutParams = new RadioGroup.LayoutParams(8, 8);
        layoutParams.leftMargin = 10;
        pagePointLayout.addView(tip, layoutParams);
        if (x == 0) {
            tip.setChecked(true);
        }
        pointViews[x] = tip;
    }

    PagerAdapter facePagerAdapter = new FacePagerAdapter(allPageViews);
    mPagerFace.setAdapter(facePagerAdapter);
    mPagerFace.setOnPageChangeListener(new OnPageChangeListener() {

        @Override
        public void onPageSelected(int index) {
            pointViews[index].setChecked(true);
        }

        @Override
        public void onPageScrolled(int arg0, float arg1, int arg2) {
        }

        @Override
        public void onPageScrollStateChanged(int arg0) {
        }
    });
}

From source file:com.csipsimple.ui.account.AccountsEditListFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    ListView lv = getListView();/*from   ww w  .j  a  v  a  2s.  c  om*/

    //getListView().setSelector(R.drawable.transparent);
    lv.setCacheColorHint(Color.TRANSPARENT);

    // View management
    View detailsFrame = getActivity().findViewById(R.id.details);
    dualPane = detailsFrame != null && detailsFrame.getVisibility() == View.VISIBLE;

    if (savedInstanceState != null) {
        // Restore last state for checked position.
        curCheckPosition = savedInstanceState.getLong(CURRENT_CHOICE, SipProfile.INVALID_ID);
        //curCheckWizard = savedInstanceState.getString(CURRENT_WIZARD);
    }
    setListShown(false);
    if (mAdapter == null) {
        if (mHeaderView != null) {
            lv.addHeaderView(mHeaderView, null, true);
        }
        mAdapter = new AccountsEditListAdapter(getActivity(), null);
        mAdapter.setOnCheckedRowListener(this);
        //getListView().setEmptyView(getActivity().findViewById(R.id.progress_container));
        //getActivity().findViewById(android.R.id.empty).setVisibility(View.GONE);
        setListAdapter(mAdapter);
        registerForContextMenu(lv);

        // Prepare the loader.  Either re-connect with an existing one,
        // or start a new one.
        getLoaderManager().initLoader(0, null, this);

        lv.setVerticalFadingEdgeEnabled(true);
    }

    if (dualPane) {
        // In dual-pane mode, the list view highlights the selected item.
        Log.d("lp", "dual pane mode");
        lv.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        //lv.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_LEFT);
        lv.setVerticalScrollBarEnabled(false);
        lv.setFadingEdgeLength(50);

        updateCheckedItem();
        // Make sure our UI is in the correct state.
        //showDetails(curCheckPosition, curCheckWizard);
    } else {
        //getListView().setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_RIGHT);
        lv.setVerticalScrollBarEnabled(true);
        lv.setFadingEdgeLength(100);
    }
}

From source file:com.blockhead.gussilva.threemorewords.GameActivity.java

public void createAnswerView(String currWord, TextView[] currAnswerView, LinearLayout currWordLayout) {
    //Set TextViews text to letter of the answer for Word 1
    for (int c = 0; c < currWord.length(); c++) {
        currAnswerView[c] = new TextView(this);
        currAnswerView[c].setText("" + currWord.charAt(c));

        //Set TextView Properties
        currAnswerView[c].setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT));
        currAnswerView[c].setGravity(Gravity.CENTER);
        currAnswerView[c].setTextColor(Color.TRANSPARENT); //So that user does not see that answer
        currAnswerView[c].setBackgroundResource(R.drawable.letter_bg);
        //add to layout
        currWordLayout.addView(currAnswerView[c]);
    }//from   ww w .ja  v a2s.co m
    chancesLeftView.setTextColor(getResources().getColor(R.color.chances_good));
    chancesLeftView.setText(numChances + " chances left");

}

From source file:com.hirebuddy.util.CircleImageView.java

@Override
protected void onDraw(Canvas canvas) {
    if (mBitmap == null) {
        return;//from   ww w .ja  v a 2s.  c o  m
    }

    if (mFillColor != Color.TRANSPARENT) {
        canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mDrawableRadius, mFillPaint);
    }
    canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mDrawableRadius, mBitmapPaint);
    if (mBorderWidth != 0) {
        canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mBorderRadius, mBorderPaint);
    }
}

From source file:com.fututel.ui.account.AccountsEditListFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    ListView lv = getListView();/*from  ww w  . j a  v a2 s  . com*/

    //getListView().setSelector(R.drawable.transparent);
    lv.setCacheColorHint(Color.TRANSPARENT);

    // View management
    View detailsFrame = getActivity().findViewById(R.id.details);
    dualPane = detailsFrame != null && detailsFrame.getVisibility() == View.VISIBLE;

    if (savedInstanceState != null) {
        // Restore last state for checked position.
        curCheckPosition = savedInstanceState.getLong(CURRENT_CHOICE, SipProfile.INVALID_ID);
        //curCheckWizard = savedInstanceState.getString(CURRENT_WIZARD);
    }
    setListShown(false);
    if (mAdapter == null) {
        if (mHeaderView != null) {
            //  lv.addHeaderView(mHeaderView , null, true);//rangdong
        }
        mAdapter = new AccountsEditListAdapter(getActivity(), null);
        mAdapter.setOnCheckedRowListener(this);
        //getListView().setEmptyView(getActivity().findViewById(R.id.progress_container));
        //getActivity().findViewById(android.R.id.empty).setVisibility(View.GONE);
        setListAdapter(mAdapter);
        registerForContextMenu(lv);

        // Prepare the loader.  Either re-connect with an existing one,
        // or start a new one.
        getLoaderManager().initLoader(0, null, this);

        lv.setVerticalFadingEdgeEnabled(true);
    }

    if (dualPane) {
        // In dual-pane mode, the list view highlights the selected item.
        Log.d("lp", "dual pane mode");
        lv.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        //lv.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_LEFT);
        lv.setVerticalScrollBarEnabled(false);
        lv.setFadingEdgeLength(50);

        updateCheckedItem();
        // Make sure our UI is in the correct state.
        //showDetails(curCheckPosition, curCheckWizard);
    } else {
        //getListView().setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_RIGHT);
        lv.setVerticalScrollBarEnabled(true);
        lv.setFadingEdgeLength(100);
    }

}

From source file:com.example.demo_highlights.slidingmenu.fragment.LeftFragment.java

private void initListView() {
    lvAdapter = new SimpleAdapter(getActivity(), getData(), R.layout.behind_list_show,
            new String[] { LIST_TEXT, LIST_IMAGEVIEW },
            new int[] { R.id.textview_behind_title, R.id.imageview_behind_icon }) {
        @Override//ww w.j av a  2 s  . c  om
        public View getView(int position, View convertView, ViewGroup parent) {
            // TODO Auto-generated method stub.
            View view = super.getView(position, convertView, parent);
            if (position == mTag) {
                view.setBackgroundResource(R.drawable.back_behind_list);
                lvTitle.setTag(/*view*/String.valueOf(position));
            } else {
                view.setBackgroundColor(Color.TRANSPARENT);
            }
            return view;
        }
    };
    lvTitle.setAdapter(lvAdapter);
    lvTitle.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            //            NavigationModel navModel = navs.get(position);
            //            mAboveTitle.setText(navModel.getName());
            //            current_page = navModel.getTags();
            if (mTag != position) {
                switch (position) {
                case 0:
                    //               imgQuery.setVisibility(View.GONE);
                    new MyTask().execute(new BaseDao());
                    break;
                case 1:
                    new MyTask().execute(new BaseDao(getActivity(), 1));
                    break;
                case 2:
                    new MyTask().execute(new BaseDao(getActivity(), 2));
                    break;
                case 3:
                    new MyTask().execute(new BaseDao(getActivity(), 3));
                    break;
                }
            }

            if (lvTitle.getTag() != null) {
                if (lvTitle.getTag().equals(String.valueOf(position))) {
                    //                  MainActivity.this.showContent();
                    view.setBackgroundResource(R.drawable.back_behind_list);
                    mTag = position;
                    return;
                } else {
                    /*               ((View) lvTitle.getTag())
                                         .setBackgroundColor(Color.TRANSPARENT);*/
                    mTag = position;
                    lvTitle.setTag(/*view*/String.valueOf(position));
                    view.setBackgroundResource(R.drawable.back_behind_list);
                }
            } else {
                mTag = position;
                lvTitle.setTag(view);
                view.setBackgroundResource(R.drawable.back_behind_list);
            }
            //            imgQuery.setVisibility(View.VISIBLE);

            lvAdapter.notifyDataSetChanged();
        }
    });

}