Example usage for android.widget LinearLayout SHOW_DIVIDER_END

List of usage examples for android.widget LinearLayout SHOW_DIVIDER_END

Introduction

In this page you can find the example usage for android.widget LinearLayout SHOW_DIVIDER_END.

Prototype

int SHOW_DIVIDER_END

To view the source code for android.widget LinearLayout SHOW_DIVIDER_END.

Click Source Link

Document

Show a divider at the end of the group.

Usage

From source file:de.azapps.mirakel.settings.model_settings.special_list.dialogfragments.EditDialogFragment.java

@Override
public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container,
        @Nullable final Bundle savedInstanceState) {
    final View rootView = inflater.inflate(R.layout.special_lists_edit_dialog_fragment, null);
    final ArrayAdapter<CharSequence> spinnerArrayAdapter = ArrayAdapter.createFromResource(getActivity(),
            R.array.special_lists_filter_type, android.R.layout.simple_spinner_dropdown_item);
    final Spinner spinner = (Spinner) rootView.findViewById(R.id.property_spinner);
    spinner.setAdapter(spinnerArrayAdapter);
    spinner.setOnItemSelectedListener(this);
    spinner.setSelection(propertyToType(property), false);
    handleNewFragment(propertyToType(property));
    final Button ok = (Button) rootView.findViewById(R.id.saveButton);
    ok.setOnClickListener(this);
    ((LinearLayout) rootView).setShowDividers(LinearLayout.SHOW_DIVIDER_END);
    return rootView;
}

From source file:net.momodalo.app.vimtouch.VimTouch.java

public void showCmdHistory() {

    final Dialog dialog = new Dialog(this, R.style.DialogSlideAnim);

    // Setting dialogview
    Window window = dialog.getWindow();
    window.setGravity(Gravity.BOTTOM);/*  w  w  w.j av  a2s  .  c  o m*/

    window.setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
    dialog.setTitle(null);
    dialog.setContentView(R.layout.hist_list);
    dialog.setCancelable(true);

    LinearLayout layout = (LinearLayout) dialog.findViewById(R.id.hist_layout);
    if (AndroidCompat.SDK >= 11) {
        layout.setShowDividers(LinearLayout.SHOW_DIVIDER_BEGINNING | LinearLayout.SHOW_DIVIDER_MIDDLE
                | LinearLayout.SHOW_DIVIDER_END);
    }
    LayoutParams params = layout.getLayoutParams();
    params.width = mScreenWidth;
    layout.setLayoutParams(params);

    LayoutInflater inflater = LayoutInflater.from(this);
    boolean exists = false;

    for (int i = 1; i <= 10; i++) {
        TextView button = (TextView) inflater.inflate(R.layout.histbutton, layout, false);
        String cmd = Exec.getCmdHistory(i);
        if (cmd.length() == 0)
            break;
        exists = true;
        button.setText(":" + cmd);
        button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                TextView text = (TextView) v;
                CharSequence cmd = text.getText();
                Exec.doCommand(cmd.subSequence(1, cmd.length()).toString());
                dialog.dismiss();
            }
        });
        layout.addView((View) button);
    }

    if (exists)
        dialog.show();
}