Questions about Android listview - android-listview

If I have more than 100 items in listview then is there any better solution than creating new 100 classes and XML files for staring new activity on click of each list item?
Using switch case and array of list items I can create but I am searching better solution than this
I am new to Android development
If any one having any idea please share it.
Thanks in advance.

You wrote:
"I am having predefined list of items in my project but it is having around 150 items in list and after clicking on item there must be new page which shows some text and images on next page"
So make only one new Activity and display text and images depending on the selected item. At the onCreate-Method of your Activity ask for the selected value from the list (you can transport this item/its name as a String with a Bundle). And depending on the selected item you generate your text and your images and - if needed - their functionality.

Related

Flutter tagging and filtering the data based on tags selected(Multi selection of Tag is possible)

I'm trying to create a new page in which people can view all the people which are providing the services on my platform but can be filtered by using tagging
The filter should happen in such a a way that people who are providing most of the services which are tagged should be on top and based on the number of tags hit the order of people will be maintained most tag hit on top and least tag hit to be on the below side of the search result
For this purpose i'm trying to use "https://pub.dev/packages/flutter_tagging/example" which is a library which helps with flutter tagging
but now i want to add this tag filter to filter my grid based on the tags selected
so basically a search button on top using which the tags can be added
a button to switch the grid to list (i have the code for both grid and list but they ar enot related to my data at the moment)
and finally the tag to filter the data
Step 1:- Once the user clicks on View ALl the user is redirected to next screen
Step 2:- Currently the second screen is just a grid however i want it to have the flutter tagging to filter all people and also a button to change from grid to list
I'm new to flutter so any guide reference will be great
for any question please feel free to ask

Custom Work Item Types don't show in any Board or Backlog?

We've created a new work item type called "Improvement", but found that it does not show in any board or backlog - only search. After some digging in settings, I found this:
Can you really not add new work item types and get them into your workflow along side the default types?
In this page, hover with the mouse on the work item level you want to include your custom item and click "Edit":
In the screen that opens you can add the custom work item.

sharepoint online, set edit item view as default instead new item view

I am working in a small SharePoint project to let school students pre-order the lunch online.
the main idea is the student can login to a school site, fill an order form.
I try use a list form to do it, just simply put a InfoPath form as web part on the home page.
When students open the site, he can fill the order form directly.
but the problem is the default view of this web part is always the new item form. so when a student already make the order, then login to site again,
how can I let him see his order and edit it instead a new order form.
another way may be use the form library, but i don't know how can i transfer the filed from the form to a list. because at last we still need a list instead a bunch of documents to get the summary of order.
Thank you for help.
Perhaps you can use a custom list and show that on the homepage?
A 'custom list' by default only has a title column but by adding more columns through the list settings you automatically add form fields on its new item form.
Since you are creating an order form you might want to hide the title column. Go to the settings of the list, then advanced settings, allow editing of content types. Then back in the list settings click the 'item' content type, then the title column then click the radio button for hidden.

Umbraco 7 lists

I am new to Umbraco, and am trying to get to grips with its concepts, in particular how to create lists. For example, you might want a news listing that appears on a page as a list of headlines with mouseover extra content, but you don't want to be able to click on an item and open a full page, it's just there as a list.
You could create a repeating grid of content on the page itself, but that could become unwieldy.
It looks like (correct me if I am wrong) the Umbraco way is to create a parent page, and each news item to be a child page, which can be edited individually, and use a partial view to list them on the required page.
Is this the recommended approach?
If so, two questions :
How do I exclude these news 'phantom' pages from the main navigation - I understand I could set a true/false property on the page with alias umbracoNaviHide and tick this (which excludes it from 'visible' in the queries)
If so, how do I prevent direct access to the news page by its url (the umbracoNaviHide does not prevent the page opening)
Presumably these news pages would show in the back end main view as they would be descendants of the home page?
Any advice welcome!
You can use a Content Repository to hold content objects that won't be pages in your application.
Use following steps:
Step 1: Create the root content repository document type
Go to your backend to the Settings section. Under Document Types create a new type and give it the name Content Elements. After creating this make sure to check the checkbox of Allow at root in order to add this element to your root in the Content section.
Step 2: Add your newly created document type to the root of the content
Go to the Content section and choose to add a new item directly under content ( select the three dots next to Content ).
Select your Content Elements item, give it a name and click save.
Step 3: Remove the checkbox allow at root
You only want to add one Content Reposity item to your root where you will place all items like news, jobs, locations,...
Go to the settings of the Content Elements document type and remove the checkbox of Allow at root.
Step 4: Create a child repository for each type
Using your example I will now create a News document type which will be a child item of the Content Elements repository.
Go to the Document Types under Setting in your backend and choose to add a new document type. Give it a name News and choose save.
In the settings of the Content Elements check the checkbox of the newly created News item to allow as a child.
Step 5: Add the news list in your content
In the content section choose to add a new item under the Content Elements using the three dots.
Select the News item, give it a name and choose save.
Step 6: Create a new document for the news item
One more item is a NewsItem which will hold the properties/information of the item.
Using the same steps of 4 you can easly add this. Be aware that now you have to go to the News item where you will add a check to the NewsItem checkbox to allow as a child.
Also now define some properties of the newsitem.
Step 7: Add newsitems in the content
Using the same steps from 5 you can now add items in the news list.
Step 8: How to place a content element on to your page
If you have created a page you can add a property with a ContentPicker datatype which can be used to select a item from the Content Elements repository. Or using partial views you can create a list from the News to get all items.
Hope this helps!

Wordpress - Show Portfolio Categories

I'm working with a WordPress website and a client wants to show a list of categories in the footer. Unfortunately, it is showing as empty because he has no posts and has set the categories to portfolio items which he wants people to be able to click to.
So, how do I show the portfolio categories in the widget rather than the post categories?
Thanks,
Jack
Probably the easiest way I can think of to get the result that you want without having to resort to changing any Theme Files would be this:
Log into your Wordpress Dashboard
Navigate to Appearance->Menus
Create a new Menu, and (if applicable) enable the Custom Taxonomies for your menu by clicking on Screen Options (top right-hand corner of the page) and ticking your Portfolio's Custom Categories and/or Custom Post Types
Once all of the items you want is in your Custom Menu, save it.
Navigate to Appearance->Widgets
Add the Custom Menu Widget to the sidebar in which you would like your items to appear
Select the Custom Menu you just created, and Save
When dealing with Premium Themes, it would always be safest to stay out of their code and avoid changing anything altogether, so try this approach first. Otherwise, you may have to get your hands dirty and alter some code or contact the Theme Developer.