List of usage examples for android.widget ListView setDividerHeight
public void setDividerHeight(int height)
From source file:Main.java
public static void setDivider(ListView listView) { listView.setDivider(gradient); listView.setDividerHeight(1); }
From source file:org.level28.android.moca.ui.home.HomeFragment.java
@Override protected void configureList(Activity activity, ListView listView) { super.configureList(activity, listView); listView.setDividerHeight(0); }
From source file:com.daiv.android.twitter.settings.SettingsLinkDrawerClickListener.java
@Override public void onItemClick(AdapterView parent, View view, int position, long id) { Intent intent;//from www. jav a 2s.com final int mPos = position; if (mPos < 2) { // one of the settings pages new Handler().postDelayed(new Runnable() { @Override public void run() { mDrawerLayout.closeDrawer(Gravity.START); } }, 300); viewPager.setCurrentItem(mPos + 7, true); } else if (mPos == 2) { // changelog final ListView list = new ListView(context); list.setDividerHeight(0); new AsyncTask<Spanned[], Void, Spanned[]>() { @Override public Spanned[] doInBackground(Spanned[]... params) { return XmlChangelogUtils.parse(context); } @Override public void onPostExecute(Spanned[] result) { list.setAdapter(new ChangelogAdapter(context, result)); } }.execute(); new AlertDialog.Builder(context).setTitle(R.string.changelog).setView(list) .setPositiveButton(R.string.ok, null).show(); } else if (mPos == 3) { // rate it option new Handler().postDelayed(new Runnable() { @Override public void run() { Uri uri = Uri.parse("market://details?id=" + context.getPackageName()); Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri); try { context.startActivity(goToMarket); } catch (ActivityNotFoundException e) { Toast.makeText(context, "Couldn't launch the market", Toast.LENGTH_SHORT).show(); } } }, 200); } }
From source file:com.gmail.emerssso.srbase.ListDailiesActivity.java
@Override public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.list_comments_activity); ActionBar actionBar = getActionBar(); if (actionBar != null) actionBar.setDisplayHomeAsUpEnabled(true); ListView lv = this.getListView(); lv.setDividerHeight(2); Bundle extras = getIntent().getExtras(); srId = extras.getString(DailyTable.COLUMN_SR_ID); fillData();/*from ww w . ja v a 2 s.com*/ lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View v, int position, long id) { Intent i = new Intent(parent.getContext(), EditDailyActivity.class); Uri dayUri = Uri.parse(SRContentProvider.DAILY_CONTENT_URI + "/" + id); i.putExtra(SRContentProvider.DAILY_CONTENT_ITEM_TYPE, dayUri); startActivity(i); } }); }
From source file:com.gmail.emerssso.srbase.ListPartsActivity.java
@Override public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.list_parts_activity); ActionBar actionBar = getActionBar(); if (actionBar != null) actionBar.setDisplayHomeAsUpEnabled(true); ListView lv = this.getListView(); lv.setDividerHeight(2); lv.setClickable(true);/*from w w w . j a v a2s . c o m*/ Bundle extras = getIntent().getExtras(); srId = extras.getString(PartTable.COLUMN_SR_ID); if (srId == null) throw new RuntimeException("srId is null!"); fillData(); lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View v, int position, long id) { Intent i = new Intent(parent.getContext(), EditPartActivity.class); Uri partUri = Uri.parse(SRContentProvider.PART_CONTENT_URI + "/" + id); i.putExtra(SRContentProvider.PART_CONTENT_ITEM_TYPE, partUri); startActivity(i); } }); }
From source file:net.d53.syman.mobile.ui.ContentListFragment.java
protected void configureList(Activity activity, ListView listView) { super.configureList(activity, listView); listView.setFastScrollEnabled(true); listView.setDividerHeight(0); getListAdapter().addHeader(activity.getLayoutInflater().inflate(layout.content_list_item_labels, null)); }
From source file:org.level28.android.moca.ui.faq.FaqFragment.java
@Override protected void configureList(Activity activity, ListView listView) { super.configureList(activity, listView); listView.setDividerHeight(0); updateCategoryHeaders(items);//from w w w . j av a2s . co m }
From source file:net.d53.syman.mobile.ui.ReferrerListFragment.java
@Override protected void configureList(Activity activity, ListView listView) { super.configureList(activity, listView); listView.setFastScrollEnabled(true); listView.setDividerHeight(0); getListAdapter().addHeader(activity.getLayoutInflater().inflate(layout.referrer_list_item_labels, null)); }
From source file:org.svij.taskwarriorapp.fragments.MenuListFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); setListView();/*w w w. ja v a 2s . c om*/ ListView listview = getListView(); listview.setDividerHeight(0); taskListFragment = (TaskListFragment) getActivity().getSupportFragmentManager() .findFragmentById(R.id.content_frame); listview.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { taskListFragment.onTaskButtonClick(view); String menu_text = ((TextView) view).getText().toString(); taskListFragment.setColumn(menu_text); taskListFragment.setListView(); getListView().setItemChecked(position, true); } }); }
From source file:org.svij.taskwarriorapp.MenuListFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); setListView();/*from w ww. j ava 2 s . com*/ ListView listview = getListView(); listview.setDividerHeight(0); listFragment = (ArrayListFragment) getSherlockActivity().getSupportFragmentManager() .findFragmentById(R.id.content_frame); final SlidingPaneLayout paneLayout = (SlidingPaneLayout) getActivity().findViewById(R.id.drawer_layout); listview.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { listFragment.onTaskButtonClick(view); String menu_text = ((TextView) view).getText().toString(); listFragment.setColumn(menu_text); listFragment.setListView(); paneLayout.closePane(); getListView().setItemChecked(position, true); } }); }