ASP according to thetemplate to generate static HTML file < % ;examples: TPL TPL = New template tpl.setTplPath = " ;../ template / footer.tpl" ;tpl.setTags = array ( " ;< ;!-- { label name } :> ;" ;tpl.
setNotes = array ( " ) ;alternative content " ) ;tpl.setStoreF = " ;." ./ HTML / ; using automatically generated file name in the end of " ;" ;Set TPL = Nothing Class template Private objFso Private strFileCode ---------------------------------------------------------- read the template file content Private intRnd random number generation, combined into the new file name Private tplpath Private StorePath template name files Private StoreFname Private arrTags file name tag array of Private arrNotes in the use of Set to create the object automatically when performing Private Sub Class_Initialize ( set ) objFso = CreateObject ( " ;scripting.
filesystemobject" ;End Sub ) template file location and # 43 ;name of the Public Property Le write only T setTplPath ( ByVal tName ) tplpath = Server.MapPath ( Replace ( tName ," ;/ / " ," / " ;;;) ) End Property storage file location & # 43 ;Public Property Let setStoreF name only write ( ByVal tName ) tName = Replace ( tName ," ;/ / " " ;,;/ " ;) get file name dim arrY arrY = split ( tName ," ;" ;StoreFname ) = Ubound ( arrY ) StoreFname = arrY ( StoreFname ) directory name StorePath = Replace ( tName ,StoreFname ," ;" ;StorePath = Server.
MapPath ( StorePath ) ) End Property Public label write only Property Let setTags ( ByVal strString ) arrTags = strString End Property Public Property Let setNotes content only write ( ByVal strString ) arrNotes = strString End Property generated in the Min between Max and Private Sub from a random number rnd_Integer ( Min ,Max ) Randomize intRnd = CInt ( Max-Min& # ( 43 ;1) * Rnd ( & ) # ) 43 ;Min End Sub :time & # 43 ;Private Sub makeFilename dim fname random number fname = now ( fname ) = replace ( fname ," ;" ;" ," ;fname = replace ( ;) Fname ," ;" ;" ;" ;fname ,replace ) = ( fname ," ;" ;" :" ;,;) fname = replace ( fname ,Dr Beats Headphones," ;PM" ;" ;" ;fname ,replace ) = ( fname ," ," ;" ;AM" ;fname = replace ;) ( fname ,Moncler Kid Uk," ;" ,Christian Louboutin Sale," " morning ;;;) fname = replace ( fname ," ;" ," " afternoon ;;;) call rnd_Integer ( 09999) StoreFname = fname& ;intRnd& ;" ;html" ;fname = null End Sub Private Sub LoadTemplate reads the template file content ( tplpath If objFso.
FileExists ) Then Set FileObj = objFso.GetFile ( tplpath ) Set FileStreamObj = FileObj.OpenAsTextStream ( 1 ) If Not FileStreamObj.AtEndOfStream Then strFileCode = FileStreamObj.ReadAll Else Message 1002 End If Else Message 1001 End If Set FileObj = Nothing: Set FileStreamObj = Nothing End Sub Private Sub updateNotes if updating the page content of IsArray ( arrNotes ) and IsArray ( arrTags ) then if Ubound ( arrNotes ) = Ubound ( arrTags ) then LoadTemplate For intI = Lbound ( arrNotes ) to Ubound ( arrNotes ) strFileCode = Replace ( strFileCode ,arrTags ( intI ) ,arrNotes ( intI ) ) Next else Message 1004 end if else Message 1004 end if End Sub Private Sub makeFold to create the folder ( ByVal strFoladName ) on error resume next folder to determine whether the presence of ( about ,files : objFso.
FileExists ) If false = objFso.FolderExists ( strFoladName Then objFso.CreateFolder ( strFoladName ) ) if err> err.clear Message 1003 end ;0 then if End If End Sub Private Sub makeFile dim arrX file ,intI ,strW strW = " ;" ;arrX = split ( StorePath ," / " ;;) to judge if the directory exists ,decide whether to create a directory For intI = Lbound ( arrX ) to Ubound ( arrX makeFold strW& ) ;arrX ( intI ) strW = strW& ;arrX ( intI ) Next not set file name using the date with the random number as the file name if StoreFname = " ;" ;then makeFilename end if updateNotes updated content ( filename object.
CreateTextFile ,Cheap Oakley Sunglasses,Unicode overwrite ,Set ) objFout = objFso.CreateTextFile ( StorePath& ;" ;/ " ;& ;StoreFname ,true ) objFout.WriteLine strFileCode objFout.close set input objFso = Nothing Message 1000 End Sub prompts the successful implementation of public Sub exeTpl makeFile End Sub Private Sub Message ( ByVal s returned to Select Case s ) Case 1000 Response.
Write " ;the success of operation !" ;& ;StoreFname Case 1001 Response.Write " ;template does not exist ,please bind !" ;Case 1002 Response.Write " ;template content is empty !" Response.
Write " ;Case 1003 ;file creation failed ,Dr Dre Beats!" ;Case Else End Select End Sub in Set release object automatically when performing Private Sub Class_Terminate Set objFso = Nothing
Related articles:
2012年3月26日星期一
Moncler OutletOpenJWeb (v1
OpenJWeb (v1.2) QQ: 29803446 Email: baozhengw@netease.com list J,, word J CSDN,Christian Louboutin Sale,: openjweb. Rar,Nike Store Online, 5 J,Beats By Dre Pro,: 01-OpenJWeb. Doc 02-OpenJWeb. Doc 03 -. Doc 04-OpenJWeb (v1.2). Doc -. Doc OpenJWeb,Coach Outlet Store Online, OpenJWeb,Moncler Outlet!
Related articles:
Related articles:
Beats By DreI use hibernate storage Blob image is found when this problem
I use hibernate storage Blob image is found when this problem, original picture byte is 2570, save to the Oracle database,Beats By Dre, byte into 2717, and use the HQL statement to get the blob object,Coach Outlet Store, check out blob byte is still 2570,Nike Running Shoes, the image can be displayed properly, but the use of pure SQL read blob 2717, the image does not display, do not know what the reason is.
Oracle blob is oracle.sql.BLOB, procedures in the entity class BLOB type javax.sql.rowset.serial.SerialBlob,UGG Boots UK, does oracle.sql.BLOB converted to javax.sql.rowset.serial.SerialBlob need anything special? Hibernate is how to deal with both the conversion?Below is the hibernate configuration file in BLOB field mapping: < property name = "infPhoto" type = "javax.
sql.rowset.serial.SerialBlob" > < column name = "inf_photo" sql-type = "BLOB" / > / property> < infPhoto; from CmsInfo where rowId select = '1' for blob is 2570 the length of the blob,Moncler Outlet, can display the picture, but the use of the pure SQL to obtain the blob length is 2717 (the length and stored in the Oracle database blob is of the same length): String SQL = "select inf_photo from cms_info where row_id = '" + this.
imageRowId + "."; Object obj1 = service.getJdbcTemplate (). QueryForObject (SQL, Blob.class); if (obj1! = null) {Blob B = (Blob) obj1; logger.info (b.length ()); / / 2717 SerialBlob BB = new SerialBlob (b); logger.
info ("conversion 1:"); logger.info (bb.length ()); / / convert after 2717, do not know by what method to convert SerialBlob can be obtained after the original length?} which prawn knows this problem, thank you.
Related articles:
Oracle blob is oracle.sql.BLOB, procedures in the entity class BLOB type javax.sql.rowset.serial.SerialBlob,UGG Boots UK, does oracle.sql.BLOB converted to javax.sql.rowset.serial.SerialBlob need anything special? Hibernate is how to deal with both the conversion?Below is the hibernate configuration file in BLOB field mapping: < property name = "infPhoto" type = "javax.
sql.rowset.serial.SerialBlob" > < column name = "inf_photo" sql-type = "BLOB" / > / property> < infPhoto; from CmsInfo where rowId select = '1' for blob is 2570 the length of the blob,Moncler Outlet, can display the picture, but the use of the pure SQL to obtain the blob length is 2717 (the length and stored in the Oracle database blob is of the same length): String SQL = "select inf_photo from cms_info where row_id = '" + this.
imageRowId + "."; Object obj1 = service.getJdbcTemplate (). QueryForObject (SQL, Blob.class); if (obj1! = null) {Blob B = (Blob) obj1; logger.info (b.length ()); / / 2717 SerialBlob BB = new SerialBlob (b); logger.
info ("conversion 1:"); logger.info (bb.length ()); / / convert after 2717, do not know by what method to convert SerialBlob can be obtained after the original length?} which prawn knows this problem, thank you.
Related articles:
Coach BagPublic class TitleList extends ListActivity private String mListTitle = "
Public class TitleList extends ListActivity {private String mListTitle = {" ;the name " ," ;" ;gender ;age ," ;" ," ;" ," ;residence ;;" ;} ;private String mListStr = {" ;rain loose ,MOMO" ;" ," ;male ;" ;25" ;" ;" ,Beijing ;" xuanyusong@gmail.
com" ,;;} ;ListView mListView = null ;ArrayList< ;Map< ;String ,Object> ;> ;mData = new ArrayList< ;Map< ;String ,Object> ;> ;( ) ;Override protected void ;@ onCreate ( Bundle savedInstanceState ) {mListView = getListView ( ) ;int lengh = mListTitle.
length ;for ( int i = 0 ;I < ;lengh ;I + + ) {Map< ;String ,Object> ;item = new HashMap< ;String ,Object> ;( ) ;item.put ( " ;title" ;mListTitle , ) ;item.
put ( " ;text" ,mListStr I ; ) ;mData.add ( item ) ;} SimpleAdapter adapter = new SimpleAdapter ( this ,mData ,Nike Factory Outlet,android.R.layout.simple_list_item_2 ,new String {" ;title" ;text" ," ;New Int ;} , {android.
R.id.text1 ,android.R.id.text2} ) ;setListAdapter ( adapter ) ;mListView.setOnItemClickListener ( New OnItemClickListener ( ) {@ Override public void onItemClick ( AdapterView< ;> ;adapterView ,View ?View ,int position ,long ID ) {Toast.
makeText ( TitleList.this ," ;you choose the title: " ;+ mListTitle + " ;content :" + mListStr ;,Toast.LENGTH_LONG ) . Show ( ) ;} } ) ;super.onCreate ( savedInstanceState ) ;} } 3 with pictures of the ListView list using the simpleAdapter to operate but constructed simpleAdapter when need to use to write our own layout to complete ,because the system layout has been unable to meet the demand ,the same Map< ;String ,Object> ;item to save each item in the list to display such as caption content .
Public class IconList extends ListActivity {private String mListTitle = {" ;the name " ," ;" ;gender ;age ," ;" ," ;" ," ;residence ;;" ;} ;private String mListStr = {" ;rain loose ,MOMO" ;" ," ;male ;" ;25" ;" ;" ,Beijing ;" xuanyusong@gmail.
com" ,;;} ;ListView mListView = null ;ArrayList< ;Map< ;String ,Object> ;> ;mData = new ArrayList< ;Map< ;String ,Object> ;> ;( ) ;Override protected void ;@ onCreate ( Bundle savedInstanceState ) {mListView = getListView ( ) ;int lengh = mListTitle.
length ;for ( int i = 0 ;I < ;lengh ;I + + ) {Map< ;String ,Object> ;item = new HashMap< ;String ,UGG Clearance,Object> ;( ) ;item.put ( " ;image" ;item.put ,R.drawable.jay ) ;( " ;title" ;mListTitle , ) ;item.
put ( " ;text" ;mListStr , ) ;} mData.add ( item ) ;SimpleAdapter adapter = new SimpleAdapter ( this ,mData ,R.layout.iconlist ,new String {" ;image" ;" ;title" ;" ,text" ,;;} ,new int {R.
id.image ,R.id Title ,Coach Bag,R.id.text} ) ;setListAdapter ( adapter ) ;mListView.setOnItemClickListener ( New OnItemClickListener ( ) {@ Override public void onItemClick ( AdapterView< ;> ;adapterView ,View ?View ,int position ,long ID ) {Toast.
makeText ( IconList.this ," ;you choose the title: " ;+ mListTitle + " ;content :" ;+ mListStr ,Toast.LENGTH_LONG ) . Show ( ) ;} } ) ;super.onCreate ( savedInstanceState ) ;} } 4 custom layout BaseAdapter modify the list of colors because by directly constructing system layout to draw list method is limited ,so we need to override the draw method ,to write a class to inherit from the BaseAdapter and the realization of this method in the class ,listView at the beginning to draw it will first call getCout ( ) method to obtain the drawing number ,and then instantiates its own definition of the BaseAdapter through the getView ( ) method, a layer of ListView drawing ,so we can here according to the position ( current mapping of the ID ) to arbitrary modify drawing content ,make a good-looking beautiful ListView ,this example below I by overriding the getView modification List of each color and the realization of the user selected into the highlighted state .
5 custom layout ArrayAdapter ArrayAdapter BaseAdapter subclass ,ArrayAdapter not only has all of BaseAdapter method also customize some new methods to treat the list item ,so from a simple function can speaking ArrayAdapter far stronger and BaseAdapter ,if it is a draw some small amount of the list of suggested using BaseAdapter if to draw some of the more complex list item and many of the recommendations for the use of ArrayAdapter list item .
< ;?XML version = " ;1.0" ;encoding = " ;utf-8" ;> ;< ;RelativeLayout ?Xmlns : Android = " ;http: / / schemas.android.com / APK / RES / android" ;Android: layout_width = " ;fill_parent" ;Android: layout_height = " ;wrap_content" ;> ;< ;Buttonandroid: id = " ;@ + ID / array_button" ;Android: layout_width = " ;wrap_content" ;Android: layout_height = " ;wrap_content" ;Android: text = " ;a button " / > ;< ;ImageView ;Android : id = " ;@ + ID / array_image" ;Android: layout_toRightOf = " + ID / array_button" ;@ ;Android: layout_width = " ;wrap_content" ;Android: layout_height = " ;fill_parent" ;Android: layout_alignParentTop = " ;true" ;Android: layout_alignParentBottom = " ;true" ;Android: adjustViewBounds = " ;true" ;Android: padding = " ;2dip" ;< ;TextView / > ;Android : id = " + ID ;@ / array_title" ;Android: layout_width = " ;fill_parent" ;Android: layout_height = " ;wrap_content" ;Android: layout_toRightOf = " ;@ + ID / array_image" ;Android: layout_align ParentBottom = " ;true" ;Android: layout_alignParentRight = " ;true" ;Android: singleLine = " ;true" ;Android: ellipsize = " ;marquee" ;Android: textSize = " ;15dip" ;< ;TextView / > ;Android : id = " ;@ + ID / array_text" ;Android: layout_width = " ;fill_parent" ;Android: layout_height = " ;wrap_content" ;Android: layout_toRightOf = " ;@ + ID / array_image" ;Android: layout_below = " ;@ + ID / array_title" ;Android: layout_alignParentBottom = " ;true" ;Android: layout_alignParentRight = " ;true" ;Android: singleLine = " ;true" ;Android: ellipsize = " ;marquee" ;Android: textSize = " ;20dip" ;> ;< ;public class ArrayList / RelativeLayout> ;extends ListActivity {private String mListTitle = {" ;the name " ," ;" ;gender ;age ," ;" ," ;" ," ;residence ;;" ;} ;private String mListStr = {" ;rain loose ,MOMO" ;" ;" ," ;male ;25" ;" ;" ,Beijing ;xuanyusong@gmail.
com" ,Outlet Coach Store," ;ListView mListV ;} ;Iew = null ;MyListAdapter myAdapter = null ;ArrayList arrayList = null Override protected void ;@ onCreate ( Bundle savedInstanceState ) {arrayList = this ;mListView = getListView ( ) ;myAdapter = new MyListAdapter ( this ,R.
layout.arraylist ) ;setListAdapter ( myAdapter ) ;super.onCreate ( savedInstanceState ) ;} public class MyListAdapter extends ArrayAdapter< Object> ;{ ;int mTextViewResourceID = 0 ;private Context mContext ;public MyListAdapter ( Context context ,int textViewResourceId ) {super ( context ,textViewResourceId ) ;mTextViewResourceID = textViewResourceId ;mContext = context ;} private int colors = New Int {0xff626569 ,Moncler Outlet Store,0xff4f5257} ;public int getCount ( ) {return mListStr.
length ;} @ Overridepublic Boolean areAllItemsEnabled ( ) {return false ;} public Object getItem ( int position ) {return position ;} public long getItemId ( int position ) {return position ;} public View getView ( final int position ,View convertView ,ViewGroup parent ) {ImageView iamge = null ;TextView title = null ;TextView text = null ;Button button = null ;if ( convertView = = null ) {convertView = LayoutInflater.
from ( mContext ) . Inflate ( mTextViewResourceID ,null ) ;iamge = ( ImageView ) convertView.findViewById ( R.id.array_image ) ;title = ( TextView ) convertView.findViewById ( R.
id.array_title ) ;text = ( TextView ) convertView.findViewById ( R.id.array_text ) ;button = ( Button ) convertView.findViewById ( R.id.array_button ) ;button.setOnClickListener ( New OnClickListener ( ) {@ Override public void onClick ( View arg0 ) {Toast.
makeText ( arrayList ," ;you click on the " + position + " ;;buttons ," ;Toast.LENGTH_LONG ) . Show ( ) ;} } ) ;} int colorPos = position% colors.length ;convertView.
setBackgroundColor ( colors ) ;title.setText ( mListTitle ) ;text.setText ( mListStr ) ;if ( colorPos = = 0 ) iamge.setImageResource ( R.drawable.jay ) ;elseiamge.setImageResource ( R.
drawable.image ) ;return convertView ;} } } end if you still think I write not detailed enough not to look cool me tight The source code to download address affixed to welcome everyone to learn together to discuss rain loose MOMO hope we can progress together .
Related articles:
com" ,;;} ;ListView mListView = null ;ArrayList< ;Map< ;String ,Object> ;> ;mData = new ArrayList< ;Map< ;String ,Object> ;> ;( ) ;Override protected void ;@ onCreate ( Bundle savedInstanceState ) {mListView = getListView ( ) ;int lengh = mListTitle.
length ;for ( int i = 0 ;I < ;lengh ;I + + ) {Map< ;String ,Object> ;item = new HashMap< ;String ,Object> ;( ) ;item.put ( " ;title" ;mListTitle , ) ;item.
put ( " ;text" ,mListStr I ; ) ;mData.add ( item ) ;} SimpleAdapter adapter = new SimpleAdapter ( this ,mData ,Nike Factory Outlet,android.R.layout.simple_list_item_2 ,new String {" ;title" ;text" ," ;New Int ;} , {android.
R.id.text1 ,android.R.id.text2} ) ;setListAdapter ( adapter ) ;mListView.setOnItemClickListener ( New OnItemClickListener ( ) {@ Override public void onItemClick ( AdapterView< ;> ;adapterView ,View ?View ,int position ,long ID ) {Toast.
makeText ( TitleList.this ," ;you choose the title: " ;+ mListTitle + " ;content :" + mListStr ;,Toast.LENGTH_LONG ) . Show ( ) ;} } ) ;super.onCreate ( savedInstanceState ) ;} } 3 with pictures of the ListView list using the simpleAdapter to operate but constructed simpleAdapter when need to use to write our own layout to complete ,because the system layout has been unable to meet the demand ,the same Map< ;String ,Object> ;item to save each item in the list to display such as caption content .
Public class IconList extends ListActivity {private String mListTitle = {" ;the name " ," ;" ;gender ;age ," ;" ," ;" ," ;residence ;;" ;} ;private String mListStr = {" ;rain loose ,MOMO" ;" ," ;male ;" ;25" ;" ;" ,Beijing ;" xuanyusong@gmail.
com" ,;;} ;ListView mListView = null ;ArrayList< ;Map< ;String ,Object> ;> ;mData = new ArrayList< ;Map< ;String ,Object> ;> ;( ) ;Override protected void ;@ onCreate ( Bundle savedInstanceState ) {mListView = getListView ( ) ;int lengh = mListTitle.
length ;for ( int i = 0 ;I < ;lengh ;I + + ) {Map< ;String ,Object> ;item = new HashMap< ;String ,UGG Clearance,Object> ;( ) ;item.put ( " ;image" ;item.put ,R.drawable.jay ) ;( " ;title" ;mListTitle , ) ;item.
put ( " ;text" ;mListStr , ) ;} mData.add ( item ) ;SimpleAdapter adapter = new SimpleAdapter ( this ,mData ,R.layout.iconlist ,new String {" ;image" ;" ;title" ;" ,text" ,;;} ,new int {R.
id.image ,R.id Title ,Coach Bag,R.id.text} ) ;setListAdapter ( adapter ) ;mListView.setOnItemClickListener ( New OnItemClickListener ( ) {@ Override public void onItemClick ( AdapterView< ;> ;adapterView ,View ?View ,int position ,long ID ) {Toast.
makeText ( IconList.this ," ;you choose the title: " ;+ mListTitle + " ;content :" ;+ mListStr ,Toast.LENGTH_LONG ) . Show ( ) ;} } ) ;super.onCreate ( savedInstanceState ) ;} } 4 custom layout BaseAdapter modify the list of colors because by directly constructing system layout to draw list method is limited ,so we need to override the draw method ,to write a class to inherit from the BaseAdapter and the realization of this method in the class ,listView at the beginning to draw it will first call getCout ( ) method to obtain the drawing number ,and then instantiates its own definition of the BaseAdapter through the getView ( ) method, a layer of ListView drawing ,so we can here according to the position ( current mapping of the ID ) to arbitrary modify drawing content ,make a good-looking beautiful ListView ,this example below I by overriding the getView modification List of each color and the realization of the user selected into the highlighted state .
5 custom layout ArrayAdapter ArrayAdapter BaseAdapter subclass ,ArrayAdapter not only has all of BaseAdapter method also customize some new methods to treat the list item ,so from a simple function can speaking ArrayAdapter far stronger and BaseAdapter ,if it is a draw some small amount of the list of suggested using BaseAdapter if to draw some of the more complex list item and many of the recommendations for the use of ArrayAdapter list item .
< ;?XML version = " ;1.0" ;encoding = " ;utf-8" ;> ;< ;RelativeLayout ?Xmlns : Android = " ;http: / / schemas.android.com / APK / RES / android" ;Android: layout_width = " ;fill_parent" ;Android: layout_height = " ;wrap_content" ;> ;< ;Buttonandroid: id = " ;@ + ID / array_button" ;Android: layout_width = " ;wrap_content" ;Android: layout_height = " ;wrap_content" ;Android: text = " ;a button " / > ;< ;ImageView ;Android : id = " ;@ + ID / array_image" ;Android: layout_toRightOf = " + ID / array_button" ;@ ;Android: layout_width = " ;wrap_content" ;Android: layout_height = " ;fill_parent" ;Android: layout_alignParentTop = " ;true" ;Android: layout_alignParentBottom = " ;true" ;Android: adjustViewBounds = " ;true" ;Android: padding = " ;2dip" ;< ;TextView / > ;Android : id = " + ID ;@ / array_title" ;Android: layout_width = " ;fill_parent" ;Android: layout_height = " ;wrap_content" ;Android: layout_toRightOf = " ;@ + ID / array_image" ;Android: layout_align ParentBottom = " ;true" ;Android: layout_alignParentRight = " ;true" ;Android: singleLine = " ;true" ;Android: ellipsize = " ;marquee" ;Android: textSize = " ;15dip" ;< ;TextView / > ;Android : id = " ;@ + ID / array_text" ;Android: layout_width = " ;fill_parent" ;Android: layout_height = " ;wrap_content" ;Android: layout_toRightOf = " ;@ + ID / array_image" ;Android: layout_below = " ;@ + ID / array_title" ;Android: layout_alignParentBottom = " ;true" ;Android: layout_alignParentRight = " ;true" ;Android: singleLine = " ;true" ;Android: ellipsize = " ;marquee" ;Android: textSize = " ;20dip" ;> ;< ;public class ArrayList / RelativeLayout> ;extends ListActivity {private String mListTitle = {" ;the name " ," ;" ;gender ;age ," ;" ," ;" ," ;residence ;;" ;} ;private String mListStr = {" ;rain loose ,MOMO" ;" ;" ," ;male ;25" ;" ;" ,Beijing ;xuanyusong@gmail.
com" ,Outlet Coach Store," ;ListView mListV ;} ;Iew = null ;MyListAdapter myAdapter = null ;ArrayList arrayList = null Override protected void ;@ onCreate ( Bundle savedInstanceState ) {arrayList = this ;mListView = getListView ( ) ;myAdapter = new MyListAdapter ( this ,R.
layout.arraylist ) ;setListAdapter ( myAdapter ) ;super.onCreate ( savedInstanceState ) ;} public class MyListAdapter extends ArrayAdapter< Object> ;{ ;int mTextViewResourceID = 0 ;private Context mContext ;public MyListAdapter ( Context context ,int textViewResourceId ) {super ( context ,textViewResourceId ) ;mTextViewResourceID = textViewResourceId ;mContext = context ;} private int colors = New Int {0xff626569 ,Moncler Outlet Store,0xff4f5257} ;public int getCount ( ) {return mListStr.
length ;} @ Overridepublic Boolean areAllItemsEnabled ( ) {return false ;} public Object getItem ( int position ) {return position ;} public long getItemId ( int position ) {return position ;} public View getView ( final int position ,View convertView ,ViewGroup parent ) {ImageView iamge = null ;TextView title = null ;TextView text = null ;Button button = null ;if ( convertView = = null ) {convertView = LayoutInflater.
from ( mContext ) . Inflate ( mTextViewResourceID ,null ) ;iamge = ( ImageView ) convertView.findViewById ( R.id.array_image ) ;title = ( TextView ) convertView.findViewById ( R.
id.array_title ) ;text = ( TextView ) convertView.findViewById ( R.id.array_text ) ;button = ( Button ) convertView.findViewById ( R.id.array_button ) ;button.setOnClickListener ( New OnClickListener ( ) {@ Override public void onClick ( View arg0 ) {Toast.
makeText ( arrayList ," ;you click on the " + position + " ;;buttons ," ;Toast.LENGTH_LONG ) . Show ( ) ;} } ) ;} int colorPos = position% colors.length ;convertView.
setBackgroundColor ( colors ) ;title.setText ( mListTitle ) ;text.setText ( mListStr ) ;if ( colorPos = = 0 ) iamge.setImageResource ( R.drawable.jay ) ;elseiamge.setImageResource ( R.
drawable.image ) ;return convertView ;} } } end if you still think I write not detailed enough not to look cool me tight The source code to download address affixed to welcome everyone to learn together to discuss rain loose MOMO hope we can progress together .
Related articles:
Beats HeadphonesNeed to follow the two points: 1) find the smallest index button
Need to follow the two points: 1) find the smallest index button.2) its group property set to TRUE. When all the radio button for a group.For example has five radio buttons: the index may be: 1, 5,Dr Beats Headphones, 6,Beats Headphones, 7, 8,Outlet Coach Store, you will need to index 1 button's group property is set to TRUE.
If there are five buttons,Beats By Dre, need to be divided into two groups, one group after the first three groups of two.It is necessary to put the 1's group property is set to true,Cheap Oakley sunglasses Shop, then 7 group set to true.Each is followed in the next sequence number gr.
Related articles:
If there are five buttons,Beats By Dre, need to be divided into two groups, one group after the first three groups of two.It is necessary to put the 1's group property is set to true,Cheap Oakley sunglasses Shop, then 7 group set to true.Each is followed in the next sequence number gr.
Related articles:
Nike Air Max 2012I will become a baby pig pig daddy
I will become a baby pig pig daddy, this is how exciting things, life is a wonderful thing,Nike Running Shoes Men, it is a kind of anticipation,Moncler Men Vest, a hope,Coach Bag Outlet, a dream.# & 160; life is short, most of the people will be at a certain age creates a nexus of the baby, I am a traditional cancer man,Nike Air Max 2012, I love home, love wife, love children, I think there is a cute baby will make life more interesting, so I was looking forward to a pig baby, as long as the healthy growth of the baby, even if daddy pig as a mediocre programmer lived ordinary days,Vibram Shoes, I also feel gratified.
Related articles:
Related articles:
In Ear HeadphonesImperceptibly discover a truth
Imperceptibly discover a truth, it is applicable to almost all things, of course, also applies to the computer network technology,Moncler Jackets, the truth is: anything sideways look like a spindle, and longitudinal see is like an hourglass.
- a hippie desert for you & # 160 & #; 160; 160 & 160 & #; #; sideways look like a spindle presents the goal of things,Nike Air Max Shoes, everything must have a goal,UGG Sale UK, and achieve target way is also different,In Ear Headphones, therefore can come back and through the twists and turns,Nike Store Online, but not controlled, however the target is the same; longitudinal looking like an hourglass represents everything naturally want extensibility, a good design will eventually have a truth in it.
Related articles:
- a hippie desert for you & # 160 & #; 160; 160 & 160 & #; #; sideways look like a spindle presents the goal of things,Nike Air Max Shoes, everything must have a goal,UGG Sale UK, and achieve target way is also different,In Ear Headphones, therefore can come back and through the twists and turns,Nike Store Online, but not controlled, however the target is the same; longitudinal looking like an hourglass represents everything naturally want extensibility, a good design will eventually have a truth in it.
Related articles:
订阅:
博文 (Atom)