Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,166,697 members, 7,865,768 topics. Date: Thursday, 20 June 2024 at 04:50 AM

Srrrr's Posts

Nairaland Forum / Srrrr's Profile / Srrrr's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (of 14 pages)

Phones / Re: Learn How To Develop Android Apps With Your Android Phone by srrrr(m): 12:41am On Oct 23, 2016
DavidTheGeek:


When you open a Fridge to take water, do you close it when done or you leave it open?

The error says missing "}".

You forgot to close the fridge.

public class MainActivity extends Activity
{
isn't closed.

{ - open.... } - close

add } at the end of your MainActivity.java
Thanks, It worked
Phones / Re: Learn How To Develop Android Apps With Your Android Phone by srrrr(m): 8:18am On Oct 22, 2016
DavidTheGeek:
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



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.

Pls mine is showing error, looks like it's from the MainActivity.java




package com.learning.myfirstapp;

import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;

public class MainActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}

// Create a method for the Button onClick attribute


public void showToast(View v) {
Toast.makeText(getBaseContext(), "Hey! You clicked me", Toast.LENGTH_LONG).show();
}






I don't know where the problem is coming from. This is the main.xml







<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="#808000"
android:orientation="vertical" >

<TextView
android:text="I'm cool"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textStyle="italic"
android:textColor="#ffa500" />

<Button
android:id="@+id/click_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="showToast"
android:textSize="17sp"
android:text="Click ME"
android:textColor="#fffff0" />


</LinearLayout>

Phones / Re: My Phone Can't Upload Pictures. HELP!!! by srrrr(m): 8:23pm On Oct 21, 2016
ExAngel007:
yes
Sorry, didn't work
I can't upload anything, pictures, videos and apps too
Phones / Re: My Phone Can't Upload Pictures. HELP!!! by srrrr(m): 8:11pm On Oct 21, 2016
ExAngel007:
yes
OK I will do that now
Phones / Re: My Phone Can't Upload Pictures. HELP!!! by srrrr(m): 8:00pm On Oct 21, 2016
ExAngel007:
c heck the extension of the pic file. Make sure it ends with (.jpeg)

Thanks for the reply, But they're .jpg files. do I still need to rename it to .jpeg
Phones / My Phone Can't Upload Pictures. HELP!!! by srrrr(m): 6:40pm On Oct 21, 2016
I'm using glo #1K for 3.2gb on my BlackBerry Q10.

I tried creating a topic on NL and up loading photos, but it didn't work, so I thought it was the browser 's fault (opera mini), so I used chrome, but still didn't work. I even used the default browser, copied all the photos to sd card, reconfigured my APN, but all efforts failed.

So today I tried upload photos to whatsapp and even my google drive storage, It didn't work.

Pls is it the subscription or the phone settings.
This is the first time I'm using the 1K sub, what will do.

I can't even upload anything
Politics / Re: Senate Moves To Legalise Lobbying In Nigeria by srrrr(m): 4:18pm On Oct 13, 2016
bb
Phones / Re: 11 Tech Things We Did Back In Day That Seem So Freaking Weird Now by srrrr(m): 8:56pm On Oct 12, 2016
space 4 sale. grab it b4 it hits FP.
Email; reccession@dullard.bubu

2 Likes

Sports / Re: How Mikel Stopped NFF From Hijacking Dollars Given To Dream Team By Japanese Bus by srrrr(m): 3:09pm On Aug 21, 2016
TheGoodJoe:


NFF is independent. They are not government officials.
Zombie spotted

7 Likes

Sports / Re: How Mikel Stopped NFF From Hijacking Dollars Given To Dream Team By Japanese Bus by srrrr(m): 3:00pm On Aug 21, 2016
What if the Japanese sees this? FG disgracing this country since 1960

6 Likes

Phones / Re: Amazing Charger That Charge With Ur Breath by srrrr(m): 12:04am On Aug 18, 2016
DesChyko:
I'm not comfortable with stuff like that being over my nose..

I'll hang it where it'll charge faster instead..

Over my assh0le..

After a meal of beans with kulikuli for dessert cool
abi...


BREAKING NEWS: Beans + kulikuli + Eva wine = wireless charging

1 Like

Phones / Re: Resurrection Remix For Techno L8 Users by srrrr(m): 11:32pm On Aug 17, 2016
swisscarter:
hmmmm?? Who's this?
What an old man can see, even if you climb up-bunk in 400 series, you will not see it

1 Like

Phones / Re: Resurrection Remix For Techno L8 Users by srrrr(m): 11:45pm On Aug 16, 2016
swisscarter:
Resurrection remix v5.5.9 is available for tecno l8.

Resurrection Remix V5.5.9

ROM features

WORKING:

WiFi

Dual sim

Camera (Front & Back)

Data connection on both sims

Flashlight

Bluetooth

Hotspot

Audio

Microphone

USSD

Sync

GPS

Audio record

Video record

Internal and External storage mounting on PC

NOT WORKING:

VPN

Switch

Download link

http://mtkhaven..com.ng/2016/08/resurrection-remix-559-for-tecno-l8.html?m=1
Ik I've caught you
Otu kpe re kpe
wait! is that your blog
Phones / Re: Owning The Gionee M5 Plus Is A Privilege by srrrr(m): 11:00pm On Aug 15, 2016
iamlammy:

With this ur write up ..m sure u are a paid gionee agent
The gionee m5 plus battery doesnt even last up to 24 hours on heavy usage...i av frnds who use d phone
with that heavy amigo ui, how will the phone battery last 24 hours of heavy usage
Phones / Re: Which Network Is This Fast In Nigeria? (PIX) by srrrr(m): 10:32pm On Aug 15, 2016
Those apps are telling lies
Phones / Re: How To Transfer Files With Your Computer Using Xender App by srrrr(m): 6:53am On Aug 13, 2016
coollabman:



PROCEDURES
You dont have to install xender on your computer because its an apk file and does not work on windows.
steps
1. Open Xender on your phone , click
on the airplane icon to connect. At the bottom of the screen, select the icon with computer image with the name 'PC/MAC'
2. Click on Create hotspot of select the icon with the Hotspot logo.
3. Go to your computer, turn on your WIFI and check the list of available networks, you will see XENDER_APC1FA. click on it to connect.
4. when connected. move over to your browser( use firefox or uc web for pc) and type the following in your address bar : http://192.168.43.1:33455 and cli
ck enter. The url to be entered will be shown on your phone incase it difffers with devices, go with the one on your phone.
5. After click enter, a pop up will prompt on your phone screen telling to accept or cecline connection with your PC. select Accept, and wait for 2 seconds. Everything about your phone will be loaded on the browser of your computer, the rest is left for you to do.
thanks
Phones / Re: Advice: Phones Between 30-35k by srrrr(m): 6:29am On Aug 13, 2016
fados4sure:

What is the need of buying a 4g LTE phone when Nigeria boring network don't even have it yet?
ntel already has 4g
mtn are rolling out 4g this year.
Airtel too
Phones / Re: Creating Secured Connection: Nokia Problem, Any Help by srrrr(m): 6:24am On Aug 13, 2016
Dullahi:
That's because it's no longer supported. He can download UC or Opera Mini browser.
OK thanks
Phones / Re: What Is The Best Game You've Played On Phone? by srrrr(m): 6:13am On Aug 13, 2016
gta sa

11 Likes

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (of 14 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 32
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.