137
+    * position in the data set.
138
+    * @param position Position of the item whose data we want
139
+    * @param convertView View to recycle, if not null
140
+    * @param parent ViewGroup containing the returned View
141
+    */
142
+  @Override
143
+  public View getView(int position, View convertView,
144
+                      ViewGroup parent) {
145
+    View result=views.get(position);
146
+    
147
+    if (result==null) {
148
+      result=newView(position, parent);
149
+      views.set(position, result);
150
+    }
151
+    
152
+    return(result);
153
+  }
154
+
155
+  /**
156
+    * Get the row id associated with the specified position
157
+    * in the list.
158
+    * @param position Position of the item whose data we want
159
+    */
160
+  @Override
161
+  public long getItemId(int position) {
162
+    return(position);
163
+  }
164
+  
165
+  public boolean hasView(View v) {
166
+    return(views.contains(v));
167
+  }
168
+  
169
+  /**
170
+    * Create a new View to go into the list at the specified
171
+    * position.
172
+    * @param position Position of the item whose data we want
173
+    * @param parent ViewGroup containing the returned View
174
+    */
175
+  protected View newView(int position, ViewGroup parent) {
176
+    throw new RuntimeException("You must override newView()!");
177
+  }
178
+}

kodo - Gogs: Go Git Service

暂无描述

0001_initial.py 2.2KB

    # -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-02-07 14:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='SaleclerkIntegralIncomeExpensesInfo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('status', models.BooleanField(db_index=True, default=True, help_text='Status', verbose_name='status')), ('created_at', models.DateTimeField(auto_now_add=True, help_text='Create Time', verbose_name='created_at')), ('updated_at', models.DateTimeField(auto_now=True, help_text='Update Time', verbose_name='updated_at')), ('franchiser_id', models.CharField(blank=True, db_index=True, help_text='\u7ecf\u9500\u5546\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='franchiser_id')), ('clerk_id', models.CharField(blank=True, db_index=True, help_text='\u5e97\u5458\u552f\u4e00\u6807\u8bc6', max_length=32, null=True, verbose_name='clerk_id')), ('type', models.IntegerField(choices=[(0, '\u6536\u5165'), (1, '\u652f\u51fa'), (2, '\u89e3\u51bb')], db_index=True, default=0, help_text='\u6536\u652f\u7c7b\u522b', verbose_name='type')), ('code', models.CharField(blank=True, db_index=True, help_text='\u673a\u8eab\u7801', max_length=32, null=True, verbose_name='code')), ('integral', models.IntegerField(default=0, help_text='\u589e\u51cf\u79ef\u5206', verbose_name='integral')), ('left_integral', models.IntegerField(default=0, help_text='\u79ef\u5206\u589e\u51cf\u540e\u6570\u91cf(\u5206)', verbose_name='left_integral')), ('remark', models.CharField(blank=True, help_text='\u5907\u6ce8', max_length=255, null=True, verbose_name='remark')), ], options={ 'verbose_name': 'saleclerkintegralincomeexpensesinfo', 'verbose_name_plural': 'saleclerkintegralincomeexpensesinfo', }, ), ]