So............. I have the disaster of a code you'll find next.
It's from Android Studio, and it is the following.
-----------------------------------------------------------------------------------------
package [login to view URL];
import [login to view URL];
import [login to view URL];
import [login to view URL];
import [login to view URL];
import [login to view URL];
import [login to view URL];
public class MainActivity extends AppCompatActivity {
private TextView T1;
private Button B1;
@Override
public void onCreate(Bundle savedInstanceState) {
[login to view URL] (savedInstanceState);
setContentView (R.layout.activity_main);
T1 = (TextView) findViewById ([login to view URL]);
B1 = (Button) findViewById ([login to view URL]);
}
public void IndicateTime (View view) {
long TouchDown;
long TotalDuration;
[login to view URL](new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if ([login to view URL] () == MotionEvent.ACTION_DOWN) {
TouchDown = [login to view URL] ();
} else if ([login to view URL] () == MotionEvent.ACTION_UP) {
TotalDuration = [login to view URL] () - TouchDown;
}
return true;
}
}
}
-----------------------------------------------------------------------------------------
I do not understand a single bit of what I'm doing.
But.
What I want, is, someone to fix the code, in order to make a little app which just have 1 button, and 1 text, and that: When you Press the Button, and Release it, It Tells you How Much Time Have Passed from When It Was Pressed.
Just That.
I leave a ScreenShot of the Code in Android Studio attached.
Hello I am professional programmer. I work as Android programmer and have developed several apps already. Hire me for your job to be done well at low costs.
Hi, I'm Himanshu from The Highsense Technologies.
We here your request and ready to help you as per your requirements!
We expertise in Android Application Development!
we glad to help you for fixing code issues!
after I seen your code, I suggest you to add an One method more which gives totaltime , you have used in time_down method it mix up both.
in Total Time Method You have to put
Time_Up - Time_Down ;
both variables mentioned in their methods!
we request you to award this work to us!
we hope to here you soon!
Thank You
Hi there.
I recently made an app on java which generated a UI with two text boxes and a dropdown menu too so I feel like what you need is similar to what I just did.
If that is the case I can help you out in no time :)
As the app that i made was recent I feel like I would be a good pick because everything i did is still fresh in my mind.
I have had done this same project only small variance.
I will provide you with the working code in mean time.
Feel free to contact any time for further details.
Thank You