Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

New to Android Studio, how do you make an app that outputs the last 2 letters of the entered word?  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a project i need to finish in a week but i cant get the hang of java at all, the only language ever did is C#. If any of you have the time and will to help i would greatly appreciate it. The first part of the app should go something like this:
Input: "Android"
Output: "id"
Without the "" of course
 
Ranch Hand
Posts: 172
1
Android Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you start , have you successfully run a "Hello World " simple program ?
 
Saloon Keeper
Posts: 5288
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you have so far, and where are you stuck making progress?
 
Stanko Bugarcic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
https://imgur.com/a/cpmjWFg
This is where i'm at so far, and now that you say it, i haven't run the Hello World yes, and it seems my emulator is not showing the app. The phone interface is there but i dont know how to open the app. Am i missing something?
 
Randy Tong
Ranch Hand
Posts: 172
1
Android Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Move setContentView to the line after super.onCreate(...)'
2. Make sure you have edittext and textview in activity_main
 
Stanko Bugarcic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, i fixed the first one, and the activity main has it as you can see: https://imgur.com/a/kDX34OC, unless you mean something else. But i still got some stuff unsolved:
1. Where do i go from here, how do i make the substring that takes the last two letters of the main string, and how do i output it?
2. How do i fix the emulator, it is not showing me the app, only the regular phone functions?
 
Randy Tong
Ranch Hand
Posts: 172
1
Android Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The xml image you posted is not enough for us to check.Please post the full xml.

For the second question:

2. How do i fix the emulator, it is not showing me the app, only the regular phone functions?


Wonder have you created an AVD ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!