Android: пользовательский разделитель (или даже объект) в ListView depening на содержании объекта

Строка:: Случайный в Perl генерирует случайную строку от подмножества регулярных выражений:

#!/usr/bin/perl

use strict;
use warnings;

use String::Random qw/random_regex/;

print random_regex('[A-Za-z]{3}[0-9][A-Z]{2}[!@#$%^&*]'), "\n";

11
задан znq 22 October 2009 в 10:26
поделиться

1 ответ

Here is one implementation that does exactly what you describe.

That one is GPLv3, because it is derived from this implementation, which was GPLv3.

You can also use my MergeAdapter for this, which has the advantage of being Apache License 2.0. Just hand it an alternating set of header TextViews and Adapters containing each section's worth of content.

Or, you can peek at all of these and roll their behaviors into your existing Adapter class. The trick is to return your TextView headers at the right spot, and properly implement methods like getViewTypeCount(), getItemViewType(), areAllItemsEnabled(), and isEnabled().

19
ответ дан 3 December 2019 в 04:52
поделиться
Другие вопросы по тегам:

Похожие вопросы: