Atmega8, atmega16, the smallest system board, the first praise is here!

2023-01-20   ES  

PUBLIC Class MainAICTIVITITITY Extends AppComPatactivity { 

     Protected void onCreate (Bundle Savedinstancestate) { 
         Super.Oncreate (Savedinstancestate); 
         setContentView (r.Layout.activity_main); 
         // 1 Find the control we care about 
         ListView lv = (listview) FindViewByid (; 
         // Set the data adapter 
         lv.setadapter (New MyAdapter ()); 

     Private Class MyAdapter Extends Baseadapter { 

         public int getCount () { 
             Return 7; 

         Public Object GetITITEM (Int Position) { 
             Return null; 

         Public Long getItemid (int position) { 
             Return 0; 

         Public View GetView (Int Position, View ConvertView, ViewGroup Parent) {{ 
             // 1 Find a way to convert the layout we defined into a view object 
             View view; 
             if (convertView == null) { 
                 /*Create a new View object, you can convert a layout resource into a View object by a pitch 
                     Resource is the layout file we define 
                     1. Get the pitch service 
                     view = view.inflate (getApplicationContext (), R.Layout.item, null); 
                     2. Get the pitch service 
                     View = layoutinflator.from (getApplicationContext ()). Inflate (R.Layout.item, Null); 
                 // 3. Get the airplane service 
                 Layoutinflator inflationer = (layoutinflaater) getSystemService (layout_inflator_service); 
                 View = Inflater.inflate (R.Layout.item, NULL); 
             } else { 
                 // Reuse historical cache objects 
                 view = convertView; 
             Return view; 


Related Posts

Intermediate (CDN) VPN in the network

Virtualization deployment — Virtual machine installation of virtual machines, virtual machine management commands, virtual machine transmission in Linux system, virtual machine snapshot Rengar

Small (Java version)

Vue3 family barrel

Atmega8, atmega16, the smallest system board, the first praise is here!

Random Posts

WINDOWS Implementation File Delete

Redis Learn (8) The way Java connects redis -Jedis

[Ley Li reprinted] HighCharts combined with Phantomjs pure background to generate picture series two PHP2

Relations in early literature extraction papers to sort out, hurry up!

HDU 1238 Substrings