yashsingh1/xdaforums huggingface dataset:
[Java for Android App Development] Wetzel402:
I wanted to share some of my code to help others :)

An asynctask with a card adding loop:

public class GetNews extends AsyncTask<String, Void, NewsData> {

[MENTION=439709]override[/MENTION]
protected NewsData doInBackground(final String... params) {
if(params[0].equals(photos)){
finalLoop = true;
}
final NewsXmlParser news = new NewsXmlParser();
return news.NewsParser(params[0]);
}

[MENTION=439709]override[/MENTION]
protected void onPostExecute(final NewsData news) {
super.onPostExecute(news);

Logger.logDebug(TAG, "GetNews - UI updated");
Logger.bugSenseAddExtraData(TAG, "GetNews - UI updated");

for(int i = 0;i < NewsXmlParser.map.size() / 7; ++i){
//add
final String add = String.valueOf(i + 1);
if(NewsXmlParser.bmap.get("nImg" + add) == null){
card = new MyEspnCard(NewsXmlParser.map.get("title" + add), NewsXmlParser.map.get("description" + add), R.color.jays_blue, NewsXmlParser.map.get("link" + add), false);

card.setOnClickListener(new View.OnClickListener() {
[MENTION=439709]override[/MENTION]
public void onClick(View v) {

Logger.logDebug("card", "Clicked");
Logger.bugSenseSendEvent("card - Clicked");

if (DetectConnection
.checkInternetConnection(News.this)) {
final Uri uri = Uri
.parse(NewsXmlParser.map.get("link" + add));
// <--
slideOutLeftWithWebIntent(mCardView, new Intent(
android.content.Intent.ACTION_VIEW, uri));
} else {
Toast.makeText(getApplicationContext(),
getString(R.string.connection), Toast.LENGTH_LONG)
.show();
}
}
});
mCardView.addCard(card);
}else{
pcard = new MyEspnPictureCard(NewsXmlParser.map.get("title" + add), NewsXmlParser.map.get("description" + add), R.color.jays_blue, NewsXmlParser.map.get("link" + add), NewsXmlParser.bmap.get("nImg" + add), false);

pcard.setOnClickListener(new View.OnClickListener() {
[MENTION=439709]override[/MENTION]
public void onClick(View v) {

Logger.logDebug("card", "Clicked");
Logger.bugSenseSendEvent("card - Clicked");

if (DetectConnection
.checkInternetConnection(News.this)) {
final Uri uri = Uri
.parse(NewsXmlParser.map.get("link" + add));
// <--
slideOutLeftWithWebIntent(mCardView, new Intent(
android.content.Intent.ACTION_VIEW, uri));
} else {
Toast.makeText(getApplicationContext(),
getString(R.string.connection), Toast.LENGTH_LONG)
.show();
}
}
});
mCardView.addCard(pcard);
}
}
if(finalLoop == true){
progress.dismiss();
mCardView.refresh();
isRunning = false;
}
}
};
[Java for Android App Development] Wetzel402:
Is it just me or is the long click method missing? I can't seem to find an instance of it in the library.
[Java for Android App Development] Androguide.fr:
The Card object inherits from View, you should be able to set an OnLongClickListener on it just fine (can't confirm it right now though).
[Java for Android App Development] Wetzel402:
I haven't been able to and found in Card there are getters and setters for OnClickListerner and OnCardSwiped but I haven't been able to find where they are implemented in the lib. I added by own getter and setter for OnLongClickListener and now I can set it on my cards but it won't have a function until I can implement it in the lib wherever OnClickListener is implemented.
[Java for Android App Development] Androguide.fr:
Here's a pull request which added long click support, it was overriden by a bigger pull-request so that's why those changes aren't in the current master branch.

You can cherry-pick those commits to get support for OnLongClickListener in your local repo
[Java for Android App Development] Wetzel402:
I feel better knowing I'm not crazy now :silly: haha

Not to bug you more but does the scrollToCard method work? I was trying something like

mCardView.scrollToCard(8)

just to test it but was getting no change in behavior.

Edit: That was easy. I have the long click functionality working. Thank you sir :highfive:
[Java for Android App Development] b3jsd73jfx:
I went back a few pages and the most recent page I found related to importing this project into Android Studio involved importing it into Eclipse, exporting the Gradle build files, and then importing into Android Studio. Do I still need to do this to import the project? Right now if I try to import the project directly into Android Studio, I get an error message:

Unsupported Method: GradleProject.getBuildScript()
[Java for Android App Development] Androguide.fr:
You'll need to update the gradle wrapper to v1.8 as the recent versions of Android Studio dropped support for older gradle versions.

To do so, simply edit gradle/wrapper/gradle/gradle-wrapper.properties and change the "distributionUrl" variable to:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip

But you're right, I'll try to find some time this week to migrate the library to gradle with up-to-date settings.
[Java for Android App Development] b3jsd73jfx:
Thanks! I thought I did that, but turns out I used the wrong URL.
[Java for Android App Development] kevinv033:
Need help getting the library to work

Update: Someone helped me get the library to resolve.
[Java for Android App Development] Wetzel402:
Hi everyone,

I started trying to port my work using phonegap and wanted to share the CardUI code. This will work with any web based app.

CSS:

#card{
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-shadow: 0 8px 6px -6px black;
-moz-box-shadow: 0 8px 6px -6px black;
box-shadow: 0 8px 6px -6px black;
float:left;
background:#FFFFFF;
width:100%;
color:#000000;
padding:0px;
margin-bottom:8px;
}
#card1 h1{
margin:0px;
padding:10px;
padding-bottom:0px;
}
#card1 p{
margin:0px;
padding:10px;
}

HTML5:

<div id="card">
<div id="card1">
<h1>Hello! I am a text card.</h1>
<p>This is the body of the card containing text to be displayed.</p>
</div>
</div>

This looks near identical to the Google Play store and CardUI lib here.

Update: I am now using the following code for the CardUI where .top-card-pad is called as a div to add proper padding at the top of a page/view:

.card {
position:relative;
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-shadow: 0 8px 6px -6px black;
-moz-box-shadow: 0 8px 6px -6px black;
box-shadow: 0 8px 6px -6px black;
float:left;
background:#FFFFFF;
width:100%;
color:#000000;
padding:5px;
margin-left: 5px;
margin-right: 5px;
margin-bottom:10px;
}
.top-card-pad {
position:relative;
float:left;
background: transparent;
width:100%;
margin-bottom:10px;
}
[Java for Android App Development] D-FUSE:
If anyone has time to talk to me about getting this to function with this library

Please hit me up on Hangout

dfuse06@gmail.com
[Java for Android App Development] Wetzel402:
I'm not sure I follow. The screen shots appear you already have implemented a similar layout.
[Java for Android App Development] D-FUSE:
Pretty much to get the cards to do something other then an onclicklistener
[Java for Android App Development] Androguide.fr:
[MENTION=3042344]D-FUSE[/MENTION] I have just pm'ed you with this, but I'll also post it here in case it can help someone else in the future.

Basically, the key thing to remember when creating new types of cards is to pass everything that card needs to work (including listeners) into the card's constructor.

Luckily for you, I have already written a card that contains a Spinner, you can find it on my github :

Constructor (library side): https://github.com/Androguide/APKre...b/src/com/fima/cardsui/objects/Card.java#L133 (from line 133 to line 140)

Java: https://github.com/Androguide/APKrea...rdSpinner.java

XML: https://github.com/Androguide/APKrea...rd_spinner.xml

Instanciation: https://github.com/Androguide/APKrea...ment.java#L206 (from line 206 to line 242)

You can find other cards with basic UI components implemented in them (Button, Switch, SeekBar...) in this same repo : https://github.com/Androguide/APKrea...pkreator/cards

Hope this helps, good luck
[Java for Android App Development] D-FUSE:
Thanks man. I'll look at it tonight when I get off work. Thank you for the help
[Java for Android App Development] DerLetzteLude:
onClick

Hi

i am running in some problems trying to work with he library. I implemented it everything works fine but i have no clue what so ever how to use the clicklistener. I attached the listener and can click the card but how do i get the card data to work with it. Right now i can open a pre defined link or show a pre made toast but i would like to use dynamical data from the cards. Some kind of help would be really nice.
[Java for Android App Development] D-FUSE:
That's how I did it
[Java for Android App Development] DerLetzteLude:
That worked for me already but i iterate through some objects and add ~20 cards. I would like to set an clicklistener which opens an url for the clicked card and not the same link for every card. Right now its like working with an ListView without getting a position or index. :(.
[Java for Android App Development] Androguide.fr:
CardUI uses a custom QuickReturnListView which extends ListView, so theoretically you can use the getChildAt() method of ListView to get your card by index, but it's pretty cumbersome to use.

Instead, you can just add all your cards to an array or an ArrayList, and add them to the CardUI through this array by index, this way you can just call mArray.get(9) to get your 10th card for example.

Say you have a getter for the url in the card's java, then you can call mArray.get(9).getUrl() to get your 10th card's url.

Here is an example:

// Say we generate cards from a json file
// We have a wrapper class JSONCard on which we can call JSONCard.getTitle(), JSONCard.getDesc() and JSONCard.getUrl(),
// and we have an array of JSONCard's call jsonCards
ArrayList<Card> mCardsReference = new ArrayList<Card>();

for (int i = 0; i < jsonCards.size(); i++) {
mCardsReference.add(jsonCards.get(i));
mCardUI.addCard(new CardUrl(jsonCards.get(i).getTitle(), jsonCard.get(i).getDesc(), jsonCard.get(i).getUrl()));
}
mCardUI.refresh();

for (Card mCard : mCardsReference) {
mCard.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(mCard.getUrl())));
}
});
}

Where the card's java is:

public class CardDownload extends Card {

private String mUrl;

public CardDownload(String title, String desc, String url) {
super(title, desc, url);
}

@Override
public View getCardContent(Context context) {
View v = LayoutInflater.from(context).inflate(R.layout.card_download, null);
((TextView) v.findViewById(R.id.title)).setText(title);
((TextView) v.findViewById(R.id.desc)).setText(desc);
mUrl = url;
return v;
}

public String getUrl() {
return mUrl;
}

Now each card will launch its individual url when clicked.
[Java for Android App Development] DerLetzteLude:
Thank you very much. When i look at the code i get it and see that i wanted to do it the absolute wrong way. I will try if everythink works the way i want it now. :good:
[Java for Android App Development] TomasValenta:
Correct way to show images in CardsUI from url

Hi,

i try to load image to ImageCard from drawable folder like this:

public class MainActivity extends Activity {

private int sampleimage = R.drawable.samplepicture1;
...

@Override
public void onCreate(Bundle savedInstanceState) {

...

mCardView.addCard(new MyImageCard("Testing card",sampleimage));
...

}
}

its working fine, but how to load properly picture from url address? I have tried Android-Universal-Image-Loader, but without success. Could someone help me?
[Java for Android App Development] Androguide.fr:
Here you go, luckily for you I've already implemented that.

This uses the Picasso library by Square, so either drop the jar into your libs folder or add the following dependency to your build.gradle if you use Android Studio:

compile 'com.squareup.picasso:picasso:2.2.0'

Here is the code for the card, it's pretty basic: https://github.com/Androguide/APKre...Lib/src/com/fima/cardsui/views/CardImage.java

Here is an example of how to use it, again pretty basic, just pass-in the url and voilà:

CardImage aCard = new CardImage(
"Test",
"A card with a remote image loaded asynchronously",
"#33b5e5",
"http://pimpmyrom.org/img/logo.png"
);
[Java for Android App Development] TomasValenta:
I use AndroidStudio. I have added Picasso library dependency to my build.gradle. Downloaded and added your fresh CardsUILib from APKreator libs folder to my project. But when Gradle sync, i get this error:

I have tried copy SwitchCompatLibrary to my project lib/libs/SwitchCompatLibrary or lib/libs/CardsUILib/libs/SwitchCompatLibrary but without success. Have you any idea? Thank you for you time ;)
[Java for Android App Development] Androguide.fr:
Simply move it to libs/SwitchCompatLibrary or modify the build.gradle & settings.gradle to point to lib/libs/SwitchCompatLibrary instead if you prefer to have it there (or any other path you prefer, in the same way):

settings.gradle:

include 'lib:libs:SwitchCompatLibrary'

build.gradle:

dependencies {
...
compile project('lib:libs:SwitchCompatLibrary')
...
}
[Java for Android App Development] TomasValenta:
Yes, I also tried this. But the same error. Here is my project code, please look at him?

View attachment WebCams.zip
[Java for Android App Development] Androguide.fr:
Here is your corrected project... It was exactly what I said above... Except your settings.gradle actually didn't even reference the SwitchCompatLibrary at all.

In green are my additions, in red your error:

settings.gradle

include ':lib:libs:CardsUILib'
[COLOR="Green"]include ':lib:libs:SwitchCompatLibrary'[/COLOR]

lib/libs/CardsUILib/build.gradle:

buildscript {

repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android-library'

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
[COLOR="DarkRed"] compile project('libs:SwitchCompatLibrary')[/COLOR]
[COLOR="Green"] compile project('lib:libs:SwitchCompatLibrary')[/COLOR]
compile 'com.android.support:appcompat-v7:19.0.+'
compile files('libs/picasso-1.1.1.jar')
}

android {
compileSdkVersion 19
buildToolsVersion "19.0.3"

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}

// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')

// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
[Java for Android App Development] TomasValenta:
Sorry, but when i modify the two files or download modified archive from your attachment, It still reports the same error:
[Java for Android App Development] Androguide.fr:
I fixed the build & reorganized your libraries a bit, it was a mess, you had 2 copies of the SwitchCompatLibrary, one of which was in the CardsUILib's libs folder.

I attached the corrected version (tested, it builds properly).
[Java for Android App Development] TomasValenta:
Thank you. Gradle is now without error, but when i try build the app, AndroidStudio show me this error:

Error:Execution failed for task ':app:dexDebug'.
...
...
...
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:

com.android.dex.DexException: [COLOR="Red"]Multiple dex files define Lcom/squareup/picasso/Cache;[/COLOR]

at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)

Why you have in CardsUILib dependency to picasso-1.1.1.jar, when project use com.squareup.picasso:picasso:2.2.0? Could it be related to the above error?
[Java for Android App Development] TomasValenta:
I have created a new clean project, only add java files, res files and library dependencies (CardsUILib and SwitchCompatLibrary from your APKreator libs project. But the same error like described above. One more question, why is CardsUILib code in APKreator project so different than in Cardsui-for-android in your github? It's because it is improved in APKreator project?
[Java for Android App Development] TomasValenta:
Ok, problem is now fixed. I have downloaded picasso.jar file and replaced line:

with

and now ist working. Thank you for you time Androguide!
[Java for Android App Development] Androguide.fr:
No problem, glad you got it sorted-out :good:
[Java for Android App Development] ruikaka16:
i have a question about the imagecard in cardsui library.

how to use the customer image in the card which is not in the drawable folder,something like reciving from remote server,thanks!
[Java for Android App Development] Cooper Bryant:
Itspresso - Digital agency | Technology served with hot designs

Sorry, but when i modify the two files or download modified archive from your attachment, It still reports the same error:

Quote:

¨Project with path 'lib:libs:SwitchCompatLibrary' could not be found in project ':lib:libs:CardsUILib'.
[MDA, XDA, 1010 General] amitsyd:
I have noticed some temporary files (some really big - 1.65M) with names like "MsgQueueData..." created in the Windows directory under "My Device". I cannot delete these files as it says there is a share violation and these files are chewing up my available space. I tried restarting my pocket PC and yet I cannot delete them. Can someone please help
[MDA, XDA, 1010 General] Rudegar:
i havent heard about anybody being able to delete them

i asumed that they were pages files for different services

like phone and sms and...
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] JTG81:
Ok so the shine is already wearing off the new update that gives Australia the option to purchase music from Google play, I've just bought an album and downloaded it and I wanted to play it in Poweramp but can't find it? Can anyone tell me why
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] pre4speed:
It will be played and stored within Google play music.
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] JTG81:
But what if I don't want to play it through Google Music app I did just purchase the album I should be able to play it through what ever i like
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] Temetka:
I believe it is because the files aren't actually downloaded. You stream them from the cloud using the google music player application.
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] JJEgan:
If you read the instructions some where it gives you the option to download as opposed to stream .Either for your uploads or paid for music .

jje
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] JTG81:
So I contacted google about this, yes there is an option to download through the apo or through your pc using music manager (googles answer to itunes I guess).

If you download directly from within the app on your device you can only play it through google music.

If you download it via your pc I usjng music manager you can side load it and play it though whatever you want ie poweramp.

Quite frankly I dont see why google have to make it so difficult and just allow us to download it directly to our Devices and play it how we want for gods sake
[Galaxy S III Themes and Apps] japjit100:
play store 4.0.25 themed black

How to install

Just flash the zip

Download link

View attachment 1872460View attachment 1872461View attachment 1872462

It saves battery

Sent from my GT-I9300
[Galaxy S III Themes and Apps] MattBooth:
Hi,

How did you make the part where it says "top paid, top free" etc black?

EDIT:

Nevermind, found it :D

play_checker_bg.png
[Galaxy S III Themes and Apps] bandit1976:
Nice job mate!!

Thanks a lot

sent by S3
[Galaxy S III Themes and Apps] AgentVanThomas:
Looks awesome.
[Galaxy S III Themes and Apps] BarnOwl:
......and looks great too!
[Galaxy S III Themes and Apps] serdar_gs:
looks nice
[Galaxy S III Themes and Apps] buster041284:
Is this not bboys blackout app
[Galaxy S III Themes and Apps] japjit100:
No
[Galaxy S III Themes and Apps] VexMunja:
Thanks for the black Play store. Can you make black Gmail and Gtalk? That would be awesome ;) :)

Sent from S3
[Galaxy S III Themes and Apps] japjit100:
I m working on gmail
[Galaxy S III Themes and Apps] japjit100:
G-Mail 4.3.1 black themed
[Galaxy S III Themes and Apps] Deacon-Frost:
Will a transparent version of playstore also be cooked?
[Galaxy S III Themes and Apps] pro.aggro:
Black and blue like this one would be nice!
[Galaxy S III Themes and Apps] igoor777:
How remove/deinstall gmail app..I have Purelook hd custom rom and I havent option for deinstall..

Thank you!

--

sent from SGS3
[Galaxy S III Themes and Apps] japjit100:
Use this app https://play.google.com/store/apps/...&utm_medium=organic&utm_term=uninstall+master

I also use purelook
[Galaxy S III Themes and Apps] igoor777:
Thank you bro, now is fine! ;)

--

sent from SGS3
[Galaxy S III Themes and Apps] B-boy™:
Um... Yeah it is man... I normally PM this stuff but you announced you did this and Gmail 4.3.1 with white text.. which is mine also. I took the liberty of decompiling both apks and diff merged them to see the differences.. You even left my updater.script in your Market dude. I honestly have no problem with people posting my work anywhere they want to but I spend hours and hours doing this so it kinda pisses me off when no credit is given and when asked if it was mine you replied "No".. Even in your gmail thread you linked a screenshot with my Google Voice screenshot.. Changing a few images from my version or diff merging all my edits doesn't make it yours, just as me doing everything I do doesn't make it mine since Google and other devs make these apps.. But you definitely did not put in any time on these so make sure you give credit where it's due.. thanks.
[Galaxy S III Themes and Apps] 78Staff:
rut row raggy...
[Galaxy S III Themes and Apps] Christiancs1969:
Bboys. Work is to perfect. Dude. No one comes close.

.....

To any one wanting black out apps. Please. Use the proper thread. http://m.b-boytm.webnode.com/home/

Or xda thread

http://xdaforums.com/showthread.php?p=16925922

s2rootbox......
[Galaxy S III Themes and Apps] zelendel:
Do not claim the work of others. XDA takes this very seriously. Thread closed
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] wong93:
http://www.mediafire.com/?2b18dnjv5454hxt

should work on all devices, tested on my ray ,damn smooth, totally 0 lag

it is an apk file,so just use file explorer and install it

screenshot from my ray

http://sphotos-f.ak.fbcdn.net/hphotos-ak-prn1/68925_478602245542532_384939809_n.jpg
[Desire Q&A, Help & Troubleshooting] naeembabakheil:
Hi

i want ti upgrade from Android v2.3.3 (GingerBread) to Custom ROM so i tried unRoevoked but this not work i follow all steps shown on Youtube those steps not work on my phone . i am new to HTC phone so [plz help me whats wrong with my phone is it already Rooted or What ??? :crying:
[Desire Q&A, Help & Troubleshooting] abaaaabbbb63:
Use revolutionary, not unrevoked.

Check the All Things Root Desire guide in my sig.
[Desire Q&A, Help & Troubleshooting] naeembabakheil:
it wont help ???

when i reboot my phone to Bootloader and connect usb with USB Debuggin on i tried to format my phone its format but it cant update from that Custom ROM or update.zip file ....:confused:
[Desire Q&A, Help & Troubleshooting] babyfacenbu:
i think you shuold flash recovery first
[Desire Q&A, Help & Troubleshooting] naeembabakheil:
Flash Recory ???

A Flash Recovery ??? i cant get it how can i do Flash recovery and whats next after Flash Recovery:fingers-crossed: