Friday, July 19, 2013

[android help] method getfragmentmanager() is undefined


method getfragmentmanager() is undefined



I am making a view pager to make a slide show for images. I took code from Android developers, but I was facing some issues, fragment was not recognized, I think it was because my android was 2.33. So to solve that I imported a jar file android.support.v4.jar My issues were resolved but now I am getting this error that getfragmentmanager() is undefined and another issue "The method invalidateOptionsMenu() is undefined for the type new ViewPager.SimpleOnPageChangeListener(){}"


Here is my code, can any one please help ?? My platform is 2.3.3 and api level is 10 and in manifest I have this



android:minSdkVersion="8"
android:targetSdkVersion="15" />


Code :



package com.example.profilemanagment;

import android.support.v4.app.Fragment;
import android.support.v4.app.*;
import android.content.Intent;
import android.os.Bundle;

import android.support.v4.app.FragmentActivity;
import android.support.v4.app.NavUtils;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.Menu;
import android.view.MenuItem;



public class ScreenSlideActivity extends FragmentActivity {
/**
* The number of pages (wizard steps) to show in this demo.
*/
private static final int NUM_PAGES = 5;

/**
* The pager widget, which handles animation and allows swiping horizontally to access previous
* and next wizard steps.
*/
private ViewPager mPager;

/**
* The pager adapter, which provides the pages to the view pager widget.
*/
private PagerAdapter mPagerAdapter;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_screen_slide);

// Instantiate a ViewPager and a PagerAdapter.
mPager = (ViewPager) findViewById(R.id.pager);
mPagerAdapter = new ScreenSlidePagerAdapter(getFragmentManager());
mPager.setAdapter(mPagerAdapter);
mPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
// When changing pages, reset the action bar actions since they are dependent
// on which page is currently active. An alternative approach is to have each
// fragment expose actions itself (rather than the activity exposing actions),
// but for simplicity, the activity provides the actions in this sample.
invalidateOptionsMenu();
}
});
}




/**
* A simple pager adapter that represents 5 {@link ScreenSlidePageFragment} objects, in
* sequence.
*/
private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
public ScreenSlidePagerAdapter(FragmentManager fm) {
super(fm);
}

@Override
public Fragment getItem(int position) {
return ScreenSlidePageFragment.create(position);
}

@Override
public int getCount() {
return NUM_PAGES;
}
}
}


Read more

stackoverflow.comm



[android help] Actionbar tabs + multiple pane view in android


Actionbar tabs + multiple pane view in android


Actionbar tabs + multiple pane view in android - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I want to develop android application like Design



I Googled it.I couldn't find out proper solution to this. Please anyone help me. Without page view, i can able to do mutiple pane option.



Please anybody guide me .


Thanks in advance.


























I think you will be needing ViewPager for the two tabs. Then you'll use SlidingMenu for the Stories Category. Inside each created Menu, put a listview with a Customized Array Adapter. You can consider, using fragments also for flexibility of your UI design in small and large screens. I can't provide the codes but these links have all the necessary things you needs specially starting with fragments.


Download the Sample code here:


Effective Navigation -this should help you with your tabs with Pager effect


SlidingMenu Library: Library


Fragments























default






Read more

stackoverflow.comm



[android help] How to make a consistent splash screen in android hybrid app?


How to make a consistent splash screen in android hybrid app?


How to make a consistent splash screen in android hybrid app? - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I've splash screen in my application which appears to be working fine. Once the html is loaded the splash screen goes off. Since the html page takes time to load it showed a blank screen. To cope up with the splash screen, I again added the same image into my html and display it to the user till the page is completely loaded. Everything is working fine, except that there is a flickering when the view-port shifts from splash to html image. The problem is when the splash screen is displayed the image seems to be zoomed in and when the html displays the splash it is zoomed out(shows full size). How to maintain a consistency among the splash screen and the image in html?
















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










default






Read more

stackoverflow.comm



[android help] android screen goes black if I open cocos 2d project after getting out of an activity


android screen goes black if I open cocos 2d project after getting out of an activity



My android screen goes black if I open cocos 2d project after getting out of an activity



public static CCScene scene()
{

CCScene scene = CCScene.node();
CCLayer layer = new TemplateLayer();

scene.addChild(layer);

return scene;
}


this is my template layer


In this teplate I am adding several sprites and initializing update selector



protected TemplateLayer(ccColor4B color)
{

super(color);

sensorManager = (SensorManager) CCDirector.sharedDirector()
.getActivity().getSystemService(Context.SENSOR_SERVICE);

if (sensorManager != null)
{
orientation = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
}
else
{
orientation = null;
}

this.setIsTouchEnabled(true);

game = new GameActivity();

ball = CCSprite.sprite("rect.png");

x= winSize.width/8;
y= winSize.height/8;


ball.setAnchorPoint(CGPoint.ccp(0, 0));
ball.setPosition(CGPoint.ccp((float)x, (float)y));
addChild(ball);

killerchild = CCSprite.sprite("logo.png");
killerchild.setAnchorPoint(CGPoint.ccp(0, 0));

killerchild.setPosition(CGPoint.ccp(winSize.width/2-killerchild.getContentSize().width/2, winSize.height-killerchild.getContentSize().height));
addChild(killerchild);

boat = CCSprite.sprite("boat.png");
boat.setAnchorPoint(CGPoint.ccp(0, 0));

boat.setPosition(CGPoint.ccp(winSize.width/2-boat.getContentSize().width/2,-boat.getContentSize().height/4));
addChild(boat);


pirates = CCSprite.sprite("Pirates.png");
pirates.setAnchorPoint(CGPoint.ccp(0, 0));

pirates.setPosition(CGPoint.ccp(winSize.width/2-pirates.getContentSize().width/2,winSize.height/2-pirates.getContentSize().height/2));
addChild(pirates,-1);

this.schedule("update");


// this.schedule("moveboat", 0f);



}


Read more

stackoverflow.comm



Friday, July 12, 2013

[General] Suggestions for good gaming tablet?


Suggestions for good gaming tablet?



Any reason why you need it to work on the Verizon network, since you also mentioned that you don't want him using data to play online? Unless he wants to play some kind of network-connected game like a multiplayer role-playing game, he doesn't really need a data connection. Some games do require a connection when you first start them in order to check the license, so that can be a minor pain if he's not near a wifi hotspot.

You can't go wrong with a Nexus 7, and they're generally getting cheaper in anticipation of the next generation Nexus 7 that should be coming out soon. The Nexus 7 is nice and portable, with a fast processor and a good screen.

You can also check out daily deal websites like , which often have refurbished older tablets for cheap. Icemonkey currently has the Motorola Xoom and Xoom 2 tablets on sale for about $200. These tablets are 4G compatible and can be added to your Verizon account if you want. They should be fast enough to play most games, although really complex graphics-intense games might be a little slow.



Read more

forum.xda-developers.com



[General] Schedule activity with a contact?


Schedule activity with a contact?



Is there a way to schedule an activity INTO the calendar from a contact? For example, I call my boss and at the end of the conversation he says to call him at 4pm tomorrow for follow-up. Is there a button on his contact page that enables me create an event in the calendar to call him tomorrow at 4pm? I am using a Samsung Galaxy S3 running Jelly Bean (I think).



Read more

forum.xda-developers.com



[General] Google playstore speed


Google playstore speed



I noticed that when I look up apps on the Google Playstore with wifi connection in my home or in public places, I receive very slow "refresh" or half the time the "previews" don't show at all. If I turn off my wifi toggle, then the App store displays a lot quicker. Does anyone else have this issue or knows why?



Read more

forum.xda-developers.com



[General] Playing videos on Android 2.2


Playing videos on Android 2.2



I dug up an old relic from a prehistoric civilization. A MiTraveler 7 inch netbook with android 2.2. Youtube videos give message "Video cannot be played". Although there's an App Market app on it, flash player, photon, or any video player won't show up. There appears no way to update this thing. Music won't play all the time either. Any suggestions?



Read more

forum.xda-developers.com



[General] HELP! I can't find the backup I made with CWM - everything is gone!


HELP! I can't find the backup I made with CWM - everything is gone!



Hello! So I have an Android LG Optimus Q (through Straight Talk)

Because I wanted a screenshot app and to be able to have more "internal" memory, I rooted my device today and did a couple of other things.

1) I first rooted my device (and therefore installed SuperUser)
3) I installed Terminal Emulator
2) I downloaded CWM
3) I made a back-up (it said Done...)
4) I installed ROM Manager
5) I created (or at least I think so, since I went through all the steps) a second partition in my SD so I could create more "memory" destined to be used by programs.
6) I downloaded Link2SD and moved a couple of things to (I think...) the second partition in the SD

Everything was going ok, even though I wasn't sure if the partition had been created or not because I couldn't find a way to check it... until I went to check my 800 pictures and... they were all gone!!! I decided not to freak out at first because I remembered that I had made a backup directly through CWM... so I tried retrieving it through there... and nothing - nothing found... WTF?!

So I tried checking for the backup through ROM Manager, and... NOTHING!

Please, please, please help!!! I don't know if I have seriously messed something up or what, but there must be a way to at least recover the files... You know, like when you accidentally delete stuff in your camera you can still recover it with a program... is there anything like that? or steps I should follow to recover the backup? Could it have been deleted? but how? =/ I had pictures of my kid there and I just REALLY don't want to count them as lost =/ Help?!



Read more

forum.xda-developers.com



[General] Navigation App gone! I mean really gone!


Navigation App gone! I mean really gone!



So my boyfriend had to get a new phone. He now has a LG Optimus G.

After two weeks of using it, he is pissed off that the Navigation App is gone from the phone.
To be clear, we did check the app list and also the apps that were running/downloaded/all.

Nothing and it is nowhere to be found. The last time he used it was last night and now, it is gone completely.

He is really upset and has tried to do a soft reset on his phone. We also tried to update the maps app and it is already up to date.

He does not want to reset his phone to factory state again for the third time for other issues.

What can he do?

(Sorry if I sound annoying but, he is getting on my nerves and typically with all his other android questions I can answer it, just not this one)



Read more

forum.xda-developers.com



Tuesday, July 9, 2013

[General] HELP! Can't edit photos!


HELP! Can't edit photos!



I'm using a Galaxy S4. I can't edit my photos using the built-in editing feature in the gallery (drawing lines and all). Once I'm done drawing, I'll save the photo and it'll be the same as the original one, without any changes. I also can't use some apps like Snoopify or Catwang. Please help me!



Read more

forum.xda-developers.com



Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...