i have some doubts related to view flipper in android
1>when to use setAnimation and setInAnimation/setOutAnimation? or what the difference between them?
2>can u decipher push_left_in.xml in animation folder(available in sample folder in sdk) as i have to make push_right_in.xml ?
HTML:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
I've just started developing my first app a couple weeks ago, I learned coding in flash and with HTML(not 5).
I'm developing an aggregator app to help you check stuff on your device faster.
I am completly stuck on the simpliest thing, I need to know how to properly add @string's to my XML for buttons, etc. and how to add to the strings file so I dont get those warnings.
Also I want to know how to add a new activity to my project without deleting the MainActivity's "strings" file.
Thank you so much to anyone who can guide me!! I need this app done for me to get a passing grade in my class. Whoever helps gets my apps free for life when i'm a puplisher. Thank you so much!!
Sent from my HUAWEI-M835 using xda app-developers app
Ok.
Add a string this way:
Code:
<string name="[name goes here]">[the string]</string>
(Add this in the strings.xml file in the res/values directory.)
Then in your app you can get it this way:
Code:
String s = getString(R.string.[name goes here]);
Set the text in the xml file that way:
Code:
<Button ...
android:text="@string/[name goes here]"
... />
Add the Activity the normal way. You do not need a second strings.xml file. Just add it to the old one. One for everything.
That helps alot, but,
But whenever I add the @string/ before the text it changes the button name on the visual editor to @string/...."
Also when I added a new activity it replaced my strings file, deleting what I thought was proper strings.
Sent from my HUAWEI-M835 using xda app-developers app
crazy4creationstudios said:
That helps alot, but,
But whenever I add the @string/ before the text it changes the button name on the visual editor to @string/...."
Also when I added a new activity it replaced my strings file, deleting what I thought was proper strings.
Sent from my HUAWEI-M835 using xda app-developers app
Click to expand...
Click to collapse
Which revision of the Android SDK do you have? Updating might help.
Could you please post some pieces of your code which do not work (just the important parts, you can change the names etc.)?
Also im using the SDK and IDE from Google (Eclipse).
And Java JDK
Sent from my HUAWEI-M835 using xda app-developers app
crazy4creationstudios said:
Also im using the SDK and IDE from Google (Eclipse).
And Java JDK
Sent from my HUAWEI-M835 using xda app-developers app
Click to expand...
Click to collapse
Eclipse has not been created by Google. But this does not matter.
Which version of the SDK did you install? (To check this and whether updates are available open the SDK manager. You might need to do this as an administrator.)
I don't know, i'll check in a few minutes at lunch. I downloaded it about 2 weeks ago.
I'll post the codes then too.
Btw none of the code is custom it is from Eclipse when I used the GUI tools
Sent from my HUAWEI-M835 using xda app-developers app
nikwen said:
Eclipse has not been created by Google. But this does not matter.
Which version of the SDK did you install? (To check this and whether updates are available open the SDK manager. You might need to do this as an administrator.)
Click to expand...
Click to collapse
I know but developer.google.com includes it with the ADT bundle.
And I meant to send that b4 u replied haha
Sent from my HUAWEI-M835 using xda app-developers app
Codes
nikwen said:
Which revision of the Android SDK do you have? Updating might help.
Could you please post some pieces of your code which do not work (just the important parts, you can change the names etc.)?
Click to expand...
Click to collapse
Im using API level 17 the Rev. is 2 im using the latest version for x86 systems (32-bit)
My strings file looks like this:
<resources>
<string name="title_activity_socialpage1">Socialpage1</string>
<string name="action_settings">Settings</string>
</resources>
And my Main xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="c4cs.try4.everydayagian"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="c4cs.try4.everydayagian.MainActivity"
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</activity>
<activity
android:name="c4cs.try4.everydayagian.Socialpage1"
android:label="@string/title_activity_socialpage1"
androidarentActivityName="c4cs.try4.everydayagian.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="c4cs.try4.everydayagian.MainActivity" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
And finally, my Activity_main's XML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
androidaddingBottom="@dimen/activity_vertical_margin"
androidaddingLeft="@dimen/activity_horizontal_margin"
androidaddingRight="@dimen/activity_horizontal_margin"
androidaddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="32dp"
android:text="Web" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button1"
android:layout_alignParentRight="true"
android:layout_marginRight="46dp"
android:text="Social" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button1"
android:layout_below="@+id/button1"
android:layout_marginTop="41dp"
android:text="To Do" />
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/button3"
android:layout_alignBottom="@+id/button3"
android:layout_alignRight="@+id/button2"
android:text="News" />
<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/button3"
android:layout_below="@+id/button3"
android:layout_marginTop="48dp"
android:text="Weather" />
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button5"
android:layout_alignRight="@+id/button4"
android:text="Button" />
</RelativeLayout>
crazy4creationstudios said:
Im using API level 17 the Rev. is 2 im using the latest version for x86 systems (32-bit)
My strings file looks like this:
<resources>
<string name="title_activity_socialpage1">Socialpage1</string>
<string name="action_settings">Settings</string>
</resources>
And my Main xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="c4cs.try4.everydayagian"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="c4cs.try4.everydayagian.MainActivity"
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</activity>
<activity
android:name="c4cs.try4.everydayagian.Socialpage1"
android:label="@string/title_activity_socialpage1"
androidarentActivityName="c4cs.try4.everydayagian.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="c4cs.try4.everydayagian.MainActivity" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
And finally, my Activity_main's XML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
androidaddingBottom="@dimen/activity_vertical_margin"
androidaddingLeft="@dimen/activity_horizontal_margin"
androidaddingRight="@dimen/activity_horizontal_margin"
androidaddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="32dp"
android:text="Web" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button1"
android:layout_alignParentRight="true"
android:layout_marginRight="46dp"
android:text="Social" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button1"
android:layout_below="@+id/button1"
android:layout_marginTop="41dp"
android:text="To Do" />
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/button3"
android:layout_alignBottom="@+id/button3"
android:layout_alignRight="@+id/button2"
android:text="News" />
<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/button3"
android:layout_below="@+id/button3"
android:layout_marginTop="48dp"
android:text="Weather" />
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button5"
android:layout_alignRight="@+id/button4"
android:text="Button" />
</RelativeLayout>
Click to expand...
Click to collapse
What is the exact name of your strings file and where is it located?
Where are the problems in the rest of the code?
try right clicking the button or textview from the graphical layout page of your xml. then go to edit text and click on project resources at the top. this should list all the strings that you have. you can choose a string that you have already made or you can click the new string button to create a new string directly from there.
In the "res" folder directory near "layout", where Eclipse puts it automatically.
The other errors were in the manifiest becuase I had ".r" in some wrong places (wich I dont get becuase I never did it in the first place
Sent from my HUAWEI-M835 using xda app-developers app
crazy4creationstudios said:
In the "res" folder directory near "layout", where Eclipse puts it automatically.
The other errors were in the manifiest becuase I had ".r" in some wrong places (wich I dont get becuase I never did it in the first place
Sent from my HUAWEI-M835 using xda app-developers app
Click to expand...
Click to collapse
What does "near layout" mean? Is it in the res/value folder? And is the file called "strings.xml"?
Yes, I just checked
Its in the res/values folder named strings.xml
Sent from my HUAWEI-M835 using xda app-developers app
nikwen said:
What is the exact name of your strings file and where is it located?
Where are the problems in the rest of the code?
Click to expand...
Click to collapse
Did you see that?
nikwen said:
Did you see that?
Click to expand...
Click to collapse
Yeah. The other problems I was having are:
My Manifiest has some incorrect snippets that I didnt add involving action settings(?) Check my strings it was one from it
Sent from my HUAWEI-M835 using xda app-developers app
crazy4creationstudios said:
Yeah. The other problems I was having are:
My Manifiest has some incorrect snippets that I didnt add involving action settings(?) Check my strings it was one from it
Sent from my HUAWEI-M835 using xda app-developers app
Click to expand...
Click to collapse
It was one from it? Which one? We cannot tell what is wrong with your app if we do not get enough information. You know where the error occurs. If you want help, provide us the information we need.
It has got nothing to do with that, but it is still something to correct: In the line
Code:
android:value="c4cs.try4.everydayagian.MainActivit y" />
there is a space between Activit and the y. Remove the space.
Ill find some more specific sections when I have the class tommorrow and PM it to you.
Sent from my HUAWEI-M835 using xda app-developers app
crazy4creationstudios said:
Ill find some more specific sections when I have the class tommorrow and PM it to you.
Sent from my HUAWEI-M835 using xda app-developers app
Click to expand...
Click to collapse
Great.
Set the android:targetSdkVersion to 17 in your manifest
Envoyé depuis mon CINK SLIM avec Tapatalk
hi,
in different customization of the same device for region or operator , we find some option in system configuration enabled in some and other no then we can do it by changing variable value in application files in system by decompiling and recompiling after modifying ( bools or arrays...etc ) it take a lot of time
so customization Sony has choose to make a little files for a region customization or enabling or disabling option in system app without modifying the original app file by using {real_application_name}-res.apk what will be adding in /system/vendor/overlay
in 4.0.4 and before sony ericsson used /system/etc/customization/ folder for enabling and parameterizing apps, so in JB 4.2 and 4.3or 4.4 these files are incompatible only 4.3 and 4.4 are compatible (attached files)
for JB 4.2
4.3 and 4.4
How to use ??
example :
for enabling data traffic notification and status icon in status bar we must change in or semcphone.apk phone.apk this line after decompiling Phone.apk or SemcPhone.apk in res/value/bools/xml we find a default value of application :
Code:
<bool name="data_connection_except_mms_can_clear_icon">true</bool>
<bool name="data_connection_except_mms_show_icon_when_disabled">true</bool>
<bool name="data_connection_except_mms_show_icon_when_enabled">false</bool>
Click to expand...
Click to collapse
they must be change to :
Code:
<bool name="data_connection_except_mms_can_clear_icon">false</bool> ----->[COLOR="red"] icon always visible can't be removed[/COLOR]
<bool name="data_connection_except_mms_show_icon_when_disabled">true</bool>
<bool name="data_connection_except_mms_show_icon_when_enabled">true</bool>
Click to expand...
Click to collapse
then it can be inserted in com.phone-res.apk and injected in system/vendor/overlay and rebooting after that the options are activated.
just know what value to want be activated in the main application apk
Another exemple :
in this post http://forum.xda-developers.com/showthread.php?t=2703113 to have mod for activating low cost in conversations.apk but with decompiling main apk conversations.apk but the simple one is using -res.apk
default value are :
Code:
<bool name="character_conversion">false</bool>
<bool name="character_conversion_visibility">false</bool>
Click to expand...
Click to collapse
and must be changed to
Code:
<bool name="character_conversion">true</bool>
<bool name="character_conversion_visibility">true</bool>
Click to expand...
Click to collapse
then modifing com.sonyericsson.conversations-res.apk
after decomiling
we have
Code:
[CODE]
[/CODE]
res
|-------> bools.xml -------------> to be modified
|-------> public.xml ---------------important contains all variable defined
bools.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="three_digit_number_linkify">true</bool>
<bool name="delivery_report">true</bool>
<bool name="mms_retrieval_during_roaming_visibility">true</bool>
[COLOR="Red"]<bool name="character_conversion">true</bool>
<bool name="character_conversion_visibility">true</bool>[/COLOR]
</resources>
public.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="bool" name="three_digit_number_linkify" id="0x7f020000" />
<public type="bool" name="delivery_report" id="0x7f020001" />
<public type="bool" name="mms_retrieval_during_roaming_visibility" id="0x7f020002" />
[COLOR="red"]<public type="bool" name="character_conversion" id="0x7f020003" />
<public type="bool" name="character_conversion_visibility" id="0x7f020004" />[/COLOR]
<public type="bool" name="enable_send_empty_message" id="0x7f020005" />
<public type="integer" name="max_recipients" id="0x7f030000" />
<public type="integer" name="mms_max_size" id="0x7f030001" />
<public type="integer" name="sms_max_segments" id="0x7f030002" />
<public type="integer" name="mms_trigger_sms_segments" id="0x7f030003" />
</resources>
and recompile , push it in system/vendor/overlay and done.
Hello,
I have a Pyrana settings that launches several utilitaires.Je would add Viper but I can not find the command to start? an idea?
Link to xml:
<PreferenceScreen android:icon="@drawable/ic_viper" android:title="Viper">
<intent android:targetPackage="com.vipercn.viper4android_v2" android:action="android.intent.action.MAIN" android:targetClass="???????????????????" />
</PreferenceScreen>
Thank you in advance
Hi all
I'm running a Nexus 6P on a carrier which does not support volte / vowifi officially. But I managed to get all the specific values for this carrier. But the big question is, how to implement those values into the phone?
I did some research and found out that some parameters are specified in the carrierconfig app. An example:
HTML:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<carrier_config_list>
<carrier_config>
<int name="vvm_port_number_int" value="1808" />
<string name="vvm_destination_number_string">122</string>
<string name="carrier_vvm_package_name_string">com.tmobile.vvm.application</string>
<boolean name="carrier_volte_available_bool" value="true" />
<string name="vvm_type_string">vvm_type_cvvm</string>
<boolean name="carrier_volte_tty_supported_bool" value="false" />
<boolean name="carrier_wfc_ims_available_bool" value="true" />
<boolean name="carrier_ims_gba_required_bool" value="true" />
<int name="maxMessageSize" value="1048576" />
<int name="maxImageWidth" value="2592" />
<int name="maxImageHeight" value="1944" />
<int name="volte_replacement_rat_int" value="3" />
</carrier_config>
</carrier_config_list>
Search for platform/packages/apps/CarrierConfig to find it
So I tried to decompile the carrierconfig app and add my carrier aswell, but unfortunately I can not install the app again (parsing error, defect package). But where is the rest of the data stored (P-CSCF address, used algorithms, ePDG address and so on) ?? How was VoLTE / VoWiFi Calling brought to AOSP roms for EE and T-Mobile USA??
Thanks for your help!