yashsingh1/xdaforums huggingface dataset:
[Java for Android App Development] Jonny:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.prefs);
SetupActionBar();
setTheme(getHtcThemeID(context, 3));
}

Move the setTheme to above addPreferences so its like the below code:

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(getHtcThemeID(context, 3));
addPreferencesFromResource(R.xml.prefs);
SetupActionBar();
}
[Java for Android App Development] Nx Biotic:
Still getting FCs
[Java for Android App Development] mikrosmile:
Log ?

Отправлено с моего HTC One_M8 через Tapatalk
[Java for Android App Development] Nx Biotic:
Main activity cannot start, context is null according to AIDE
[Java for Android App Development] mikrosmile:
the full log post here pls
[Java for Android App Development] Nx Biotic:
Cant save the log in AIDE currently... but

View attachment 2724062View attachment 2724064View attachment 2724065
[Java for Android App Development] mikrosmile:
your Context is null. try this

@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.prefs);
[B][COLOR="Red"]context = this;[/COLOR][/B]
SetupActionBar();
setTheme(getHtcThemeID(context, 3));
}

if this doesnt work, then getActivity();
[Java for Android App Development] Nx Biotic:
We're golden, thanks man

Edit: If someone needs an HTC Preference activity for Sense 6, Source will be available on my git.
[Java for Android App Development] Nx Biotic:
How about would I implement a method where the app checks to see if its the correct HTC Sense version/device but if it isnt, just throws out a dialog saying for the user it isnt capadible with their device instead of getting a force close. Trying to see what I could do by the app looking in the /ect/sdk/sdkinfo.xml and checking for Sense version onCreate.

Edit: I see HTC Sense 6 apps with meta data in manifest saying Sense Version 6.0

Would this filter out devices on google play?
[Java for Android App Development] Exquisite Apps:
Is it possible to get the resources for the Switch in Sense 6 UI?

I would like to integrate it in my app but do not want to use opensensesdk since it should be available on all devices.

Is there a possibility to get them?
[Java for Android App Development] mikrosmile:
Decompile com.htc.resources (From any Sense base rom) and get all you need
[Java for Android App Development] Exquisite Apps:
Thanks you so much. This helped me a lot. Thank you.
[Java for Android App Development] Exquisite Apps:
Sorry for writing again but I have a problem which you can hopefully solve.

I did as you said and decompiled com.htc.resources

After this I searched for a switch in the styles and found the following:

<style name="Widget.HTCDeviceDefault.CompoundButton.Switch" parent="@*android:style/Widget.DeviceDefault.CompoundButton.Switch">
<item name="android:thumb">@drawable/switch_inner_holo_dark</item>
<item name="android:track">@drawable/switch_track_holo_dark</item>
</style>

So I searched for the specific files:

switch_inner_holo_dark.xml

<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/switch_thumb_disabled_holo_dark" />
<item android:state_pressed="true" android:drawable="@drawable/switch_thumb_pressed_holo_dark" />
<item android:state_checked="true" android:drawable="@drawable/switch_thumb_activated_holo_dark" />
<item android:drawable="@drawable/switch_thumb_holo_dark" />
</selector>

switch_track_holo_dark

<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/switch_bg_focused_holo_dark" />
<item android:drawable="@drawable/switch_bg_holo_dark" />
</selector>

Then I copied over the specific files from the drawable folders and assign the styles to my switch like this:

<Switch xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tb_editMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:thumb="@drawable/switch_inner_holo_dark"
android:track="@drawable/switch_track_holo_dark" />

But the Switch actually looks like the default android switch. Did I oversee something? Actually the resources which I copied over looks like this so I don't think I get the right resources.

Any help appreciated.
[Java for Android App Development] mikrosmile:
I don't think you found the right switch resources. The name should be HtcSwitch and not the Compound.Switch.

I'll look tomorrow for this, as I did the resource implementation without libs approximately last year
[Java for Android App Development] Exquisite Apps:
That would be really great if you would do that. I will look again and try to find it.

Will write if I found it.

Thanks.
[Java for Android App Development] Exquisite Apps:
Unfortunately I don't find anything. So I would be really glad if you could look into this. Sorry for bothering you.
[Java for Android App Development] Nx Biotic:
Just wanted to confirm this is the solution if you plan on releasing Sense 6 apps on playstore. Just check out Blinkfeed's manifest for Sense 6 meta data and add it to your manifest and it filters out every device except HTC Sense 6 powered devices on Google Play.
[Java for Android App Development] mikrosmile:
Added info on how to add SlidingMenu using the SDK http://xdaforums.com/showpost.php?p=40028901&postcount=2

Only the basic information, rest is your imagination. Add background, header, widht, shadow depth etc and etc.

Enjoy ;)
[Java for Android App Development] MaartenXDA:
It's great to see you're steel active in this thread! Thanks!
[Java for Android App Development] Nx Biotic:
Now to figure out how to apply the HTC theme to a layout like in Blinkfeed and we pretty much got everything down.

Edit:Apparently this is called a HTC Masthead?

Achieving this would make great material ui app concepts for Sense.
[Java for Android App Development] mikrosmile:
Updates to SlidingMenu.

mSlidingMenu.setFadeEnabled(true);

- add this to enable Fading effect. when you closing it, the behind will be darker (like File manager)

mSlidingMenu.setMode(0);

- mode 0 is left, mode 1 is right.
[Java for Android App Development] mikrosmile:
This is what you can achieve with the SlidingMenu and some experience in general app development :)

this took me 20 min to build

[YOUTUBE]kZwfY8L-ZJE[/YOUTUBE]
[Java for Android App Development] fisha21:
Really great to see this thread getting updated.

Active guide threads like this are getting more rare on xda, so [MENTION=4382376]mikrosmile[/MENTION] and [MENTION=4184142]Jonny[/MENTION] - know that your efforts are appreciated :)
[Java for Android App Development] mikrosmile:
Well, i didnt forget about this thread.

Its just i dont know what to cover and what else requires explanation.

If something new in the SDK i can figure i post it here
[Java for Android App Development] Nx Biotic:
I was thinking about making a demo apk for each guide. Thatd be fun
[Java for Android App Development] Nx Biotic:
Im not having any luck with this. I dont even see a class for it in the sdk

http://xdaforums.com/showthread.php?p=54507211
[Java for Android App Development] mikrosmile:
Well, it's specific layout for the BlinkFeed .

You can find it in com.htc.launcher.masthead.xxx
[Java for Android App Development] Nx Biotic:
What im trying to achieve with my Sapphire launcher is create a mimic sliding menu of Blinkfeed but it would be active menu. Il have to look into this more.
[Java for Android App Development] Nx Biotic:
Edit: I couldn't get the above method mentioned for sliding menu to work for the life of me so I tried the simple method and works just perfectly so il post the simple guide later with source.
[Java for Android App Development] Nx Biotic:
Example of sliding menu

package com.mycompany.myapp;

import android.app.*;

import android.os.*;

import android.view.*;

import android.widget.*;

import com.htc.widget.*;

import com.htc.configuration.*;

import android.content.*;

public class MainActivity extends Activity

{

private ActionBarExt actionBarExt=null;

private ActionBarText actionBarText=null;

private ActionBarContainer actionBarContainer=null;

private Window window;

private MainActivity context;

public static int getHtcThemeID(Context context, int i)

{

return HtcWrapConfiguration.getHtcThemeId(context, i);

}

private void SetupActionBar() {

actionBarExt=new ActionBarExt(this,getActionBar());

actionBarContainer=actionBarExt.getCustomContainer();

actionBarText=new ActionBarText(this);

actionBarText.setPrimaryText("Sense");

actionBarContainer.addCenterView(actionBarText);

}

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

context = this;

window = getWindow();

setTheme(getHtcThemeID(context, 1));

setContentView(R.layout.main);

SetupActionBar();

SlidingMenu mSlidingMenu = new SlidingMenu(this);

mSlidingMenu.setBehindWidth(500);

mSlidingMenu.setFadeDegree(0.5F);

mSlidingMenu.setFadeEnabled(true);

mSlidingMenu.setMode(0);

mSlidingMenu.setTouchModeAbove(0);

mSlidingMenu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);

mSlidingMenu.setMenu(R.layout.menu);

}

}
[Java for Android App Development] Nx Biotic:
Does anyone have the HTC Blinkfeed api and willing to share it?
[Java for Android App Development] mikrosmile:
There is no such thing
[Java for Android App Development] Nx Biotic:
Yes it is, its a partner api from HTC Dev console you have to get approved for to get and i was hoping to get it to skip the process of waiting lol. I think thats where my masthead layout exist

---------- Post added at 07:06 PM ---------- Previous post was at 07:03 PM ----------
[Java for Android App Development] mikrosmile:
You are wrong. Those api for getting supported in your app by the BlinkFeed for example. There is no any layout or other classes. All this is inside prism
[Java for Android App Development] laehmic:
Thanks for your great guide! Do you know how to get tinted statusbar and navigationbar?
[Java for Android App Development] Jonny:
There's a couple of ways of doing it. First is that you could add a couple of lines in styles.xml (Google it, can't remember off the top of my head) or you could use a 3rd party library such as SystemBarTint.
[Java for Android App Development] laehmic:
I want it to match the htc skin related actionbar/switch/checkbox colors, can't do that in styles.xml. Since this is a coding guide I don't see the point of you mentioning the use of a 3rd party app, I wan't to know the way htc is doing it..
[Java for Android App Development] Nx Biotic:
What i have found is that the native Translucent style doeant work for the HTC Actionbar. I havnt tried it yet but if you decompile any HTC Application (for instance, prism) you see their are HTC Theme Styles marked by number according to the theme chosen by the user in the firmware. I would take the time to look at how the style is formatted and copy it over or base your style off of it and see if it gives you the transparent Statusbar/Navigation Bar your wanting. The only time ive noticed the HTC theme to actually cooperate with translucent is when the theme is set to Black or 0 which is boring to me.

---------- Post added at 02:44 PM ---------- Previous post was at 02:42 PM ----------

The 3rd party translucent lib will only work with a set color and unless you create a toggle for multiple colors to match the HTC theme. I wouldn't recommend it but its there as a last resort
[Java for Android App Development] mikrosmile:
I didn't find it neither how to make it using HTC way. But I come up with solution mentioned by Jonny. Use ststusbartint lib, and check for choosen theme , set color for statusbar.

I made my own library for that.
[Java for Android App Development] DHD22800:
Hi guys.

I have a little problem with Android 4.4.3 and Sense 6:

(With holo style:)

With the holo light and dark actionbar, he tint only the part between the blu line and tabs...

I will post code, because now I'm posting with tapatalk.

Inviato dal mio HTC One utilizzando Tapatalk
[Java for Android App Development] DHD22800:
[MENTION=4382376]mikrosmile[/MENTION]

Is there a way to "inflate" the HtcPreference in the SlidingMenu layout ?

And something about the "ActionBar" in the SlidingMenu (like mail app and file manager app) ?

Thanks
[Java for Android App Development] DHD22800:
Hi.

I'm having an issue with the SlidingMenu, this is the log:

09-27 17:25:34.955: E/AndroidRuntime(12482): FATAL EXCEPTION: main
applyHtcFontscale(context): Neither user 10140 nor current process has com.htc.permission.APP_DEFAULT.
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.ActivityThread.access$800(ActivityThread.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.os.Handler.dispatchMessage(Handler.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.os.Looper.loop(Looper.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.ActivityThread.main(ActivityThread.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at java.lang.reflect.Method.invokeNative(Native Method)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at java.lang.reflect.Method.invoke(Method.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at dalvik.system.NativeStart.main(Native Method)
09-27 17:25:34.955: E/AndroidRuntime(12482): Caused by: java.lang.SecurityException: applyHtcFontscale(context): Neither user 10140 nor current process has com.htc.permission.APP_DEFAULT.
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.ContextImpl.enforce(ContextImpl.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.content.res.HtcConfiguration.applyHtcFontscale(HtcConfiguration.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at com.htc.app.SlidingActivity.applyHtcFontscale(SlidingActivity.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at com.htc.app.SlidingActivity.onCreate(SlidingActivity.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at it.conf.sense.elementalxconfigurator.MainActivity.onCreate(MainActivity.java:242)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.Activity.performCreate(Activity.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java)
09-27 17:25:34.955: E/AndroidRuntime(12482):	... 12 more

But the permission is setted in the manifest and it doesn't contain errors:

<uses-permission android:name="com.htc.permission.APP_DEFAULT" />

i tryed to add it twice, but it's the same...

I'm currently having this issue with Maximus HD 44.0, with ViperOne 7.0.1 the sliding menu works fine

---edit---

I'm not trying to set fontscale with HtcWrapConfiguration....
[Java for Android App Development] DHD22800:
Fixed this :D

First extendend my MainActicity As MfMainActivity (not SlidingActivity), the changed my method initSlidingMenu() like this:

private void initSlidingMenu()
{
mSlidingMenu = new SlidingMenu(this);
mSlidingMenu.setBehindWidth(750);
mSlidingMenu.setFadeDegree(0.6F);
mSlidingMenu.setFadeEnabled(true);
mSlidingMenu.setMode(0);
mSlidingMenu.setAboveOffset(200); <-- set the offset
mSlidingMenu.setBehindOffset(200); <-- set the offset
mSlidingMenu.setTouchModeAbove(1); <-- 0 for the left area only, 1 to fullscreen
mSlidingMenu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
mSlidingMenu.setMenu(R.layout.sliding_menu); <-- use this for set the layout of your SlidingMenu
mSlidingMenu.setOnOpenedListener(new com.htc.widget.SlidingMenu.OnOpenedListener() {

public void onOpened() <-- in this method I will set the shadow to the SlidingMenu
{
mSlidingMenu.setShadowWidth(100);
mSlidingMenu.setShadowDrawable(R.drawable.sliding_menu_shadow);
}
});
}
[One (M7) Q&A, Help & Troubleshooting] stevew84:
Does the device have one?
[One (M7) Q&A, Help & Troubleshooting] PapaRhino:
Yes, inside the top speaker grill.
[One (M7) Q&A, Help & Troubleshooting] stevew84:
Thanks.
[Galaxy Note II Q&A, Help & Troubleshooting] TaLEntZ96:
I got an OTA update last night of about 217MB, but I have no idea what it did. I'm still on 4.1.2 and I can't see any changes. Anyone know of there were some fixes/additions or whatever? Cheers
[Galaxy Note II Q&A, Help & Troubleshooting] Televinken:
Perhaps another lame attempt to correct the miserable 4.1.2 update....

Anyway, thanks for the heads up! I'll await the update with great anticipation.
[Galaxy S III General] ricardoph:
Hello friends, I wanted to paint the gray ring of my samsung S3 with a pen auto repair, someone tell me what is the rim color ral?

Someone has painted the rim what kind of commodity used?

Thanks:crying:
[Galaxy S III General] zelendel:
This is a software development forum.

Thread closed
[Motorola Droid RAZR] RaidRushX:
Hey guys,

I'm running JB 4.1.2 GSM and i don't have root.

I would like to install Cyanogenmod 10.1 but it seems like it isn't possible.

Does anyone know a way? Maybe via ADB flash ?

I'm pretty new to android, so if there is a way, i would be glad to have instructions for a noob ;)

Thanks a lot!
[Motorola Droid RAZR] jkuczy16:
to flash any sort of custom rom (aokp, cyanogenmod, etc) you need to be rooted. There is no other way to get a custom rom without root.
[Motorola Droid RAZR] RaidRushX:
Okay...that's sad, but thank you for the answer though!:rolleyes:
[AT&T Samsung Galaxy Note II] bsw11:
I don't have a problem with my home button I think it's a little too hard yet. As far as the app you suggest, I suggest proximity sensor as it is a much better app that works to turn on and off your phone using the cover. Note, you might have to put a thin card on the inside of your cover.
[AT&T Samsung Galaxy Note II] JiraffeLeung:
For those who find some issues with GestureDroid (the sensor turns off occasionally) try a app called "Tap Tap App". You need to give it permission to act as administrator over screen on/off after you install the app, but I find that it's a lot more reliable because of this reason.

Tweak with the settings by going into "Unlocking Training", and then selecting "Sensor configuration".
[AT&T Samsung Galaxy Note II] allin1der:
I used this mod because everytime I slide it into my pocket, I do so upside down which means to grip it and pull it out, I tend to hold it in a way that hits the home key before it's out of my pocket causing all sorts of issues for me. Looking around, I also noticed a few configuration files for various controllers and keyboards including the usb Xbox 360 controller and the Apple keyboard. Is it possible to write/download one for something like the PS3 Sixaxis?
[AT&T Samsung Galaxy Note II] JiraffeLeung:
Do you mean finding an app that can offer plug and play of your PS3 controller? Or do you mean configuring the individual buttons?

This is the app that's available for the six axis controller:

https://play.google.com/store/apps/details?id=com.dancingpixelstudios.sixaxiscontroller
[AT&T Samsung Galaxy Note II] imablackhat:
I don't know if it's possible to get att phone working on Verizon. But is it possible to swap guts from a Verizon and att note 2. Just motherboards so basically you could swap colors of phone.

Is hardware identical inside?
[AT&T Samsung Galaxy Note II] id10terrordfw:
Not even close.
[MDA II, XDA II, 2060 General] sundownerspars:
'm looing to mount my XD IIinto te car, does anyne know which is the best holder and power leads available????????????? 8)
[Galaxy S III Q&A, Help & Troubleshooting] TheRealFelix0212:
Hi everyone,

I downloaded HTC One StockBrowser and signed it with AutoSign...

Now it won't install the App... Android takes it as an update for S3-Stockbrowser.... It doesn't work because of the other appsignature....

How can I fix this?

Greeeeeeeeeeeeetzzz...

Gesendet von meinem GT-I9300 mit Tapatalk 2
[Galaxy S III Q&A, Help & Troubleshooting] Glebun:
uninstall the current one

---------- Post added at 12:47 AM ---------- Previous post was at 12:47 AM ----------

just remember that if it's a system app, you can't just install it, you have to put it into /system/app
[Galaxy S III Q&A, Help & Troubleshooting] TheRealFelix0212:
Yes, but I want to have the Samsung one and the HTC One! :)

Gesendet von meinem GT-I9300 mit Tapatalk 2
[Galaxy S III Q&A, Help & Troubleshooting] Glebun:
you can't, apparently it's the same app
[Samsung Galaxy W I8150] Adi Aisiteru Reborn:
CREDIT & THANKS

ARCO

EVILISTO

[Unofficial Community] Galaxy Wonder CyanogenMod Indonesia

IF YOU LIKE THIS MOD, PLEASE PRESS MY THANKS BUTTON TOO:good::laugh:
​
[Samsung Galaxy W I8150] kabychow:
Thanks for this great work :D

Can I know why u been banned? Allow me off topic :)
[Samsung Galaxy W I8150] Aldich13:
I also inquired about it. why his account had a banned?
[Samsung Galaxy W I8150] Adi Aisiteru Reborn:
"You have been banned for the following reason:

Hacking into someone else's account

Date the ban will be lifted: Never"

I changed My Girl fren xda acc password, and she reported me,.

then , My IP addres traced, detected, and banned :(
[Samsung Galaxy W I8150] cifoel:
What???really???but i'm glad we have you back here

welcome back my friend... :highfive:
[Samsung Galaxy W I8150] m1trand1r:
oh boy....lolz....now you really need to sth BIG if you want what we were discussing via pm.....bummer:p....why did you have to do that?....ow...TBH I :mad: at you right now.!!!...but I'll help you when the time will be right....keep up your good work ma8 and do us a favour ....avoid troubles :D

See ya:)

Sent fom my S-II running Vanilla Rootbox >>Nightly (2013/03/27 Unofficial by kroz)<< :D powered with DorimanX kernel v. >>9.13<<
[Samsung Galaxy W I8150] m1trand1r:
@adi

can you help a guy over here: http://xdaforums.com/showthread.php?t=2231448

if possible?...thanks in advance:)

Sent fom my S-II running Vanilla Rootbox >>Nightly (2013/03/27 Unofficial by kroz)<< :D powered with DorimanX kernel v. >>9.13<<
[Samsung Galaxy W I8150] Adi Aisiteru Reborn:
I've been able to make this mod for CM10 and CM9 too,.

but havn't try it yet to CM-7

What I need is not only framework-res.apk but its framework.jar too :D

I m waiting for the file bro,. give it to my PM :D

I will try to port it, and later you will be my tester ..
[Samsung Galaxy W I8150] iDelta:
Is it possible for you to port this to CM10.1 as well? If you can, thanks.

Sent from my Galaxy Wonder running CM10.1
[Samsung Galaxy W I8150] Adi Aisiteru Reborn:
if tried, but only navbar that work,

BB ten lockscreen it self doesnt want to appear...:confused: