2017년 4월 18일 화요일

List View Problem ( Please Help!!! )


I want to link " List view "  text list

each name to  make a phone call

I don't know how to do that .Is it possible?

I want to create with list view a phone list with names and when you press it to make calls.

Fro example John - 100 , Mary 200 etc...

Can someone help me please?

--
Yes, you can do something with a listview like that.  What have you tried?



Do you know how to use a ListView to do other things?   To use it to make phone calls will be very similar.    You can use two lists, one with the names, the second with the numbers in the same order they are in the name list.  Set the ListView to show the name list and in the ListView.AfterPicking block place the code to select the corresponding item in the number list and use that to make the phone call.

-- 
I'm completely newbie in coding, im only good at designing, this is the reason i like appinventor, i like its visual style.

The only thing i did and know is to create list with names :

" when a button is clicked - set list view to - make a list  - "text here" "


"You can use two lists, one with the names, the second with the numbers in the same order they are in the name list."


I don't understand exactly your example, is there an example?


"Set the ListView to show the name list and in the ListView"


Its the only thing i did, i created a " list view" with the names i want , tested to my phone and successfully works!!! 


"Set the ListView to show the name list and in the ListView.AfterPicking block place the code to select the corresponding item in the number list and use that to make the phone call."


How can i do that? This is my problem, i want to connect each list block to do functions not only calls but to link to web pages.

You need to Know java to do some advance functions in appinventor?, in appinventor help only shows blocks explanation not the combination of commands or what you need to do some apps ( correct me if im wrong)

-- 
You started experimenting and found out a lot.

Here is a basic app doing what you described:
You " want to connect each list block to do functions not only calls but to link to web pages."    Yes, you can do that, instead of or in addition to the phone blocks you can use either a WebViewer or an ActivityStarter to point to a Web page.
⦁ Using the Activity Starter
Open the browser to a designated Web page
Use these ActivityStarter with the VIEW action and a DataUri  to open the phone’s browser to a designated web page, for example,
Action: android.intent.action.VIEW
DataUri: http://mit.edu

Using a WebViewer: put the component on your Designer screen;  use the following block...   call WebViewer.GoToURL and place a Text box in the puzzle piece like    http://mit.edu  to link to the Web page.

either will work but use different techniques.

I recommend you do some of the tutorials and read the Inventor's Manual .. doing so will help you program.

We want you to have fun with App Inventor and learn to program.  Here are some resources to help you learn to use the AI2 tools  A very good way to learn AppInventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  

How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Still having a problem, post some blocks and someone probably can provide specific advice.

-- 
I really appreciate your time to help me Steve.

But I have some questions , to realize whats going on with the blocks diagram:

( "call PhoneCall1.MakePhoneCall")

Do i need " phone call " component, not for add a phone number to it, but to add its functions to the blocks? 
Appinventor understands this command  "call PhoneCall1.MakePhoneCall" , so it can add call function to the list?

"set global name list"  "    " Initialize global name list"

Whats is their meaning - use to the blocks code, and whats their differences?, if there are...

"set screen1 title to Phone Call1 Phonenumber "

This 2 blocks use is to show at the title of the screen the title we want to write ?

What blocks make the appinventor to "understand" that we want to combine list names with numbers?

Is there a book that explains the code blocks not separate like the help manual , but the combination like my example i asked you, or a deep analysis of what its block do?, how do you now that this blocks required ?, i mean you know programming ? you know Java? Do i need to learn Java? 

or through examples step by step through experience you learn like my example? Iam really confused about what are the requirement of learning to code in appinventor.

-- 
You need to read  the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks. We already told you what the phone blocks do (   http://ai2.appinventor.mit.edu/reference/components/social.html#PhoneCall    )..  If you do not understand that explanation you need to probably take the free course mentioned here.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  

How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .


Perhaps you need to put away this Project for the moment.  Read the free ebook, do some tutorials and learn how to program with App Inventor Blocks.  You do not need to learn Java to program with App Inventor but if you want to be a professional programmer, you will probably need to learn Java.

-- 
Thank a lot Steve!!

you help me a lot.

I made it!!!

I create the lists like you said!!! 

The block diagram helps me!!! ( i take a part of it )

I understand by myself some functions but, i need a  lot of practice to understand deeper in programming.

I will read the books and tutorials you linked.

SUPER!!!!!

Thanks a lot.!!!!

-- 

댓글 없음:

댓글 쓰기