what does "?" mean in Android styles.xml files mean? - android

in Android Framework source code ~/core/res/res/values/styles.xml
there's one line:
<item name="android:textColor">?textColorPrimaryInverse</item>
Could anyone tell me:
What does "?textColorPrimaryInverse" mean?
Where is "textColorPrimaryInverse" referenced ?

Please check this link. So, you can get the idea about the textColorPrimaryInverse: http://developer.android.com/reference/android/R.attr.html#textColorPrimaryInverse

Related

btsnooz.py not parsing android BT log

I'm trying to follow the instructions found here:
https://inneka.com/programming/android/bluetooth-hci-snoop-log-not-generated/
and here:
https://source.android.com/devices/bluetooth/verifying_debugging#debugging-with-bug-reports
I am able to get the log, run the python code to parse it and and it runs successfully (on my Mac) however when I open the file it looks like a bunch of gibberish. Which I'll paste below. Is there a special log viewer I need to open this up with? I might be doing something dumb, anyone run into this? Thanks!
‚xcƒc7f3‚xcƒc8]‚xcƒc< Ö  C‚xcƒc<˘ 
‚xcƒc#l
˘¸Ù∂§‚xcƒcAæGG‚xcƒcFDˇˇˇÃˇÔˇˇˇ¸Ú˲?˜èˇa˜ˇˇ¯ˇˇˇˇˇˇ¿‚xcƒcFÈ‚xcƒcJ∫ø˛œ˛€ˇ{á‚xcƒcKëV‚xcƒc‚SV‚xcƒc‰®m‚xcƒcÈ!m‚xcƒcÍL‚xcƒcÓn‚xcƒcÔç‚xcƒcÛè3‚xcƒcÙnz‚xcƒc˘>z‚xcƒc˙p ‚xcƒc˛Y Ä‚xcƒcˇY
‚xcƒdÍ ˚‚xcƒd‹ ‚xcƒd‡ ˇˇˇˇˇ‚xcƒd ‚ ‚xcƒd
* Ô‚xcƒd
* ‚xcƒd©* Ä‚xcƒdu/ ‚xcƒdÕ/ ˚H˚H‚xcƒd®# ‚xcƒd¡# H‚xcƒdÇ ‚xcƒd£ ‚xcƒdfˇˇˇˇˇˇø=‚xcƒd!â‚xcƒd"S‚xcƒd%ù‚xcƒd)À) ‚xcƒd.) ‚xcƒd.î. Ñ‚xcƒd2k. ‚xcƒd3.E‚xcƒd=èE‚xcƒd=ˆG‚xcƒdBøG‚xcƒdC-C‚xcƒdGC‚xcƒdGp$```
The comment at the top of the btsnooz.py script explains how to open the generated file:
This script extracts btsnooz content from bugreports and generates a
valid btsnoop log file which can be viewed using standard tools like
Wireshark.
Wireshark can be obtained from here.

Porting a Java SDK to Xamarin.Android, binding Library error regarding types

I am working on porting a Java SDK to Xamarin.Android.
After solving numerous errors, I am stuck in this one:
/Users/alejandro_l/Projects/KontaktBeaconSDK/KontaktBeaconSDK/obj/Debug/generated/src/Com.Kontakt.Sdk.Android.Ble.Configuration.Scan.EddystoneScanContext.cs(65,65): Error CS1715: Com.Kontakt.Sdk.Android.Ble.Configuration.Scan.EddystoneScanContext.EventTypes': type must beSystem.Collections.Generic.ICollection' to match overridden member `Com.Kontakt.Sdk.Android.Ble.Configuration.Scan.AbstractProfileSpecificScanContext.EventTypes' (CS1715) (KontaktBeaconSDK)
For solving the error I though that it should be OK to use the following line in the metadata.xml telling the generator to change the type of the method to match with the abstract class:
<attr path="/api/package[#name='com.kontakt.sdk.android.ble.configuration.scan']/class[#name='EddystoneScanContext']/method[#name='getEventTypes' and count(parameter)=0]" name="managedType">System.Collections.Generic.ICollection</attr>
Based on: https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/customizing-bindings/java-bindings-metadata/#managedType
The generated output still has the wrong shape:
static IntPtr id_getEventTypes;
public override unsafe global::System.Collections.ICollection EventTypes {
// Metadata.xml XPath method reference: path="/api/package[#name='com.kontakt.sdk.android.ble.configuration.scan']/class[#name='EddystoneScanContext']/method[#name='getEventTypes' and count(parameter)=0]"
[Register ("getEventTypes", "()Ljava/util/Collection;", "GetGetEventTypesHandler")]
get {
if (id_getEventTypes == IntPtr.Zero)
id_getEventTypes = JNIEnv.GetMethodID (class_ref, "getEventTypes", "()Ljava/util/Collection;");
try {
return global::Android.Runtime.JavaCollection.FromJniHandle (JNIEnv.CallObjectMethod (Handle, id_getEventTypes), JniHandleOwnership.TransferLocalRef);
} finally {
}
}
}
As you can see System.Collections.ICollection is generated and not System.Collections.Generic.ICollection.
Note: I even still did not figure it out how to also set the generic type, but that is the next step.
I am a newbie in binding and I cannot figure it out. Can someone tell me what I am doing wrong? Am I trying an impossible here? Do I need to change the source code of the SDK? (Notice that if I use "Build" and change manually the output I may get the dll in a future (still 49 errors left though) but I wonder if I can solve in a proper way).
Another useful link I used: https://gist.github.com/brendanzagaeski/9607158
Found it:
<attr path="/api/package[#name='com.kontakt.sdk.android.ble.configuration.scan']/class[#name='EddystoneScanContext']/method[#name='getEventTypes' and count(parameter)=0]" name="return">System.Collections.Generic.ICollection<Com.Kontakt.Sdk.Android.Ble.Discovery.EventType></attr>
It seems the error has disappeared due to name="return". I do not know why return does not appear in the documentations but it appears in the api.xml so it should be OK.

Android Add PinIt Button using Pinterest Jar NoClassDefFoundError

I am trying to add the Pinit button to my Android App. I have downloaded the SDK and copied the pinit-sdk-1.0.Jar into my Project/libs folder. I'm even able to make the necessary PinItButton import to my code. But for whatever reason, my XML isn't finding the Button widget, and so I tried to add it just using Java with this code:
LinearLayout ll = (LinearLayout)findViewById(R.id.pinterest_layout);
PinItButton pinit = new PinItButton(this);
ll.addView(pinit);
I know this is the correct way to add something using code because I tested it by adding a generic Button first. I run my project then, and it crashes on the line where I set up the PinItButton. This is the error that my logcat spat back at me:
07-22 01:19:52.160: E/AndroidRuntime(32367): java.lang.NoClassDefFoundError: com.pinterest.pinit.PinItButton
I believe that I'm understand what it is telling me, but what else should I be attempting then to create the PinIt button? Any help would be great. Thank you!
It was #Kai who helped me figure out my problem. I needed to check my libraries. I did that by going to project --> Properties --> Java Build Path --> Order and Export tab, then checking the library and clicking OK. My problem was then solved!

ADT18 update but some style have mistake

i have update my ADt18.when i run my early app and sdk2.3,the eclipse give me mistake,the mistake appear at res\value\style, the detail is:
<style name="RatingBarSmall" parent="#android:Widget.RatingBar.Small">
<style name="ListSeparator" parent="#android:style/Widget.TextView.ListSeparator.White">
i found the RatingBar.Small have not support,how to modify it. why update the adt
the style not to useful
Google doesn't allow anymore these kind of parents...
http://daniel-codes.blogspot.com.es/2011/08/new-to-android-more-style-restrictions.html

android phonegap if timeout fallback

i'm trying to do a fallback on a timeout event!
ive set super.setingeterproperty("loadurltimeoutvalue", 60") so i can simulate it. Been searching around and havent found alot of answers to this.
I'm trying to do this: if timeout event -> load page from assets folder.
this so i can hide the error message that occurs on timeout. that error message contains the address to the site being loaded, and i dont want that at all to show up anywhere.
if (mWebView.loadUrlTimeout == currentLoadUrlTimeout) {
//super.loadurl("android_assets bla bla")
}
Found that code here, but cant get it to work. i think there are lots of parts missing, to the code, as i tried stripping it.
I am still pretty fresh to this, so there might be really logical flaws which i just dont see.
Any help greatly appreciated :)
Try setting following property in the activity before loading the page, it should work:
super.setStringProperty("errorUrl", "file:///android_asset/www/error_page.html");
setStringProperty has been deprecated in 3.0. Use config.xml instead:
<preference name="ErrorUrl" value="myErrorPage.html"/>

Categories

Resources