The document discusses ListViews and ListActivities in Android. It covers:
- How ListViews display scrollable lists using an Adapter to provide data and layouts
- How ListActivities simplify list handling by predefining list interaction methods
- Implementing ArrayAdapters with standard or custom layouts
- Improving performance by recycling list item views
- Creating custom adapters to define flexible row layouts
- Allowing row views to interact with the underlying data model
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAhsanul Karim
These slides are for self-learners and trainees of my BASIS and DIIT Android course.
I have used information, content and images from various sources. As these materials are for non-commercial use, I think they won’t infringe any copyright issue.
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAhsanul Karim
These slides are for self-learners and trainees of my BASIS and DIIT Android course.
I have used information, content and images from various sources. As these materials are for non-commercial use, I think they won’t infringe any copyright issue.
The prime objective of “Online MCQ Quiz application” is to take quiz for any individuals through internet. Multiple choice questions (MCQ) will arrive for user with certain time limit for each quiz. “Online MCQ Quiz application” is an android app for making the competitive job exams easier. This app targets users who preparing for different kinds of government and non-government jobs like BCS (Bangladesh Civil Service), bank jobs etc. Users can read online and saved it for future offline reading. All the study materials are divided into chapters, topics, and subtopics and topic related. User can take exams on various subject and get points for his performance which will determine their rank among all the users. User can also take quiz for preparation before taking exams. Users can also request for a particular topic or a discussion.
This post will walk you through Android ListView Tutorial for building simple and customized ListView using different Android adapters.
List is one of the most common UI patterns, which is being used extensively to display the collection of data elements in rows. In android ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array.
Grid View- GridView is a ViewGroup that displays items in a two d.pdfdeepua8
Grid View:
- GridView is a ViewGroup that displays items in a two dimensional,
scrollable grid. The grid items are automatically inserted to the
layout using a Adapter.
- An Adapter (BaseAdapter or ListAdapter) is the bridge between a
List/Grid View and the data that fill the view.
- Grid View implementation is a perfect example of Model View
Controller approach.
Grid View shows elements.
The Adapter manages the model defining information structure
and providing data to the view.
The method setOnItemClickListener(new OnItemClickListener()
{..});
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.grid_view);
GridView gridview = (GridView) findViewById(R.id.gridview);
gridview.setAdapter(new ImageAdapter(this));
gridview.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView parent, View v, int position, long id) {
Log.d(TAG,
\"\" + position);
}
});
}
Scroll View:
Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger
than the physical display.
- A ScrollView is a FrameLayout, meaning you should place one child in it containing the entire
contents to scroll; this
child may itself be a layout manager with a complex hierarchy of objects. A child that is often
used is a LinearLayout in
a vertical orientation, presenting a vertical array of top-level items that the user can scroll
through.
- The TextView class also takes care of its own scrolling, so does not require a ScrollView, but
using the two together is
possible to achieve the effect of a text view within a larger container.
- ScrollView only supports vertical scrolling
...
List View:
- ListView is a ViewGroup that creates a list of scrollable items. The
list items are automatically inserted to the list using a ListAdapter.
- The ListAdapter extends Adapter creating the bridge between a
ListView and the data that backs the list.
- The ListView can display any data provided that it is wrapped in a
ListAdapter.
- You can use default Adapters like the ArrayAdapter that use a List
of String object as input and by default expects that the provided
resource id references a single TextView.
- You can create your own Adapter to create customized ListViews
according to a specific application requirements.
Solution
Grid View:
- GridView is a ViewGroup that displays items in a two dimensional,
scrollable grid. The grid items are automatically inserted to the
layout using a Adapter.
- An Adapter (BaseAdapter or ListAdapter) is the bridge between a
List/Grid View and the data that fill the view.
- Grid View implementation is a perfect example of Model View
Controller approach.
Grid View shows elements.
The Adapter manages the model defining information structure
and providing data to the view.
The method setOnItemClickListener(new OnItemClickListener()
{..});
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
.
Lecture 5: Storage: Saving Data Database, Files & PreferencesAhsanul Karim
This slide is made for Shikkhok.com Android course. To get the video lectures visit: http://www.shikkhok.com/%E0%A6%95%E0%A7%8B%E0%A6%B0%E0%A7%8D%E0%A6%B8-%E0%A6%A4%E0%A6%BE%E0%A6%B2%E0%A6%BF%E0%A6%95%E0%A6%BE/android-app-development/
এই সেশনে নিম্নলিখিত বিষয়গুলো সম্পর্কে খুব সংক্ষিপ্তভাবে আলোচনা করা হয়েছেঃ
১) বিভিন্ন মোবাইল এপ্লিকেশন প্লাটফর্ম (যেমনঃ আইফোন, এন্ড্রয়েড, ব্ল্যাকবেরী, উইন্ডোজ ফোন ইত্যাদি)
২) এন্ড্রয়েড প্লাটফর্ম-এ এপ্লিকেশন তৈরির সুবিধা
৩) গুগল প্লে স্টোর
৪) Application development trends ইত্যাদি।
যারা খুব দ্রুত কাজ শুরু করতে চান তারা নিশ্চিন্তে এই সেশনটি স্কিপ করতে পারেন। তবে এই সেশনের স্লাইডটির শেষে কিছু রিসোর্সের লিঙ্ক দেয়া আছে সেটি দেখতে পারেন।
Mobile Banking in Bangladesh: An Incomplete StudyAhsanul Karim
This is an incomplete study on Mobile Banking in Bangladesh. Feel free to use this for educational purpose. A more detailed version will be available soon.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
2. List View
●Android provides the view "List View" which is capable of
displaying a scrollable list of items.
●"ListView"gets the data to display via an adapter. An adapter which
must extend "Base Adapter" and is responsible for providing the data
model for the list and for converting the data into the fields of the
list.
●Android has two standard adapters
- Array Adapter
-Cursor Adapter
● "Array Adapter" can handle data based on Arrays or Lists while
"SimpleCursorAdapter" handle database related data. You can
develop your own Adapter by extending these classes or the Base
Adapter class.
3. List Activity
●You can directly use the "List View" in your layout as any other UI
component. In case your Activity is primary showing a list you can
extend the activity "List Activity" which simplifies the handling of a
"List View".
● "List Activity" extends "Activity" and provides simplified handling of
lists. For example you have a predefine method if someone clicks on
a list element.
●"List Activity" contains a "List Adapter" which is responsible for
managing the data. This adapter must be set in the onCreate()
method of your Activity via the method setListAdapter().
●If the user select in the list a list entry the method onListItemClick()
will be called. This method allows to access the selected element.
4. List Activity
●Android provides already some default layouts which you can use in
your Adapter, e.g.
-"android.R.layout.simple_list_item1". In case you don't want to use
one of the pre-defined layouts your own layout must have an
element with the id "@android:id/list" which is the ListView.
-You can also use a view with the id "@android:id/empty". This view
is displayed if the list is empty. For example you could display here
an error message.
5. ListViews and performance
●Displaying a large dataset must be efficiently implemented on a
mobile device. Therefore the ListView only creates views (widget) if
needed and attach them to the view hierarchy.
●The default Adapter implementation for a ListView will recycle
views, e.g. if a row is not displayed anymore it will be recycled and
only its content will change.
● If you implement your own adapter for a view you also should do
this to avoid performance problems.
6. ListActivity with ArrayAdapter and Android
standard layout
●Create a new Android project "com.basistraining.listactivity" with
the activity "MyList".
●You do not need to change the default layout "main.xml". Create the
following activity.
public class MyList extends ListActivity {
/** Called when the activity is first created. */
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
// Create an array of Strings, that will be put to our ListActivity
String[] names = new String[] { "Bangladesh", "India", "China", "Japan",
"Denmark", "Australia", "Germany", "Indonesia"}
// Create an ArrayAdapter, that will actually make the Strings above
// appear in the ListView
this.setListAdapter(new ArrayAdapter<String>(this,android.R.layout.
simple_list_item_1, names));
}
7. ListActivity with ArrayAdapter and Android
standard layout
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
// Get the item that was clicked
Object o = this.getListAdapter().getItem(position);
String keyword = o.toString();
Toast.makeText(this, "You selected: " + keyword, Toast.LENGTH_LONG)
.show();
}
9. ListActivity with own layout
●You can also define your own layout for the rows and assign this
layout to your row adapter. We will add a graphic to each list entry.
●Create the following layout file "rowlayout.xml" in the res/layout
folder of your project"com.basistraining.listactivity".
10. ListActivity with own layout
●Change your activity "MyList" to the following. This is almost the
same coding as in the previous example,
●The only difference is that we are using our own layout in the
ArrayAdapter and telling the adapter which UI element should
contains the text.
13. ListActivities with flexible layout
●The following uses an image "no.png". I placed it in the "res/drawable-
mdpi" folder. You must maintain your own icon. In the easiest case just
copy "icon.png" to "no.png" and use a drawing program to change it a little
bit.
●If you want to influence the display of the different rows you can define
your own adapter and override the getView() method. This method is
responsible for creating the individual rows of your "ListView". getView()
need to return a View (containing several others) for each row.
●For this read the pre-defined layout via the class "LayoutInflator" and
return one individual view per row. We extend ArrayAdapter but we could
also directly implement "BaseAdapter“
●If "convertView" is not null we re-used this view. Android recycles rows
(views) which are not displayed anymore. Using exsting rows saves
memory and CPU consumption.
14. ListActivities with flexible layout
●Our implementation will also use the so-called "ViewHolder" pattern. The
method findViewById() is a expensive operation, therefore we should
avoid doing this operation if not necessary.
●The ViewHolder stores a reference to the required views in a row. This
ViewHolder is then attached to the row via the method setTag().
●Every view can get a tag assigned. If the row is recycled we can get the
ViewHolder via getTag() method.
●This seems like a lot of overhead but is much faster then the repetitive
call of findViewById().
15. ListActivities with flexible layout
●We still using the project "com.basistraining.listactivity". Create the
following class "MyArrayAdapter.java".
19. Rows interacting with the data model
●Your row layout can also contain views which interact with the
underlying data model.
●For example you can have a "Checkbox" view in your row and if the
checkbox is selected you change the data which is displayed in the
row.
●We still use the same project. Create a new row layout
"rowbuttonlayout.xml“.
21. Rows interacting with the data model
●create for this example the class "Model" which hold the name
and the information if this element is currently selected.
22. Rows interacting with the data model
●Create the following Adapter. This adapter will add a listener on the
Checkbox. If the checkbox is selected the underlying data of the
model is also changed. Search Checkbox gets its model element
assigned via the setTag() method.