[Q] GO SMS PRO editing problem.. - XPERIA X8 Q&A, Help & Troubleshooting

Hey guys...I was trying to edit GO sms pro. I just want to change the app name to "Messaging". I tried changed the string value from go sms pro to messaging. The following string I tried to change (in attachments) but when i tried to smaling it again it is giving the following error(in attachments). Sorry the screenshot is not clear..
Where I am going wrong ??
Help guys..
EDIT : I changed the strings in strings.xml in values folder

You should change app_name, not app_label.
Code:
<string name="app_name">Messaging</string>

In the same strings.xml file ?

Code:
<string name="app_name">GO Message widget</string>
From this ^ I changed to this --
Code:
<string name="app_name">Messaging</string>
But getting the same error..

No, just keep everything as it is, then go to res > values > strings and change
this
Code:
<string name="app_name">GO SMS Pro</string>
to
Code:
<string name="app_name">Messaging</string>
Also, do the same thing to the values folder of your language.
Apktool says something about plurals.xml or something similar. I can't see it clearly. Did you change that?

I didn't changed anything except string name
But wait I can upload the strings.xml. There is no line like this
Code:
<string name="app_name">GO SMS Pro</string>
instead the following is present
Code:
<string name="app_name">GO Message widget</string>
Just rename the extension to xml..

Related

[Q] translations setings apk

can someone may help
i want to translate mising thing in cynomobile rewo a in setings to my language [polish] i need step by step instruction
i was trying but after translation and replacing whit orginal setings apk and reeboot setings gone .
i need list tools and step by step procedure
use apk tool
search for apk tool and a tutorial to use it.
when you now how to basically use it,
install systemui.apk with this string
Code:
apktool if systemui.apk
(the same as framework)
then unpack the settings.apk (apktool d settings.apk etc etc...)
then you can translate the settings.apk in this way:
Change into the /res folder
Code:
Check to see if a values-xx folder exists, where xx is the two letter code of the target language to be translated into.
For example, if you are aiming to translate into German, check for a values-de folder. If it does not exist
(and chances are that if you are translating into a new language, that it will not exist), you need to create it.
Then, copy the arrays.xml and strings.xml files from the /values folder into the folder you just created.
Open these two files (in Notepad ++) and alter the strings (the text in BLACK ONLY).
Look out for things that look like %d and %s /’ - Don’t edit these, as they are variables. Also, if you see &, it represents the ‘&’ sign, so feel free to change it.
Finally, you MUST be sure to place a backslash ‘\’ before an apostrophe, for example Proxy\’s would be the equivalent of Proxy’s.
Once you have translated and edited your arrays.xml and strings.xml files, save them, and return to the root directory of APKTool
then repack the apk as you have learn from using apktool (search for tutorials) and the the work is done!
(press thanks if this post was useful!)
is there posible to flash strings after translation via cwm
and can sombody may help me
i thinking about strings from setings apk and cmparts apk in squadzone rom

How to change the MotoBlur launcher to 5 rows?

I have been trying to change the motoblur launcher to remove the useless search bar, and reclaim that space to have 5 rows on the homescreen. So far, no success.
Here is what I have modified in deodexed Homescreen.apk:
res/layout-port.xml, modified value from 4 to 5:
Code:
launcher:cellCountY="5"
res/layout-port.xml, deleted following 2 lines:
Code:
<include android:id="@id/qsb_bar" layout="@layout/qsb_bar" />
<com.motorola.homescreen.DrawableStateProxyView android:layout_gravity="top|right|center" android:id="@id/voice_button_proxy" android:clickable="true" android:layout_width="80.0dip" android:layout_height="@dimen/qsb_bar_height" android:onClick="onClickVoiceButton" launcher:sourceViewId="@id/voice_button" />
res/layout-land.xml, modified value from 4 to 5:
Code:
launcher:cellCountX="5"
res/layout-land.xml, deleted following 2 lines:
Code:
<include android:id="@id/qsb_bar" layout="@layout/qsb_bar" />
<com.motorola.homescreen.DrawableStateProxyView android:layout_gravity="bottom|left|center" android:id="@id/voice_button_proxy" android:clickable="true" android:layout_width="@dimen/qsb_bar_height" android:layout_height="@dimen/app_icon_size" android:onClick="onClickVoiceButton" launcher:sourceViewId="@id/voice_button" />
res/values/dimens.xml, modified values from 34 to 0, and 40 to 0:
Code:
<dimen name="qsb_bar_height_inset">0.0dip</dimen>
<dimen name="qsb_bar_height">0.0dip</dimen>
res/values-port/dimens.xml, modified values from 37 to 0, and 43 to 0:
Code:
<dimen name="qsb_bar_height_inset">0.0dip</dimen>
<dimen name="qsb_bar_height">0.0dip</dimen>
Anyone knows why it is not working, and what else do I need to do? I had a look at smali code, but have not got a clue where I should start modifying the code.
I think I have it all finally worked out. I have made changes to the XML and SMALI code to remove the search bar, enable 5 rows on the homescreen, and 20 items (instead of 16) with 5 rows in the folders.
The Homescreen.apk compiles fine, signed, zipaligned, but it FC on the phone...
I am kind of giving up now, as to be honest I do not care that much, since I do not use the launcher. But I thought it would be nice for people who use it. So, if anyone wants to take over, here are my changes (only modified .xml and .smali files): View attachment Motoblur_launcher_5_rows_(xml+smali).zip
arman68 said:
The Homescreen.apk compiles fine, signed, zipaligned, but it FC on the phone...
Click to expand...
Click to collapse
You MUST NOT sign this, you should compile as a system apk!
shaftenberg said:
You MUST NOT sign this, you should compile as a system apk!
Click to expand...
Click to collapse
Thanks. How do I do that? Normally, I use apktool with the following command:
Code:
java.exe -jar apktool.jar b <package> <package_NEW.apk>
Well, I don't use apktool via command line. I use the ApkManager, there is an option for creating unsigned (system) apps.
The apktool reference is here:
http://code.google.com/p/android-apktool/wiki/ApktoolOptions
Honestly I can't help the way you work
shaftenberg said:
Well, I don't use apktool via command line. I use the ApkManager, there is an option for creating unsigned (system) apps.
Click to expand...
Click to collapse
Thanks. I have had a look at what the ApkManager tool does for compiling system apps, and it is similar to what I do manually: build apk with apktool, and then inject original META-INF folder. So I do not think that is the issue. Besides, I tried with the bare apk build, then zipaligned, then signed and zipaligned.
I suspect I might need to recompile HomeConfig.apk as well, or maybe (remembering an old thread on xda), make only the smali changes first, compile, decompile the apk with smali changes, and only then do the xml changes (it does not make sense to me, but I will try).
I have got it working!
My mistake was to completely remove the search bar sections from the launcher xml. This is what cause the FC.
I am now using a different approach, which is to set the search bar dimension to 0; this prevents FC in the launcher, and any other application which assumes the search bar exists. I am now busy testing and refining the settings, and will soon have something to post...

[MOD] Enabling Hidden Features like Hide NFC and Call Recording [MOD]

This is absolutely not my work. I pulled and tested the following edits from here. I've been looking for this information for a while now and only came across it by chance. Big thanks to tiboric for putting the information together!
I have also tried some of the CSC apps out there that try to help. I didn't find any that worked if anyone knows of some that work post and let me know. I'll edit this OP but for now if you want something that works, this is the way to go!
This is not my work, just sharing.
To enable these you will need root, a root explorer and text editor.
Simply navigate to system/csc/Features.xml and add the corresponding line to the end of the file but before the very last few lines that say </feature> and </Samsung>
(if this file does not exist, create the csc folder in system and a txt file within it then change the name to features.xml and add the correct lines and save) if this does not work you can try the same method with Others.XML in the same folder
*Make sure you make backups of the stock files in case there are issues.*
Enable WiFi calling in phone settings:
Code:
<CscFeature_Setting_SupportWifiCall>TRUE</CscFeature_Setting_SupportWifiCall>
Enable native voice call recording(maybe illegal is some countries):
Code:
<CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecording>
Enable shutter sound switch in camera settings(maybe illegal is some countries):
Code:
<CscFeature_Camera_ShutterSoundMenu>true</CscFeature_Camera_ShutterSoundMenu>
Enable camera during call:
Code:
<CscFeature_Camera_EnableCameraDuringCall></CscFeature_Camera_EnableCameraDuringCall>
Enable manual rotation option in gallery:
Code:
<CscFeature_Gallery_AddAutoRotationIcon>true</CscFeature_Gallery_AddAutoRotationIcon>
Continuous music while using camera:
Code:
<CscFeature_Camera_CamcorderDoNotPauseMusic></CscFeature_Camera_CamcorderDoNotPauseMusic>
Enable scheduled messaging option in messaging app:
Code:
<CscFeature_Message_EnableScheduledMessage>true</CscFeature_Message_EnableScheduledMessage>
<CscFeature_Message_EnableScheduledMsgBox>true</CscFeature_Message_EnableScheduledMsgBox>
Enable exit buttons in default browser:
Code:
<CscFeature_Web_AddOptionToTerminate>true</CscFeature_Web_AddOptionToTerminate>
Enable 2nd symbol keys on stock keyboard:
Code:
<CscFeature_Sip_UseSymbolInCMKey>true</CscFeature_Sip_UseSymbolInCMKey>
<CscFeature_Sip_EnableSymbolInSecondary>de;en_US;en_GB</CscFeature_Sip_EnableSymbolInSecondary>
Enable VoLTE Support: Thanks to IakobosJ
Code:
<CscFeature_RIL_SupportVolte>true</CscFeature_RIL_SupportVolte>
<CscFeature_IMS_EnableVoLTE>true</CscFeature_IMS_EnableVoLTE>
Remove NFC enabled icon in the status bar: Thanks to evonc
Code:
Delete line : <CscFeature_NFC_StatusBarIconType>DEFAULT</CscFeature_NFC_StatusBarIconType>
Sort app draw alphabetically:
Code:
<CscFeature_Launcher_EnableViewByAlphabetAsDefault>true</CscFeature_Launcher_EnableViewByAlphabetAsDefault>
Remove quick connect and s finder thanks silversurfer9231:
Code:
build.prop... changed property ro.product.name value to "zeroltevzw"
If this isn't allowed I do apologize. I'm just trying to spread the good word! Thanks to tiboric for the guide over in the General Section!
nolimit78 said:
Enable WiFi calling in phone settings:
Code:
<CscFeature_Setting_SupportWifiCall>TRUE</CscFeature_Setting_SupportWifiCall>
Click to expand...
Click to collapse
@mikeyinid you should try popping this in your others.xml with that sales code change. This string is not included in stock tmobile
mrapp said:
@mikeyinid you should try popping this in your others.xml with that sales code change. This string is not included in stock tmobile
Click to expand...
Click to collapse
Indeed, I will tonight.
Cool, used it for app drawer default sort.

[TUTORIAL] Become a Themer

Become a Themer Tutorial By Rock-Star
First rule before to start how to learn to theme your device :
Always make a backup of the files you are about to edit or do a nandroid backup.
If anything goes wrong you will get a bootloop.
If you are modding an apk and you are seeing a textAppearance,color,background
or similar => If the value starts with
"@android:" then you will find the source
in the framework-res.apk of the same rom.
☺ TOOLS you must have ☺
1. APKTOOL [http://code.google.com/p/
android-apktool/]
This tool will allow you to decompile and
compile all apk's
When you decompile an apk, you can now
edit the xml's with a source code editor
like Notepad++
2. NOTEPAD++ [http://notepad-plus-
plus.org/]
This tool will allow you to edit the xml's
decompiled from the apk's
Written on C++ and using Win32API, you
will be able to easily change, copy, trace,
find all the codes you will find in this
guide.
3. ADB [http://developer.android.com/
guide/developing/tools/adb.html]
Android Debug Bridge (adb) is a versatile
command line tool that lets you
communicate with an emulator instance or
connected Android-powered device. You
will be able to push, replace, delete,
overwrite files directly from your
computer to your android device.
4. SMALI/BAKSMALI [http://
code.google.com/p/smali/]
An assembler/disassembler for Android's
dex format.
5. 7-ZIP [http://www.7-zip.org/]
An open source file archiver with a high
compression ratio.
6. PAINT.NET [http://www.paint.net/]
or any other Graphics editor you like to
use as Photoshop or Gimp.
Now let's play with your theme and for that, the very first thing you will need is
to locate :
framework-res.apk
SystemUI.apk
Keep always a safe copy for both of them as you may experiment some issues during
the compile phase, which means that you
did something wrong ( even a small space
or letter ) and you will must come back to
the previous "working" modded version of
your apk.
Don't try to go too fast
Start with one step at once until you feel
experimented enough to edit more things at the time
A good tip to double check if anything goes wrong : your apk must decompile and compile without errors !
Test and flash via Recovery when you are done : if it is working, then you can start from your new framework-res/systemUI
apk's to go further.
1. Status bar
1.1. Clock, Date and notification ticker
It's now much easier to modify the clock in
the status bar as it is now located within a .xml-file.
Files to edit:
/system/app/ SystemUI.apk
DECOMPILED_DIR/res/layout/
status_bar.xml
1.1.1. Clock
Search for a line that begins with
"<com.android.systemui.statusbar.Clock" .
You now have two ways for changing the
font-style and color:
Adding
android:textColor="TEXTCOLOR"
and/or
android:textStyle="TEXTSTYLE"
where TEXTCOLOR can be a HTML color
(#TTRRGGBB - TT means transparency)
and TEXTSTYLE can be "bold", "bold|
italic", "italic" or "" Changing the style of
android:textAppearance.
This can be easier but keep in mind that
this style could be used somewhere else.
A possible new line could be:
<com.android.systemui.statusba
android:textColor="#ffff0000
android:textStyle="italic"
android:textAppearance="@and
TextAppearance.StatusBar.Icon"
android:gravity="left|
center"
androidaddingRight="6.0dip"
android:layout_width="wrap_co
android:layout_height="fill_pa
androidingleLine="true" />
With this you would get an
italic, red clock.
1.1.2. Date
The date which you can see in the status
bar can be modified by editing the line
beginning with
"<com.android.systemui.statusbar.DateView".
As with the clock, you can either add
textColor and textStyle or change the
android:textAppearance
1.1.3. Notification ticker
Search for the line containing "@id/
tickerText" .
It is followed by two other lines which
contain
"android:textAppearance="@androidtyle/
TextAppearance.StatusBar.Ticker"" .
As with the clock, you can either add
textColor and textStyle or change the
android:textAppearance
2. Carrier, Ongoing-Title, Notifications-
Title, Clear-Button, noNotificationsTitle
Files to edit:
/system/app/ SystemUI.apk
DECOMPILED_DIR/res/layout/
status_bar_expanded.xml
2.1. Carrier
Search for the line beginning with
"<com.android.systemui.statusbar.CarrierLabe
This line contains the text for the carrier
and its appearance.
The background for the carrier label can
be changed one line above using the
"android:background" attribute.
It can be a pre-defined color value
(@color/NAME_OF_COLOR ), a html color
value (#TTRRGGBB ) or even a graphics
file ( @drawable/NAME_OF_GRAPHIC ).
2.2. Ongoing-Title
Search for android:id="@id/
ongoingTitle" .
This is the Ongoing-Title.
As with other texts you can add/change
"android:textAppearance",
"android:textColor" and
"android:textStyle"
The background is defined in the
"android:background" attribute.
2.3. Notifications-Title
Search for android:id="@id/latestTitle" .
This is the Notifications-Title.
As with other texts you can add/change
"android:textAppearance",
"android:textColor" and
"android:textStyle"
The background is defined in the
"android:background" attribute.
2.4. noNotificationsTitle
Search for android:id="@id/
noNotificationsTitle" .
This is the text when no notification is
displayed.
As with other texts you can add/change
"android:textAppearance",
"android:textColor" and
"android:textStyle"
The background is defined in the
"android:background" attribute.
2.5. Clear-Button
Search for android:id="@id/
clear_all_button" .
This is the text of the Clear-Button
________________________________________
3. Notifications
Files to edit:
/system/frameworks/ framework-res.apk
DECOMPILED_DIR/res/layout/
status_bar_latest_event_content.xml
In this file you find the texts for :
the title of the notification: Search
for android:id="@id/title" .
Textcolor and textstyle are editable via
style or directly in the xml (see point
1.1.1.)
the description of the notification:
Search for android:id="@id/text"
the time of the notification: Search
for android:id="@id/time"
________________________________________
4. Color of the progress bars and seek bars
4.1. progress bars
Files to edit:
/system/framework/ framework-res.apk
DECOMPILED_DIR/res/drawable/
progress_horizontal.xml
The progress bar uses gradients to set the
color which goes from top to bottom.
You have to set three colors: start (top of
the bar), end (bottom of the bar) and
middle.
<item android:id="@id/background">
is for the unused part of the progress
bar.
<item android:id="@id/progress"> is
for the used part of the progress bar.
4.2. seek bars
Files to edit:
/system/framework/ framework-res.apk
DECOMPILED_DIR/res/values/ styles.xml
Seek bars are progress bar like components
which enables you to change a value within
a range (you will see some in the sound
settings (Settings -> Sound -> Volume) or
when changing the brightness of the
display).
By default, the seek bars are using the
color settings of the progress bar to
display the current position (so it should
be possible to use different ones by using
another .xml than the progress bars).
To modify it, open the styles.xml
Search for <style name="Widget.SeekBar"
parent="@style/Widget"> .
Here you can change :
the height (<item name="maxHeight"> and
<item name="minHeight"> ),
the appearance (<item
name="indeterminateDrawable"> and <item
name="progressDrawable"> )
the graphic of the thumb ( <item
name="thumb"> , res/drawable/
seek_thumb.xml ).
The thumb itself comes in three files,
located in res/drawable-hdpi:
seek_thumb_normal.png
seek_thumb_pressed.png
seek_thumb_selected.png
________________________________________
5. Color of selected text within text fields
Files to edit:
/system/framework/ framework-res.apk
DECOMPILED_DIR/res/values/ styles.xml
Search for <style
name="TextAppearance"> in the
styles.xml.
The color for the selected text is the node
textColorHighlight
________________________________________
6. Transparency
6.1. notification drawer
If you use a ROM that doesn't have a
transparent notification drawer by
default, then you have to do this:
Decompile your SystemUI.apk using
apktool.jar (or just decompile the
classes.dex using baksmali). Browse to the
folder smali/com/android/systemui/
statusbar/ (or com/android/systemui/
statusbar/ if you have just decompiled
classes.dex).
Edit the file StatusBarService.smali.
Search for the following line:
invoke-direct/range {v0 .. v5}, Landroid/
view/WindowManager$LayoutParams;-
><init>(IIIII)V
above that line you must have
const/4 v5, 0x2
change this to
const/4 v5, -0x3
After recompiling SystemUI.apk and
pushing it to the phone you can get
something like this :
6.2. Status bar
If you use a ROM that doesn't have a
transparent status bar by default, then
you have to do this:
Decompile your SystemUI.apk using
apktool.jar (or just decompile the
classes.dex using baksmali).
Browse to the folder smali/com/android/
systemui/statusbar/ (or com/android/
systemui/statusbar/ if you have just
decompiled classes.dex).
Edit the file StatusBarService.smali.
Search for the following line:
invoke-direct/range {v0 .. v5}, Landroid/
view/WindowManager$LayoutParams;-
><init>(IIIII)V
directly above it you will find
const/4 v5, 0x2
change this to
const/4 v5, -0x3
Recompiling SystemUI.apk and pushing it to
the phone (I tested it with the emulator).
__________________
______________________
7. Graphics
After you have decompiled your .apk files
you will end up with a lot of graphic files
in :
res/ drawable-hdpi (or res/drawable-
hdpi-v4 depending on your apktool.jar
version).
This is the right place to edit notification
icons, the notification bar and drawer,
menu item background (list, grid, etc.),
buttons, etc.
Some files will have .9.png . These are
Nine-Patch-files.
You will find more information on those
files :
http://developer.android.com/guide/
topics/resources/drawable-
resource.html#NinePatch
http://developer.android.com/guide/
topics/graphics/2d-
graphics.html#nine-patch
Let's begin with the status bar and
notification drawer:
7.1. Status Bar
To get a new status bar background, you
have to edit the file :
statusbar_background.
You find it in the SystemUI.apk . Can be
.png or .9.png
7.2. Notification Drawer
(The notification drawer constists of
several files.)
7.2.1 Carrier/Provider area
To change the background for the Carrier/
Provider area you have to edit the file :
status_bar_header_background
You find it in the SystemUI.apk . Can be
.png or .9.png
7.2.2 Ongoing and Notifications
To change the background for the Ongoing
and Notifications area you have to edit
the file :
title_bar_portrait
You find it in the SystemUI.apk . Can be
.png or .9.png
7.2.3 Notifications
To change the background for the
notification area you have to edit the file
:
status_bar_item_background_normal
You find it in the framework-res.apk .
This will be the background if you're just
look at the notifications.
When focusing a notification it will be the
file :
status_bar_item_background_focus
when you push/press it you have to edit
the file :
status_bar_item_background_pressed
The notifications are divided by the file
divider_horizontal_bright. Can be .png or
.9.png
7.2.4 Unused area
The area where no notification is displayed
is set in the file :
SystemUI.apk/res/layout/
status_bar_tracking.xml .
You have to change the attribute
android:background of the View-node.
It can be a color-value, a predefined color
or a graphics file.
Depending on your ROM it will even display
transparency. Can be .png or .9.png
7.2.5 Bottom
The bottom part of the expanded drawer is
status_bar_close_on .
You find it in the SystemUI.apk . This will
use transparency too. Can be .png or .9.png
7.3. Animated notification icons
7.3.1 Battery (uncharging)
Depending on your ROM there will be more
or less files for the battery gauge.
They begin with stat_sys_battery_
followed by a number.
The order how they are get displayed is
configured in the file :
res/drawable/ stat_sys_battery.xml .
You find it in the framework-res.apk .
7.3.2 Battery (charging)
Depending on your ROM there will be more
or less files for the battery charging
gauge.
They begin with
stat_sys_battery_charge_anim followed
by a number.
The order how they are get displayed is
configured in the file :
res/drawable/
stat_sys_battery_charge_anim.xml .
You find it in the framework-res.apk .
7.3.3 Download and upload animation
The files for the upload and download
animation begin with
stat_sys_download_anim and
stat_sys_upload_anim followed by a
number.
The order how they are get displayed is
configured in the files :
res/drawable/
stat_sys_download_anim.xml
res/drawable/
stat_sys_upload_anim.xml .
You find it in the framework-res.apk .
8.4. Other files
8.4.1 Title for detailed view in call history
You will find the background for this in
the file title_bar_tall. You find it in the
framework-res.apk .
8.4.2 Title for contacts
You will find the background for this in
the file title_bar_medium. You find it in
the framework-res.apk .
8.4.3 Background for the grid menu
The grid menu is the one when you press
the menu button within an application.
The following files are used and you find
them in the framework-res.apk :
menu_background: This the background
for one grid element.
menu_background_fill_parent_width:
the whole grid
To change the text color you have to set
the color for the style
TextAppearance.Widget.IconMenu.Item in
the file res/values/ styles.xml
After pressing "More" you will find
another menu. The text colors for this
menu can be found in the style
Theme.ExpandedMenu.
________________________________________
9. Applications
9.1. Ongoing downloads
You should have noticed that the text color
of ongoing downloads in the notification
area doesn't look like the text colors for
normal notifications.
To change this color you have to change
the file /system/app/
DownloadProvider.apk .
You'll find the color values in res/layout/
status_bar_ongoing_event_progress_bar.xml .
It uses the same names as the one in the
framework-res.apk. After you have
recompiled it you can flash it to your
phone. You should see the new colors at the
next download.
9.1. Notifications of music player
If you are using the default music player
(/system/app/Music.apk) then you can
change the colors it uses for notifications
as well.
After you have decompiled it, open res/
layout/ statusbar.xml and edit the values :
@id/artistalbum
@id/trackname
Thanks for your time and your attention
Have Fun ☼
#PLEASE PRESS THANKS#
For Any Android Help Message me on WHATSApp- 8889197172

Problem with Java

Hello. I'm new to the forum and to programming aswell. I'm trying to learn how to make an app so I started with a tutorial online, but I'm having a problem. I can't post a link but the tutorial is called "Make Your First Android App: Part 2/3 - Ray Wenderlich". On the section "Accessing Views From Within Java" when I add "android:text= @string/hello_world"" I get an error. On the bottom it says I should be using a @string but when I do the preview window displays the @string/" aswell. What's that about?
Second, I can't rename the string after changing hello_world to something else. Why is the tutorial even saying I should rename it? What will that do?
Lastly, in MainActivity.java above onCreate I have to insert a line of code. The tutorial doesn't explain why I need to do that. Where should the line go, the code is
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
wherever I insert the code and press Alt+Enter I mess up the whole thing...
Sorry that these questions are annoying and basic, I just really want to learn to make apps and I'm trying to figure things out alone.
Thanks.
P.S. one more thing, in "Buttons and Listeners" there is a part saying:
"Then there’s text, for which you need to add a line in strings.xml such as the following:
<string name="button">Update The TextView</string>"
when I do that I get an error in strings.xml
If you are having problems related to Java, the following tips should help you getting things working -
» Download and Install Java
» Use Java
» Test Java
» Remove Old Versions of Java
» Find Java.
basic issues
1) all strings you use needs to be defined in string.xml file, by doing so, you separate messages and names from code and it can be re used in your app from single source, easy to maintain.
2)ALT + ENTER is used to resolve import, when you add code and introduce new class, you need to import it.
3)Oncreate method in activity is used to setup layout for activity and provide content to be displayed on screen for the activity

Categories

Resources