android - I'm trying to make a simple salary counting program. But i cant recieve the data from the other class to the main activity -


itemprop = "text">

This is my main activity is new to Android i know some basics of java now but onclick listener i manupulate data can not do.

  package com.examp.emp; Import android.support.v7.app.ActionBarActivity; Importroid.os.Bundle; Import android.view.Menu; Import android.view.MenuItem; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.Button; Import android.widget.EditText; Public class main activity actionbusiness activity (employee employee); @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_main); Button BT = (button) Find VVBID (R.B.ton1); Find the last editTextAd = (edit text) VVBIID (RID Edit Text 1); Last editTextEd1 = (EditText) findViewById (R.id.editText2); Last editTextEX2 = find (edit text) VVBIID (RIDAdetect 3); Click on Bt.setOnClickListener (New OnClickListener) {@Override Public Zero (click V) {// TODO auto-defined method stub int sa = Integer.parseInt (ed.gettext (.) ToString ()); Int da = integer parseInt (ed1.gettext (.) ToString ()); Emp.salary = sa; Emp.day = da; Double tot = emp.compute (); Ed2.setText ("+ +);}}})}}  

Category:

  Public class employees provide main activity { Double Pay; Intake; Public Double Count () {Double OK = (Pay / 30) * Day; Double Total = Pay - OK; Total Return;}}  

Enter the code here My errors in this login are:

  10-28 02: 57: 00.616: E / Android time (926): Fatal exception: main 10-28 02: 57: 00.616: E / Android timeTime (926): Process: com.examp.emp, PID: 926 10-28 02: 57: 00.616: E / Androindertime (926): ja Va.lang .NullPointerException 10-28 02: 57: 00.616: E / AndroidRuntime (926): at com.examp.emp. $ 1.onClick (MainActivity.java:33) Main Activity 10-28 02: 57: 00.616: E / AndroidRuntime (926): At android.view.View.performClick (see .java: 4438) 10-28 02: 57: 00.616: E / Android Random (926): On Android. View.View $ PerformClick.run ( See. Java 18422) 10-28 02: 57: 00.616: E / Android Random (9 26): Android. Handlear Awnoldle Callback (Handler. Java: 733) 10-28 02: 57: 00.616: E / Andorrentime ( 926): On Android. Os.Handler.DispatchMessage (Handler. Java: 9 5) 10-28 02: 57: 00.616: E / Android Time (926): Android.OS Lopper Oops (Looper.java:1236) 10-28 02:57: 00.616: E / Android Random (926): Android. App ActivateTrade.Mine (ActivityTrad.Java0101017) 10-28 02:57: 00.616: E / Android Random (9 26): at java.lang.reflect.Method.invokeNative (Native Methods) 10-28 02: 57: 00.616: E / AndroidDime (926): at java.lang.reflect.Method.invoke (Method.Java T-15) 10-28 02: 57: 00.616: E / Androordantum (926): com.android.internal.os.ZygoteInit $ On MethodAndArgsCaller.run (ZygoteInit.java:779) 10-28 02:57: 00.616: E / Android Random (926): at com.android.internal.os.ZygoteInit.main (Zeigoteinit.jagatatermar) 10-28 02: 57: 00.616: E / Android timeTime (926): On the dual system. NativeVertainMine (Basic Method) 10-28 03: 02: 01.006: I / Process (926): Sending Signal PID: 926 Signature: 9  

Please help me. I will be very good .... `

Your employee is never started < / P>


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -