DavidTheGeek's Posts
Nairaland Forum › DavidTheGeek's Profile › DavidTheGeek's Posts
1 2 3 4 5 6 7 8 ... 26 27 28 29 30 31 32 33 34 (of 34 pages)
Akayshittu:Hope you found the excerpt i've shared insightful. Here's more info about the book... The book is intersting and practical. You'll be inspired right from chapter one cuz stories of real life people who have started businesses on their own is used as examples through out the book. At the end of each chapter some key points are highlighted just in case you missed them while reading. The book has 181 pages and it's not authored by a Nigerian. |
. |
folks4luv:Hehehe my front row student you're back. Oya read previous posts and get to work. Ask questions if you need help. |
Toluene15:I've posted that already. Check my previous posts. |
Most of the people who flocked to the event were sent back home on rumbling stomach's and are still waiting for a miracle to credit their accounts. [color=#ff0000]They should check my signature[/color] |
lexiconkabir: ![]() |
"national treasure" ![]() |
This is serious |
MOVING ON.... BUTTON We're still working on our app. Button A Button is a Push-button which can be pressed, or clicked, by the user to. perform an action. Attributes The following are the important attributes related to Button control. You can check Android official documentation for complete list of attributes. * android:text - This is the Text to display. android:text="Click Me" * android:id - This supplies an identifier name for this view eg android:id="@+id/button1" * android:onClick - This is the name of the method in this View's context to invoke when the view is clicked. eg android:onClick="showToast" There are 2 ways to respond to a button click. 1. Using the Button onClick attribute 2. Registering an onClick Event listener Lets use the Option 1 first... To respond to button clicks using onClick attribute, you need to create a method in your activity (in this case MainActivity.java) and then invoke it in your Button package com.learning.myfirstapp;public void showToast(View v) showToast is the name i chose to call the method i created. You can name it anything you like. In your main.xml, add onClick attribute and invoke the method: android:onClick="showToast" ********** Click menu and Run. Open your app and click the button. A toast message should appear.
|
Reyginus:Not bad. The background color tho ![]() |
phensbassey:Copy and paste your code here. |
Reyginus:Read yorex2011 post above. |
Reyginus:Okay. Well the 1st method is quicker when coding. Tho it's not adviceable to use it for big projects. |
Reyginus:Have you added style and increased the text size? |
yorex2011:Also, by using the 2nd method, you can apply style (bold and italic) at different points of a text. Example: <string name="title"><b>This text is a bold text</b> while this other <i>text here is italic</i></string> Bold - <b>text here</b> Italic - <i>text here</i> yorex2011 i see you. Thanks for the contribution |
. |
chocolateme: I see you o. |
....Typing |
They are all fighting for themselves. *** So you want to learn how to build android apps but you don't have a laptop.... Issorite check my profile and join the thread for tutorials on how to develop apps with your android phone. Hurry, class has started already! |
folks4luv:Good. /> is a closing tag. < is an opening tag. > i'll call this tag "suspension tag" For better understanding i'll give examples. <TextView ....... this means you've started writing codes for textview. When you open a fridge to take water, you should close it when done abi no be so? That's what /> does. It means you've finished writing the code for TextView. > is used on a Parent to close and accomodate its children. A viewgroup is a parent, while view objects are its children. Example... <LinearLayout ...... i'm done writing the codes inside here. Close me> Add children here. </LinearLayout> |
mikky234:You're welcome to the thread. Are you following us or you're just passing by? |
deekseen:Good. |
folks4luv:That means you wrote a wrong color code. (Most likely you didn't add # before ff0000) Write "#ff0000" after =" |
fweshskaz:Sorry bro i'll probably drop my number later. We are continuing here. |
folks4luv:I've added the screenshots. You can check them now. |
folks4luv:ASAP. This tutorial class, though we just started, has started rubbing off on my time & pocket. So i've decided to conclude the tutorial i started here, take a break, do some planning, (thereby giving space for new interested Nairalanders to join and catch up) & proceed in another way. |
I'm having issues attaching image.... My data is exhausted. I'm using Free Basics. ******* UPDATED.. Image added |
LETS CONTINUE.... Android - User Interface (UI) Controls User Interface simply means what you see on the screen. A View is an object that draws something on the screen that the user can interact with and a ViewGroup is an object that holds other View (and ViewGroup) objects in order to define the layout of the user interface. Layout(s) are defined in an XML file which offers a human-readable structure for the layout In the main.xml file that was created on aide, ViewGroup is: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > </LinearLayout> LinearLayout is a view group that aligns all children (view objects eg TextView) in a single direction, vertically or horizontally. While View object is: <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="I am a TextView" /> TextView is for showing text. **************************************** There are a number of View objects provided by Android that allow you to build the user interface for your app. For example: TextView, EditText, Button, ImageView etc. In this tutorial, we'll be working with TextView & Button. *************************************** TextView This control is used to display text to the user. Button A button can be pressed, or clicked, to perform an action. ****************** A view object may have a unique ID assigned to it which will identify the View object uniquely within the View Group. The syntax for an ID, inside an XML tag is − android:id="@+id/text_id". (Bolded in TextView code above) LETS GET TO WORK... In this tutorial, we will buid a simple app that shows a Text and a Button. When the button is clicked, a toast message would show on the screen. EDIT MAIN.XML.... ADD BUTTON By defult, there's a TextView already, simply add betton code uder... like this... <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center"> <TextView android:text="@string/hello_world" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <Button android:id="@+id/click_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click Me" /> </LinearLayout> Check image below to see how your main.xml file should look now.... Let's add a background color... Add this android:background="#ffffff" code to in <LinearLayout........ Also lets add color to our text.... Add this android:textColor="#ff0000" code to in <TextView........ Click menu and select Run. Install app. App background should be white. Text should be red and a button should be visible now. Let me know if you got it right, so i'll continue.
|
Mrluv:Whatsapp starred message could be used |
folks4luv:Whatsapp would be faster since i can explain step by step with an screenshots. For referencing you guys could use Whatsapp starred message feature. |
1 2 3 4 5 6 7 8 ... 26 27 28 29 30 31 32 33 34 (of 34 pages)
[color=#ff0000]They should check my signature[/color]
