[android-developers] SCEP protocol supported by Android

2013-01-21 Thread Monty Jain
hey guys
 
 I tried finding this info but couldn't find it. Is SCEP protocol 
supported by android? If yes which version. If its not supported in android 
SDK is there any 3rd party package that can be used?
 
thanks
Monty

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How to call startactivityforresult from a non-activity class to get the resuts

2013-01-10 Thread Monty Jain
hey Thanks Mark for your reply
 
IMHO, such a library absolutely, positively should NOT be starting an 
activity. The developer using the library needs to have control over 
that behavior. 
 
Wanted to check if I have understood it correctly or not.
Basically I want to develop a library which perform certain task which 
involves running certain series of steps.
one of the steps can be involve starting an activity(UI to get input) and 
use that data to finish that step.
 
So is this bad design that a library starting an activity.. from android 
perspective
 
>From scenario perspective we should be able to do that right?  
 
 

On Thursday, January 10, 2013 12:36:53 PM UTC-8, Mark Murphy (a Commons 
Guy) wrote:

> On Thu, Jan 10, 2013 at 3:15 PM, Monty Jain > 
> wrote: 
> > is it possible to call startactivityforresult from a non-activity class 
> to 
> > get the results. 
>
> No, sorry. 
>
> > I have a class Class NonActivity(it doesn't derive from Activity as its 
> not 
> > a UI). This class will have bunch of functions(steps basically) to run. 
> One 
> > of the step requires to show UI(Activity) and then get the result(user 
> enter 
> > something). Then been able to use that data in next following steps. 
> > 
> > how can this be achieved without deriving from activity class as I don't 
> > have UI component 
>
> Collect the data before the first step, from your activity. 
>
> > Basically reason for using Non-Activity class is that I want to 
> encapsulate 
> > the whole process into a class(API) then anyone who wants to use this 
> class 
> > can call its API. 
>
> IMHO, such a library absolutely, positively should NOT be starting an 
> activity. The developer using the library needs to have control over 
> that behavior. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> Aqui estão alguns sites onde você pode perguntar ou responder dúvidas 
> sobre desenvolvimento de aplicações para Android: 
> http://www.andglobe.com 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to call startactivityforresult from a non-activity class to get the resuts

2013-01-10 Thread Monty Jain
**

is it possible to call startactivityforresult from a non-activity class to get 
the results. 

 

Scenario is something like this

I have a class Class NonActivity(it doesn't derive from Activity as its not 
a UI). This class will have bunch of functions(steps basically) to run. One 
of the step requires to show UI(Activity) and then get the result(user 
enter something). Then been able to use that data in next following steps.

how can this be achieved without deriving from activity class as I don't 
have UI component Also Since I don't want to derive from activity class 
that means I cannot override OnActivityResult() where results actually come 

Basically reason for using Non-Activity class is that I want to encapsulate 
the whole process into a class(API) then anyone who wants to use this class 
can call its API. This API executes series of steps and some of them 
involves taking data from user in form of activity. Even if we forget about 
startActivityForResult all I want is data from a activity in the non 
activity class is this scenario not a valid one in android?

thanks Monty

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Settings app crashes when clicked on storage on Jelly Bean Emulator

2013-01-08 Thread Monty Jain
hey
 
Settings app crashes when clicked on storage  on Jelly Bean Emulator. Has 
anyone also faced this issue? Any work around
 
thanks
Monty

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Error "there isn't enough space on internal download storage " in internal download app

2013-01-08 Thread Monty Jain
hey Bob
 
 
   I wiped the data and gave 1024 MB of internal memory space. Still I get 
same error :(. My app I sonly 500KB. I suspect its some other issue an dits 
giving wrong error msg no?
 
thanks
Monty

On Tuesday, January 8, 2013 2:18:01 PM UTC-8, bob wrote:

> Go to the *AVD Manager*.
>
> Select the AVD.
>
> Click start.
>
> Check the "Wipe user data" box and "Launch".
>
>
> Also, how much Internal Storage did you give it?  200MB might not be 
> enough.
>
>
>
>
>
>
> On Tuesday, January 8, 2013 3:55:04 PM UTC-6, Monty Jain wrote:
>>
>> hey
>>  
>>thanks for ur response. I just created this new emulator so was 
>> wondering that is this error msg real one or some other error is happening? 
>> BTW how do u wipe?
>> another thing my settings app on JB emulator keeps crashing? Known issue?
>>  
>> Monty
>>
>> On Tuesday, January 8, 2013 1:51:03 PM UTC-8, bob wrote:
>>
>>> There's not enough free space on your emulator.  Maybe do a "wipe" on 
>>> your emulator?
>>>
>>> On Tuesday, January 8, 2013 3:43:45 PM UTC-6, Monty Jain wrote:
>>>>
>>>> hey
>>>>  
>>>>I am trying to download a app from a URL but I keep getting error 
>>>> "there isn't enough space on internal download storage " in internal 
>>>> download app on Jelly Bean emulator. this same thing works fine on real 
>>>> device? any idea
>>>>  
>>>> thanks
>>>> Monty
>>>>
>>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Error "there isn't enough space on internal download storage " in internal download app

2013-01-08 Thread Monty Jain
hey
 
   thanks for ur response. I just created this new emulator so was 
wondering that is this error msg real one or some other error is happening? 
BTW how do u wipe?
another thing my settings app on JB emulator keeps crashing? Known issue?
 
Monty

On Tuesday, January 8, 2013 1:51:03 PM UTC-8, bob wrote:

> There's not enough free space on your emulator.  Maybe do a "wipe" on your 
> emulator?
>
> On Tuesday, January 8, 2013 3:43:45 PM UTC-6, Monty Jain wrote:
>>
>> hey
>>  
>>I am trying to download a app from a URL but I keep getting error 
>> "there isn't enough space on internal download storage " in internal 
>> download app on Jelly Bean emulator. this same thing works fine on real 
>> device? any idea
>>  
>> thanks
>> Monty
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Error "there isn't enough space on internal download storage " in internal download app

2013-01-08 Thread Monty Jain
hey
 
   I am trying to download a app from a URL but I keep getting error 
"there isn't enough space on internal download storage " in internal 
download app on Jelly Bean emulator. this same thing works fine on real 
device? any idea
 
thanks
Monty

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Dynamically removing fragments and saving their UI transformations

2012-12-30 Thread monty


On Saturday, December 29, 2012 1:38:01 PM UTC+5:30, Dmitriy F wrote:
>
> I have a couple of fragments which substitute one for another. The UI of 
> these fragments changes and I need to hold it's new state. So the code 
> looks pretty trivial:
>
> FragmentManager fragmentManager = getSupportFragmentManager();
> FragmentTransaction fragmentTransaction = fragmentManager
> .beginTransaction();
>
> if (mStepTwo == null) {
> mStepTwo = new QuizStepTwo();
> mStepTwo.setListener(mStepTwoListener);
> } else {
> fragmentTransaction.remove(mStepTwo);
> }
>
> fragmentTransaction.replace(R.id.step_holder, mStepTwo);
> fragmentTransaction.addToBackStack("second_step");
>
> fragmentTransaction.commit();
>
> However when I replace the second step with the first, for instance by 
> pressing the back-button,- its' UI state rolls back to initial.
>
> How do I hold the state ? OnSaveInstanceState ? or something more 
> comfortable ?
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Dynamically removing fragments and saving their UI transformations

2012-12-30 Thread monty
use this setRetainInstance(true) in that fragment to which you want to save 
state. within onCreate();

On Saturday, December 29, 2012 1:38:01 PM UTC+5:30, Dmitriy F wrote:
>
> I have a couple of fragments which substitute one for another. The UI of 
> these fragments changes and I need to hold it's new state. So the code 
> looks pretty trivial:
>
> FragmentManager fragmentManager = getSupportFragmentManager();
> FragmentTransaction fragmentTransaction = fragmentManager
> .beginTransaction();
>
> if (mStepTwo == null) {
> mStepTwo = new QuizStepTwo();
> mStepTwo.setListener(mStepTwoListener);
> } else {
> fragmentTransaction.remove(mStepTwo);
> }
>
> fragmentTransaction.replace(R.id.step_holder, mStepTwo);
> fragmentTransaction.addToBackStack("second_step");
>
> fragmentTransaction.commit();
>
> However when I replace the second step with the first, for instance by 
> pressing the back-button,- its' UI state rolls back to initial.
>
> How do I hold the state ? OnSaveInstanceState ? or something more 
> comfortable ?
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to set multiple theme in an application at run time.

2012-12-30 Thread monty
Hello,

Is there any way to choose one particular theme from list of theme's at run 
time and apply it to entire activities in an application.

I want  to show a dialog fragment with radio buttons (with theme names) 
.User will select a particular theme and that theme will be applied to the 
activities.

Dialog fragment is available with me.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How to make Text unselectable in EditText

2012-12-27 Thread monty
my means is that no one can select the text which is inside the 
edittext..but user can edit it...
example: I have field USER NAME - "india" ,if user double click or long 
press in edittext to select this text "india",he should not able to do 
that..but he wants to change USER NAME i.e "HelloUser"..he can do..so 
edittext can be edited but no selectable.

On Friday, December 28, 2012 6:41:34 AM UTC+5:30, TreKing wrote:
>
> On Thu, Dec 27, 2012 at 4:24 AM, monty 
> > wrote:
>
>> example:- in my EditText there is a Text "HelloAndroid",so i want no one 
>> can select this text. only the user can edit it.
>>
>>
> What's the point of this?
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
> transit tracking app for Android-powered devices
>  

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to make Text unselectable in EditText

2012-12-27 Thread monty
Hello,
Is there any way that user can not select the text inside 
EditText.


example:- in my EditText there is a Text "HelloAndroid",so i want no one 
can select this text. only the user can edit it.



Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] android:imeoptions working behaviour.

2012-12-26 Thread monty
Hello,

I have three edittext .and i am using android:imeOptions="actionNext" ,with 
this xml code my edittext contains a next button in landscap mode.
but problem is when i select the text in edittext that NEXT button changes 
to EDIT button ,which has copy,cut,paste option.
i want to avoid this behaviour.
i dont want to change the NEXT button to EDIT button.

please any assistance.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to avoid cut/copy/paste in smart phone after rotation port to land on Android 4.x?

2012-12-20 Thread monty


I am working on to avoid cut/copy/paste in smart phone (for tablet its 
fine). Its fine in port mode but coming in land mode EditText shows a 
Button Next. after selecting the text, next button converts into Edit 
Button which has copy,cut and select option.

So is there any way to disable cut/copy after rotation when edit button 
appears.

i am following this link. How to disable copy/paste from/to 
EditText

I am using Google Nexus.






-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Behaviour of EditText.

2012-12-20 Thread monty
Hello,

I have lot of edittext in my application some of contains 
(Numberic,Text,Date) data only .
but i want to use "setInputType(InputType.TYPE_TEXT_VARIATION_FILTER);" to 
avoid "add dictonary".
so i add  this code in my 

EditTextClass extends EditText
{

public EditTextClass()
{

init();
}

public void init()
{
setInputType(InputType.TYPE_TEXT_VARIATION_FILTER);
}
}

and for making edittext numberic  i am using  android:inputtype = "numeric 
" in my xml.
but after running the code ,i observe the output that softkeyborad for 
numeric edittext showing the text words i.e A to Z.

is there any way to avoid "add dictionay".



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to save AsyncTask class object in onSaveInstanceState()

2012-12-10 Thread monty


Hello


is this possible to save AsyncTask class object on rotation and reuse it 
again.

  public class MyTask extends AsyncTask
{

}

i am using 4.03 version

any good solution. Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to save AsyncTask class object in onSaveInstanceState().

2012-12-10 Thread monty


On Monday, December 10, 2012 3:05:53 PM UTC+5:30, monty wrote:
>
> Hello,
>
> is this possible to save AsyncTask class object on rotation and reuse it 
> again..
>
> public class MyTask extends AsyncTask
> {
>
> }
>
> I am using 4.03 version.
 

> any good solution. Thanks
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to save AsyncTask class object in onSaveInstanceState().

2012-12-10 Thread monty
Hello,

is this possible to save AsyncTask class object on rotation and reuse it 
again..

public class MyTask extends AsyncTask
{

}

any good solution. Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: why progress dialog dismiss after rotating the screen landscap to portrait

2012-11-26 Thread monty
I got solution for that android:configChange="Orientation" but i am using 
android annotation so i need some thing in annotation..i found 
@NonConfigurationInstance but i dont know how to use it.

On Tuesday, November 27, 2012 10:45:41 AM UTC+5:30, William Ferguson wrote:
>
> True, but that doesn't mean it won't work.
>
> Non-deprecated mechanism is to use the FragmentManager, but I have no idea 
> how your dialog will behaves wrt Activity rotation. You didn't elaborate on 
> exactly how you are creating your Dialog in the first place. Are you 
> already using the FragmentManager, perhaps showing some of your code might 
> help.
>
> William
>
> On Tuesday, November 27, 2012 2:52:20 PM UTC+10, monty wrote:
>>
>> but showDialog is deprecated.
>>
>> On Tuesday, November 27, 2012 9:43:50 AM UTC+5:30, William Ferguson wrote:
>>>
>>> It is being dismissed because during rotation your Activity is being 
>>> destroyed and recreated and hence the Context for your dialog gets 
>>> destroyed.
>>>
>>> If you would like your dialog to be recreated after rotation use 
>>> Activity#showDialog(dialogId) instead, as this will automatically take care 
>>> of reconstruction of the dialog.
>>>
>>> William
>>>
>>> On Tuesday, November 27, 2012 1:36:23 PM UTC+10, monty wrote:
>>>>
>>>> Hello,
>>>>  i am using android annotation , in my app i am using progress 
>>>> dialog but after rotation the screen it dismiss(why).
>>>>
>>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: why progress dialog dismiss after rotating the screen landscap to portrait

2012-11-26 Thread monty
but showDialog is deprecated.

On Tuesday, November 27, 2012 9:43:50 AM UTC+5:30, William Ferguson wrote:
>
> It is being dismissed because during rotation your Activity is being 
> destroyed and recreated and hence the Context for your dialog gets 
> destroyed.
>
> If you would like your dialog to be recreated after rotation use 
> Activity#showDialog(dialogId) instead, as this will automatically take care 
> of reconstruction of the dialog.
>
> William
>
> On Tuesday, November 27, 2012 1:36:23 PM UTC+10, monty wrote:
>>
>> Hello,
>>  i am using android annotation , in my app i am using progress 
>> dialog but after rotation the screen it dismiss(why).
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] why progress dialog dismiss after rotating the screen landscap to portrait

2012-11-26 Thread monty
Hello,
 i am using android annotation , in my app i am using progress 
dialog but after rotation the screen it dismiss(why).

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Crosscompiling PJSUA for Android.

2012-07-30 Thread Monty Python
Greetings everyone!

I'm trying to crosscompile a Native-C application, using only the 
crosscompilers and linkers without ndk-build. After the crosscompilation is 
done, my application seems to launch the following signal (using android 
emulator's strace):

> sigaction(48472, {0xb00144c4, [], SA_RESTART}, {0xb00144c4, [], 
SA_RESTART}, 0) = -1 EINVAL (Invalid argument)

By the way, I haven't found the signal 48472 anywhere, neither in pjsip, 
neither in android-ndk!! Could you please give me an advice? Thanks in 
advance.

 M.P.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] "The item you were attempting to purchase could not be found." problem

2011-09-14 Thread monty
Hi All,
  I have created multiple apks(two :phone and tablet) for an app i
have developed called "Yoga for Positive Health" and published both
the apks in Market.
  After publishing ,I  purchased the apk for phone and it worked
fine(although initially i had problems so i updated the apk
again).Well the problem is for the apk for tablet .I am using Motorola
Zoom and Acer Iconia.When i search for the app in Market on  tablet ,i
was able to download it once .Next time when i logged in with
different emal id and credentials it  showed  me apk size 0 and there
is no version name.Although i have specified version name as 1.1.2 and
size is 40 MB.When i click "Buy" it says "The item you were attempting
to purchase could not be found."

Is this a Market issue or is it because of multiple apks i am
using .Could some1 please give a solution .I have tried all possible
ways .I even updated the apk with new version but still the same
problem.

Regards
Monty

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Downloading Videos using Service but facing problem with respect to Wifi Connection

2011-03-14 Thread monty
Hi All
 I am downloading encrypted  videos from server in my phone memory and
decrptying and moving the decrypted video to sdcard. I have the
following issues and doubts:

1.Is it good to use Service to handle downloading process of videos or
is there any other alternative?

2.I am downloding about 5 videos continuosly in a for loop in a
Service which will be started from my launcher Activity. The linear
downloading works fine but when there is some Wifi issue such as
network is down..then how can the user get notified and if the Wifi is
up again will the Service work again or it has to be started again?

3.Could any1 please tell how to show a Download progress bar in
android

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Listener for Wifi Connection

2011-03-14 Thread monty
Hi All
I am developing a project which includes downloading video from
server,so obviously i am using Wifi.Now if suddenly the Wifi
connection is lost due to some reason and ater again resumed,how do i
listen for this event.I mean is its possible to programmatically
enable a Wifi if its disabled?I have done that for Airplane mode but
not finding for Wifi.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Dynamically Resize Images for different Android devices

2011-03-14 Thread monty
Hi All
My issue is simple.I want to use one set of images which can be
used on mobile as well as tablets.I have a image of size 690 by 400 .i
want to use this image and resize it programmatically and have this
resized image displayed on mobiles.
   Could anyone please give an idea on how to accomplish this?This is
bcoz if i use different set of images it will increase the size of
"apk".

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-04 Thread monty
how do you get the image at the center when selected or scrolling and
have its text displayed?

On Mar 3, 7:56 pm, Justin Anderson  wrote:
> It returns the text that should be displayed displayed for the item at the
> given position
> On Mar 3, 2011 4:27 AM, "monty"  wrote:
>
> > What does the "getItemText(int pos) " method in your code do?
>
> > On Mar 1, 7:26 pm, Justin Anderson  wrote:
> >> The way I implemented mine in AppSwipe! is a little complex...  Here is a
> >> quick overview of what I did:
>
> >> - I subclassed RelativeLayout and created a new class called
> TitledGallery
> >> that holds the Gallery and two TextViews (for reusability reasons because
> I
> >> have up to 5 of these in the main display)
> >> - My image adapter has the following method: public String
> getItemText(int
> >> pos)
> >> - My getView method only deals with the ImageView in the Gallery... It
> does
> >> not change the text in the view
> >> - I implemented onItemSelectedListener and put this listener on my
> Gallery
> >> - I update the text in OnItemsSelectedListener.onItemSelected() and
> >> OnItemSelectedListener.onNothingSelected()
>
> >> Hope that helps!
>
> >> On Tue, Mar 1, 2011 at 4:29 AM, monty  wrote:
> >> > Sorry the apps name is AppSwipe
>
> >> > On Mar 1, 3:53 pm, monty  wrote:
> >> > > Actually my requirement is that when when the gallery is scrolled
> >> > > there will be a TextView at bottom of Gallery that will display the
> >> > > name of the image or some information related to that image.Now i
> want
> >> > > that when i scroll and stop the Gallery the image in the middle of
> >> > > Gallery should have its data displayed in the TextView.You can check
> >> > > the above code i have posted.
> >> > >  There is an "AppAwipe" app that does this.Check it out and you will
> >> > > understand my requirement.
> >> > > Please let me know if any solution.
>
> >> > > On Mar 1, 3:29 pm, Gergely Juhász  wrote:
>
> >> > > > sorry for the syntax:
> >> > > > What if you use TextViews instead of using ImageViews?
>
> >> > > > On 1 March 2011 11:28, Gergely Juhász  wrote:
>
> >> > > > > What is you use TextView instead of using image views.
> >> > > > > TexView has an attribute android:drawableTop. With that you can
> >> > simple
> >> > > > > draw an image above the text.
> >> > > > > Or you can use a vertical linear layout as the view element (wtih
> an
> >> > > > > image and a text).
>
> >> > > > > On 1 March 2011 11:13, monty  wrote:
> >> > > > >> yes.. i have checked that code.But here he is not displaying any
> >> > text
> >> > > > >> when the Gallery is scrolled.So any solution?Am i missing some
> API
> >> > or
> >> > > > >> something in the code i sent you.?
>
> >> > > > >> On Mar 1, 2:59 pm, Gergely Juhász  wrote:
> >> > > > >>> what do you think about this:
> >> >http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html
> >> > > > >>> it's a nice cover flow using the gallery
>
> >> > > > >>> On 1 March 2011 10:41, monty  wrote:
>
> >> > > > >>> > Yes the data displaying is correct.The parsing is fine.The
> only
> >> > issue
> >> > > > >>> > is its not working like your app where you are highlighting
> the
> >> > centre
> >> > > > >>> > item of the Gallery and displaying it.Could u then please
> give a
> >> > brief
> >> > > > >>> > view of yourcode.Are you also using getView() and
> implementing
> >> > the
> >> > > > >>> > code?
>
> >> > > > >>> > On Mar 1, 2:35 pm, Justin Anderson 
> >> > wrote:
> >> > > > >>> >> Well... I didn't notice anything that wrong with your code
> (but
> >> > I may have
> >> > > > >>> >> missed something).  Have you checked your parsing code to
> make
> >> > sure that the
> >> > > > >>> >> data is accurate once you've parsed the xml?
>
> >> > > > >>>

[android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-03 Thread monty
What does the "getItemText(int pos) "  method in your code do?

On Mar 1, 7:26 pm, Justin Anderson  wrote:
> The way I implemented mine in AppSwipe! is a little complex...  Here is a
> quick overview of what I did:
>
> - I subclassed RelativeLayout and created a new class called TitledGallery
> that holds the Gallery and two TextViews (for reusability reasons because I
> have up to 5 of these in the main display)
> - My image adapter has the following method: public String getItemText(int
> pos)
> - My getView method only deals with the ImageView in the Gallery... It does
> not change the text in the view
> - I implemented onItemSelectedListener and put this listener on my Gallery
> - I update the text in OnItemsSelectedListener.onItemSelected() and
> OnItemSelectedListener.onNothingSelected()
>
> Hope that helps!
>
> On Tue, Mar 1, 2011 at 4:29 AM, monty  wrote:
> > Sorry the apps name is AppSwipe
>
> > On Mar 1, 3:53 pm, monty  wrote:
> > > Actually my requirement is that when when the gallery is scrolled
> > > there will be a TextView at bottom of Gallery that will display the
> > > name of the image or some information related to that image.Now i want
> > > that when i scroll and stop the Gallery the image in the middle of
> > > Gallery should have its data displayed in the TextView.You can check
> > > the above code i have posted.
> > >  There is an "AppAwipe" app that does this.Check it out and you will
> > > understand my requirement.
> > > Please let me know if any solution.
>
> > > On Mar 1, 3:29 pm, Gergely Juhász  wrote:
>
> > > > sorry for the syntax:
> > > > What if you use TextViews instead of using ImageViews?
>
> > > > On 1 March 2011 11:28, Gergely Juhász  wrote:
>
> > > > > What is you use TextView instead of using image views.
> > > > > TexView has an attribute android:drawableTop. With that you can
> > simple
> > > > > draw an image above the text.
> > > > > Or you can use a vertical linear layout as the view element (wtih an
> > > > > image and a text).
>
> > > > > On 1 March 2011 11:13, monty  wrote:
> > > > >> yes.. i have checked that code.But here he is not displaying any
> > text
> > > > >> when the Gallery is scrolled.So any solution?Am i missing some API
> > or
> > > > >> something in the code i sent you.?
>
> > > > >> On Mar 1, 2:59 pm, Gergely Juhász  wrote:
> > > > >>> what do you think about this:
> >http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html
> > > > >>> it's a nice cover flow using the gallery
>
> > > > >>> On 1 March 2011 10:41, monty  wrote:
>
> > > > >>> > Yes the data displaying is correct.The parsing is fine.The only
> > issue
> > > > >>> > is its not working like your app where you are highlighting the
> > centre
> > > > >>> > item of the Gallery and displaying it.Could u then please give a
> > brief
> > > > >>> > view of yourcode.Are you also using getView() and implementing
> > the
> > > > >>> > code?
>
> > > > >>> > On Mar 1, 2:35 pm, Justin Anderson 
> > wrote:
> > > > >>> >> Well... I didn't notice anything that wrong with your code (but
> > I may have
> > > > >>> >> missed something).  Have you checked your parsing code to make
> > sure that the
> > > > >>> >> data is accurate once you've parsed the xml?
>
> > > > >>> >> On Tue, Mar 1, 2011 at 2:23 AM, monty 
> > wrote:
> > > > >>> >> > Hi
> > > > >>> >> > Here clip_model is an arraylist that will hold the data of xml
> > we
> > > > >>> >> > parse.And here i am getting the data for from that arraylist
> > using the
> > > > >>> >> > "position" variable.
> > > > >>> >> > Also i went thru your app ,thats exactly what i want for my
> > app.
>
> > > > >>> >> > On Mar 1, 1:33 pm, Justin Anderson 
> > wrote:
> > > > >>> >> > > What is clip_model?
>
> > > > >>> >> > > On Tue, Mar 1, 2011 at 12:32 AM, monty <
> > neilm30s...@gmail.com> wrote:
> > > > >>> >> > &

[android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread monty
Sorry the apps name is AppSwipe

On Mar 1, 3:53 pm, monty  wrote:
> Actually my requirement is that when when the gallery is scrolled
> there will be a TextView at bottom of Gallery that will display the
> name of the image or some information related to that image.Now i want
> that when i scroll and stop the Gallery the image in the middle of
> Gallery should have its data displayed in the TextView.You can check
> the above code i have posted.
>  There is an "AppAwipe" app that does this.Check it out and you will
> understand my requirement.
> Please let me know if any solution.
>
> On Mar 1, 3:29 pm, Gergely Juhász  wrote:
>
> > sorry for the syntax:
> > What if you use TextViews instead of using ImageViews?
>
> > On 1 March 2011 11:28, Gergely Juhász  wrote:
>
> > > What is you use TextView instead of using image views.
> > > TexView has an attribute android:drawableTop. With that you can simple
> > > draw an image above the text.
> > > Or you can use a vertical linear layout as the view element (wtih an
> > > image and a text).
>
> > > On 1 March 2011 11:13, monty  wrote:
> > >> yes.. i have checked that code.But here he is not displaying any text
> > >> when the Gallery is scrolled.So any solution?Am i missing some API or
> > >> something in the code i sent you.?
>
> > >> On Mar 1, 2:59 pm, Gergely Juhász  wrote:
> > >>> what do you think about 
> > >>> this:http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html
> > >>> it's a nice cover flow using the gallery
>
> > >>> On 1 March 2011 10:41, monty  wrote:
>
> > >>> > Yes the data displaying is correct.The parsing is fine.The only issue
> > >>> > is its not working like your app where you are highlighting the centre
> > >>> > item of the Gallery and displaying it.Could u then please give a brief
> > >>> > view of yourcode.Are you also using getView() and implementing the
> > >>> > code?
>
> > >>> > On Mar 1, 2:35 pm, Justin Anderson  wrote:
> > >>> >> Well... I didn't notice anything that wrong with your code (but I 
> > >>> >> may have
> > >>> >> missed something).  Have you checked your parsing code to make sure 
> > >>> >> that the
> > >>> >> data is accurate once you've parsed the xml?
>
> > >>> >> On Tue, Mar 1, 2011 at 2:23 AM, monty  wrote:
> > >>> >> > Hi
> > >>> >> > Here clip_model is an arraylist that will hold the data of xml we
> > >>> >> > parse.And here i am getting the data for from that arraylist using 
> > >>> >> > the
> > >>> >> > "position" variable.
> > >>> >> > Also i went thru your app ,thats exactly what i want for my app.
>
> > >>> >> > On Mar 1, 1:33 pm, Justin Anderson  wrote:
> > >>> >> > > What is clip_model?
>
> > >>> >> > > On Tue, Mar 1, 2011 at 12:32 AM, monty  
> > >>> >> > > wrote:
> > >>> >> > > > Hi,
> > >>> >> > > > Following is part of code from the Activity.Hope the code will 
> > >>> >> > > > be
> > >>> >> > > > clear enough for you to understand.Please let me know how to 
> > >>> >> > > > resolve
> > >>> >> > > > this issue.It would be really helpful.
>
> > >>> >> > > >  setContentView(R.layout.chapter_clips);
>
> > >>> >> > > > //will have Gallery,WebView and TextView.The WebView and  
> > >>> >> > > > TextView
> > >>> >> > > > data has to be changed when i scroll the Gallery,so i call the 
> > >>> >> > > > Webview
> > >>> >> > > > and TextView in the getView() of the adapter.
>
> > >>> >> > > >   Gallery g = (Gallery) findViewById(R.id.gallery);
> > >>> >> > > >                g.setAdapter(new ImageAdapter(this));//calling 
> > >>> >> > > > the
> > >>> >> > Adapter
> > >>> >> > > > class
> > >>> >> > > >                g.setAnimationDuration(3000);
> > >>> >> > > >   

[android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread monty
Actually my requirement is that when when the gallery is scrolled
there will be a TextView at bottom of Gallery that will display the
name of the image or some information related to that image.Now i want
that when i scroll and stop the Gallery the image in the middle of
Gallery should have its data displayed in the TextView.You can check
the above code i have posted.
 There is an "AppAwipe" app that does this.Check it out and you will
understand my requirement.
Please let me know if any solution.

On Mar 1, 3:29 pm, Gergely Juhász  wrote:
> sorry for the syntax:
> What if you use TextViews instead of using ImageViews?
>
> On 1 March 2011 11:28, Gergely Juhász  wrote:
>
> > What is you use TextView instead of using image views.
> > TexView has an attribute android:drawableTop. With that you can simple
> > draw an image above the text.
> > Or you can use a vertical linear layout as the view element (wtih an
> > image and a text).
>
> > On 1 March 2011 11:13, monty  wrote:
> >> yes.. i have checked that code.But here he is not displaying any text
> >> when the Gallery is scrolled.So any solution?Am i missing some API or
> >> something in the code i sent you.?
>
> >> On Mar 1, 2:59 pm, Gergely Juhász  wrote:
> >>> what do you think about 
> >>> this:http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html
> >>> it's a nice cover flow using the gallery
>
> >>> On 1 March 2011 10:41, monty  wrote:
>
> >>> > Yes the data displaying is correct.The parsing is fine.The only issue
> >>> > is its not working like your app where you are highlighting the centre
> >>> > item of the Gallery and displaying it.Could u then please give a brief
> >>> > view of yourcode.Are you also using getView() and implementing the
> >>> > code?
>
> >>> > On Mar 1, 2:35 pm, Justin Anderson  wrote:
> >>> >> Well... I didn't notice anything that wrong with your code (but I may 
> >>> >> have
> >>> >> missed something).  Have you checked your parsing code to make sure 
> >>> >> that the
> >>> >> data is accurate once you've parsed the xml?
>
> >>> >> On Tue, Mar 1, 2011 at 2:23 AM, monty  wrote:
> >>> >> > Hi
> >>> >> > Here clip_model is an arraylist that will hold the data of xml we
> >>> >> > parse.And here i am getting the data for from that arraylist using 
> >>> >> > the
> >>> >> > "position" variable.
> >>> >> > Also i went thru your app ,thats exactly what i want for my app.
>
> >>> >> > On Mar 1, 1:33 pm, Justin Anderson  wrote:
> >>> >> > > What is clip_model?
>
> >>> >> > > On Tue, Mar 1, 2011 at 12:32 AM, monty  
> >>> >> > > wrote:
> >>> >> > > > Hi,
> >>> >> > > > Following is part of code from the Activity.Hope the code will be
> >>> >> > > > clear enough for you to understand.Please let me know how to 
> >>> >> > > > resolve
> >>> >> > > > this issue.It would be really helpful.
>
> >>> >> > > >  setContentView(R.layout.chapter_clips);
>
> >>> >> > > > //will have Gallery,WebView and TextView.The WebView and  
> >>> >> > > > TextView
> >>> >> > > > data has to be changed when i scroll the Gallery,so i call the 
> >>> >> > > > Webview
> >>> >> > > > and TextView in the getView() of the adapter.
>
> >>> >> > > >   Gallery g = (Gallery) findViewById(R.id.gallery);
> >>> >> > > >                g.setAdapter(new ImageAdapter(this));//calling the
> >>> >> > Adapter
> >>> >> > > > class
> >>> >> > > >                g.setAnimationDuration(3000);
> >>> >> > > >                g.setOnItemSelectedListener(this);
>
> >>> >> > > >    public class ImageAdapter extends BaseAdapter {
> >>> >> > > >                 int mGalleryItemBackground;
>
> >>> >> > > >                public ImageAdapter(Context c) {
> >>> >> > > >                    mContext = c;
>
> >>> >> > > >                }
>
> >>> >> > > &

[android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread monty
yes.. i have checked that code.But here he is not displaying any text
when the Gallery is scrolled.So any solution?Am i missing some API or
something in the code i sent you.?

On Mar 1, 2:59 pm, Gergely Juhász  wrote:
> what do you think about 
> this:http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html
> it's a nice cover flow using the gallery
>
> On 1 March 2011 10:41, monty  wrote:
>
> > Yes the data displaying is correct.The parsing is fine.The only issue
> > is its not working like your app where you are highlighting the centre
> > item of the Gallery and displaying it.Could u then please give a brief
> > view of yourcode.Are you also using getView() and implementing the
> > code?
>
> > On Mar 1, 2:35 pm, Justin Anderson  wrote:
> >> Well... I didn't notice anything that wrong with your code (but I may have
> >> missed something).  Have you checked your parsing code to make sure that 
> >> the
> >> data is accurate once you've parsed the xml?
>
> >> On Tue, Mar 1, 2011 at 2:23 AM, monty  wrote:
> >> > Hi
> >> > Here clip_model is an arraylist that will hold the data of xml we
> >> > parse.And here i am getting the data for from that arraylist using the
> >> > "position" variable.
> >> > Also i went thru your app ,thats exactly what i want for my app.
>
> >> > On Mar 1, 1:33 pm, Justin Anderson  wrote:
> >> > > What is clip_model?
>
> >> > > On Tue, Mar 1, 2011 at 12:32 AM, monty  wrote:
> >> > > > Hi,
> >> > > > Following is part of code from the Activity.Hope the code will be
> >> > > > clear enough for you to understand.Please let me know how to resolve
> >> > > > this issue.It would be really helpful.
>
> >> > > >  setContentView(R.layout.chapter_clips);
>
> >> > > > //will have Gallery,WebView and TextView.The WebView and  TextView
> >> > > > data has to be changed when i scroll the Gallery,so i call the 
> >> > > > Webview
> >> > > > and TextView in the getView() of the adapter.
>
> >> > > >   Gallery g = (Gallery) findViewById(R.id.gallery);
> >> > > >                g.setAdapter(new ImageAdapter(this));//calling the
> >> > Adapter
> >> > > > class
> >> > > >                g.setAnimationDuration(3000);
> >> > > >                g.setOnItemSelectedListener(this);
>
> >> > > >    public class ImageAdapter extends BaseAdapter {
> >> > > >                 int mGalleryItemBackground;
>
> >> > > >                public ImageAdapter(Context c) {
> >> > > >                    mContext = c;
>
> >> > > >                }
>
> >> > > >                public int getCount() {
>
> >> > > >                        return mchaptermodel.clip_model.size();
> >> > > >                }
>
> >> > > >                public Object getItem(int position) {
> >> > > >                    return position;
> >> > > >                }
>
> >> > > >                public long getItemId(int position) {
> >> > > >                    return position;
> >> > > >                }
>
> >> > > >                public View getView(int position, View convertView,
> >> > > > ViewGroup
> >> > > > parent) {
>
> >> > > >                     LayoutInflater
>
> >> > lInflater=(LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
> >> > > >                     convertView = lInflater.inflate(R.layout.item,
> >> > null,
> >> > > > false); //this "item" xml contains  imageview  to be displayed on
> >> > > > Gallery
>
> >> > > > clipimagename=mchaptermodel.clip_model.get(position).getClipimage(); 
> >> > > > /
> >> > > > *Getting all data from parsed xml */
>
> >> > > > cliptitle=mchaptermodel.clip_model.get(position).getClipTitle();//for
> >> > > > textview
>
> >> > > > cliptext=mchaptermodel.clip_model.get(position).getClipText();//for
> >> > > > webview
>
> >> > > >                     try {
>
> >> > > > clipimagename=clipimagename.replaceAll(".png",""

[android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread monty
Yes the data displaying is correct.The parsing is fine.The only issue
is its not working like your app where you are highlighting the centre
item of the Gallery and displaying it.Could u then please give a brief
view of yourcode.Are you also using getView() and implementing the
code?

On Mar 1, 2:35 pm, Justin Anderson  wrote:
> Well... I didn't notice anything that wrong with your code (but I may have
> missed something).  Have you checked your parsing code to make sure that the
> data is accurate once you've parsed the xml?
>
> On Tue, Mar 1, 2011 at 2:23 AM, monty  wrote:
> > Hi
> > Here clip_model is an arraylist that will hold the data of xml we
> > parse.And here i am getting the data for from that arraylist using the
> > "position" variable.
> > Also i went thru your app ,thats exactly what i want for my app.
>
> > On Mar 1, 1:33 pm, Justin Anderson  wrote:
> > > What is clip_model?
>
> > > On Tue, Mar 1, 2011 at 12:32 AM, monty  wrote:
> > > > Hi,
> > > > Following is part of code from the Activity.Hope the code will be
> > > > clear enough for you to understand.Please let me know how to resolve
> > > > this issue.It would be really helpful.
>
> > > >  setContentView(R.layout.chapter_clips);
>
> > > > //will have Gallery,WebView and TextView.The WebView and  TextView
> > > > data has to be changed when i scroll the Gallery,so i call the Webview
> > > > and TextView in the getView() of the adapter.
>
> > > >   Gallery g = (Gallery) findViewById(R.id.gallery);
> > > >                g.setAdapter(new ImageAdapter(this));//calling the
> > Adapter
> > > > class
> > > >                g.setAnimationDuration(3000);
> > > >                g.setOnItemSelectedListener(this);
>
> > > >    public class ImageAdapter extends BaseAdapter {
> > > >                 int mGalleryItemBackground;
>
> > > >                public ImageAdapter(Context c) {
> > > >                    mContext = c;
>
> > > >                }
>
> > > >                public int getCount() {
>
> > > >                        return mchaptermodel.clip_model.size();
> > > >                }
>
> > > >                public Object getItem(int position) {
> > > >                    return position;
> > > >                }
>
> > > >                public long getItemId(int position) {
> > > >                    return position;
> > > >                }
>
> > > >                public View getView(int position, View convertView,
> > > > ViewGroup
> > > > parent) {
>
> > > >                     LayoutInflater
>
> > lInflater=(LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
> > > >                     convertView = lInflater.inflate(R.layout.item,
> > null,
> > > > false); //this "item" xml contains  imageview  to be displayed on
> > > > Gallery
>
> > > > clipimagename=mchaptermodel.clip_model.get(position).getClipimage(); /
> > > > *Getting all data from parsed xml */
>
> > > > cliptitle=mchaptermodel.clip_model.get(position).getClipTitle();//for
> > > > textview
>
> > > > cliptext=mchaptermodel.clip_model.get(position).getClipText();//for
> > > > webview
>
> > > >                     try {
>
> > > > clipimagename=clipimagename.replaceAll(".png","");
> > > >                                     galleryimage=
> > > > getResources().getIdentifier(clipimagename,"drawable",package_name);
>
> > > >                        } catch (Exception e) {
> > > >                                Log.i("Drawing Image...","" );
> > > >                        }
>
> > > >                     ImageView i=
> > > > (ImageView)convertView.findViewById(R.id.imageview);
>
> > > > i.setImageResource(galleryimage) ;
> >   //
> > > > setting the image on Gallery
> > > >                     i.setAdjustViewBounds(true);
> > > >                     i.setScaleType(ScaleType.FIT_CENTER);
>
> > > > /*The TextView and Webview defined below has to be changed when the
> > > > Gallery is scrolled which is working fine but as i said i want the
> > > > image in Gallery which comes in center its data should be displayed on
> > > > TextView and Webview an

[android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread monty
Hi
Here clip_model is an arraylist that will hold the data of xml we
parse.And here i am getting the data for from that arraylist using the
"position" variable.
Also i went thru your app ,thats exactly what i want for my app.

On Mar 1, 1:33 pm, Justin Anderson  wrote:
> What is clip_model?
>
> On Tue, Mar 1, 2011 at 12:32 AM, monty  wrote:
> > Hi,
> > Following is part of code from the Activity.Hope the code will be
> > clear enough for you to understand.Please let me know how to resolve
> > this issue.It would be really helpful.
>
> >  setContentView(R.layout.chapter_clips);
>
> > //will have Gallery,WebView and TextView.The WebView and  TextView
> > data has to be changed when i scroll the Gallery,so i call the Webview
> > and TextView in the getView() of the adapter.
>
> >   Gallery g = (Gallery) findViewById(R.id.gallery);
> >                g.setAdapter(new ImageAdapter(this));//calling the Adapter
> > class
> >                g.setAnimationDuration(3000);
> >                g.setOnItemSelectedListener(this);
>
> >    public class ImageAdapter extends BaseAdapter {
> >                 int mGalleryItemBackground;
>
> >                public ImageAdapter(Context c) {
> >                    mContext = c;
>
> >                }
>
> >                public int getCount() {
>
> >                        return mchaptermodel.clip_model.size();
> >                }
>
> >                public Object getItem(int position) {
> >                    return position;
> >                }
>
> >                public long getItemId(int position) {
> >                    return position;
> >                }
>
> >                public View getView(int position, View convertView,
> > ViewGroup
> > parent) {
>
> >                     LayoutInflater
>
> > lInflater=(LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
> >                     convertView = lInflater.inflate(R.layout.item, null,
> > false); //this "item" xml contains  imageview  to be displayed on
> > Gallery
>
> > clipimagename=mchaptermodel.clip_model.get(position).getClipimage(); /
> > *Getting all data from parsed xml */
>
> > cliptitle=mchaptermodel.clip_model.get(position).getClipTitle();//for
> > textview
>
> > cliptext=mchaptermodel.clip_model.get(position).getClipText();//for
> > webview
>
> >                     try {
>
> > clipimagename=clipimagename.replaceAll(".png","");
> >                                     galleryimage=
> > getResources().getIdentifier(clipimagename,"drawable",package_name);
>
> >                        } catch (Exception e) {
> >                                Log.i("Drawing Image...","" );
> >                        }
>
> >                     ImageView i=
> > (ImageView)convertView.findViewById(R.id.imageview);
>
> > i.setImageResource(galleryimage) ;                                       //
> > setting the image on Gallery
> >                     i.setAdjustViewBounds(true);
> >                     i.setScaleType(ScaleType.FIT_CENTER);
>
> > /*The TextView and Webview defined below has to be changed when the
> > Gallery is scrolled which is working fine but as i said i want the
> > image in Gallery which comes in center its data should be displayed on
> > TextView and Webview and not the corner item visible*/
>
> >                   TextView tv1=(TextView)findViewById(R.id.title);
> >                  tv1.setTextSize(16);
> >                  tv1.setText(cliptitle);
> >                  tv1.setTextColor(Color.BLACK);
>
> >               WebView chap_description = (WebView)
> > findViewById(R.id.webview);
> >              chap_description.loadDataWithBaseURL("file:///
> > android_asset/demonew.html",String.format(htmlContent,cliptext),"text/
> > html", "utf8", "");
>
> >                    return convertView;
> >                 }
> > }
>
> > On Feb 28, 10:09 pm, Justin Anderson  wrote:
> > > Well... what does your code look like?
>
> > > On Sun, Feb 27, 2011 at 10:32 PM, monty  wrote:
> > > > Hi
> > > >  I am developing an application where i need to achieive coverflow
> > > > animation using android Gallery.When i scroll the Gallery i need to
> > > > display the data of the middle item in the Gallery in a TextView.
> > > > But instead when i scroll and stop the Gallery ,the TextView prints
> > &g

[android-developers] Re: Try to implement coverflow animation using Gallery

2011-02-28 Thread monty
Hi,
Following is part of code from the Activity.Hope the code will be
clear enough for you to understand.Please let me know how to resolve
this issue.It would be really helpful.

 setContentView(R.layout.chapter_clips);

//will have Gallery,WebView and TextView.The WebView and  TextView
data has to be changed when i scroll the Gallery,so i call the Webview
and TextView in the getView() of the adapter.


   Gallery g = (Gallery) findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));//calling the Adapter
class
g.setAnimationDuration(3000);
g.setOnItemSelectedListener(this);

public class ImageAdapter extends BaseAdapter {
 int mGalleryItemBackground;

public ImageAdapter(Context c) {
mContext = c;

}

public int getCount() {

return mchaptermodel.clip_model.size();
}

public Object getItem(int position) {
return position;
}

public long getItemId(int position) {
return position;
}

public View getView(int position, View convertView, ViewGroup
parent) {

 LayoutInflater
lInflater=(LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 convertView = lInflater.inflate(R.layout.item, null,
false); //this "item" xml contains  imageview  to be displayed on
Gallery

 
clipimagename=mchaptermodel.clip_model.get(position).getClipimage(); /
*Getting all data from parsed xml */
 
cliptitle=mchaptermodel.clip_model.get(position).getClipTitle();//for
textview
 
cliptext=mchaptermodel.clip_model.get(position).getClipText();//for
webview


 try {
 
clipimagename=clipimagename.replaceAll(".png","");
 galleryimage=
getResources().getIdentifier(clipimagename,"drawable",package_name);

} catch (Exception e) {
Log.i("Drawing Image...","" );
}

 ImageView i=
(ImageView)convertView.findViewById(R.id.imageview);
 
i.setImageResource(galleryimage) ;   //
setting the image on Gallery
 i.setAdjustViewBounds(true);
 i.setScaleType(ScaleType.FIT_CENTER);

/*The TextView and Webview defined below has to be changed when the
Gallery is scrolled which is working fine but as i said i want the
image in Gallery which comes in center its data should be displayed on
TextView and Webview and not the corner item visible*/

   TextView tv1=(TextView)findViewById(R.id.title);
  tv1.setTextSize(16);
  tv1.setText(cliptitle);
  tv1.setTextColor(Color.BLACK);

   WebView chap_description = (WebView)
findViewById(R.id.webview);
  chap_description.loadDataWithBaseURL("file:///
android_asset/demonew.html",String.format(htmlContent,cliptext),"text/
html", "utf8", "");

return convertView;
}
}

On Feb 28, 10:09 pm, Justin Anderson  wrote:
> Well... what does your code look like?
>
> On Sun, Feb 27, 2011 at 10:32 PM, monty  wrote:
> > Hi
> >  I am developing an application where i need to achieive coverflow
> > animation using android Gallery.When i scroll the Gallery i need to
> > display the data of the middle item in the Gallery in a TextView.
> > But instead when i scroll and stop the Gallery ,the TextView prints
> > the last item of Gallery  visible on the device .and not the middle
> > one.
> > How do i acheive this?Do i need to write some logic or will it work
> > with some APIs?i hope i am clear with the query.Could any1 giv a
> > solution?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Issue with Encryption/Decryption block by block of data

2011-02-28 Thread monty
Hi
 I am developing an application where i need to download videos from
server which are encrypted.As i am dowloading i am reading a block of
1024 bytes and trying to decrypt that block of data.In this way i am
reading and decrypting chunk by chunk.

 For this i am using " AES/CBC/PKCS5Padding " algorithm.The issue is
after decrypting the size of video is more than the required size.i.e
If original video is 16 MB then decrypted video is 16.1 MB ..so some
extra bytes get added and hence when we try to play the video it does
play.
I guess the video is corrupted bcoz of extra bytes.Is it to do with
the "padding" concept for encryption/decryption.

I DO NOT need to download the the entire encrypted video and write it
to a file.and then pass that file for decryption.
Rather i need to decrypt chunk by chunk of data.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Try to implement coverflow animation using Gallery

2011-02-27 Thread monty
Hi
  I am developing an application where i need to achieive coverflow
animation using android Gallery.When i scroll the Gallery i need to
display the data of the middle item in the Gallery in a TextView.
But instead when i scroll and stop the Gallery ,the TextView prints
the last item of Gallery  visible on the device .and not the middle
one.
How do i acheive this?Do i need to write some logic or will it work
with some APIs?i hope i am clear with the query.Could any1 giv a
solution?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to Obfuscate android application using Proguard

2010-10-25 Thread monty
Hi All
Could anyone give me a detail procedure of how to obfuscate
android application using ProGuard.I tried the procedure in "http://
android-developers.blogspot.com/2010/09/proguard-android-and-licensing-
server.html" but it did not work.There is no error but when i try n
check if code is obfuscated it shows the original code itself.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Cannot install apk of huge size

2010-09-29 Thread monty
Hi everyone
  I have an issue with installing an apk of size 72 MB onto
devices like Samsung Galaxy i7500 and Nexus One .The entire size of
the application is 256 MB.The devices have enough memory say 600MB on
samsung galaxy.But still it does not install saying there is
insufficient storage.
   Do the apk file gets uncompressed to the size of application after
installing.I mean if i am installing this 72 MB apk does it take 256
MB space of apllication.Does it work somewhat like a .zip file?
   Please give me a solution as to why even after having enough memory
i cant install the apk?

Thanks
Neil

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] VideoView does not display on entire display of android devices

2010-09-29 Thread monty
Hi everyone
   I have an issue with displaying videos on android devices.When any
video is displayed it does not take the entire screen size of device
even though i have given android:layout_width="fill_parent".There will
being some blank space on either sides.for eg.if i have a video of 480
by 320 it will work on 480 by 320 device fine but  on a  device like
say Nexus one  it wont take the entire display of device ,there will
be some blanl spaces on two sides.

  Is this a default feature of android devices or is there a solution
to resolve this ?Why does not the "fill_parent" attribute work?

thanks
neil

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to get selected text from EditView and color it

2010-07-09 Thread monty
hey everyone
   Culd any1 please tell me how to get the selected text from a from
EditView .I am using getStartSelection and getEndSelction method to
get the start and end position.But after that how do i get the text
and where do i store it and then change its color.

Monty

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to load html file embedded with javascript using WebView

2010-03-29 Thread monty
Culd any1 plz tell How to load a html file embedded with javascript
using WebView .I m not able to display the image in ythe html usin
WebView.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] how to set a word in a TextView clickable

2010-01-27 Thread monty
culd any1 plz tell me how to set a particular text in a TextView as
clickable and not the entire text in TextView.At present
"clickable=true" works for entire textview and not a particular text
in textview.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] GPS co-ordiantes zero

2010-01-26 Thread monty
Could ny1 plz tell y i get GPS locations as zero values in device but
works fine in emulator.any solution?it wuld b helpful

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re:Call Forwarding

2010-01-22 Thread monty
hey mike
thanks for the info i wil got thru the onCallForwardingIndicatorChanged
(boolean cfi) methos.Actualy i want to automaticaaly forward the call
thru my application and not use the Call divert settings option
available on phone.Can i use the codes and embed it with my
application and use the Intent .action.CALL_PHONE or
Intent .action.CALL_DIAL  or has it to be activated evrytime thru
phone.
Could u plz guide me on tat?Also is it possible to hide incoming call
screen and bring activity to front.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Call forwarding

2010-01-22 Thread monty
is it possible to do call forwarding in android?plz give a solution

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Sender /Receiver name in sms

2010-01-12 Thread monty
how to get the senders or receivers name from a sms in without using
content providers.At present i get only phone number
culd any1 plz tell me a solution?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Remote phone state notifications on outgoing calls

2010-01-05 Thread monty

hey
 how do i receive a remotes phone state notification when i make an
outgoing call ..so that i know if he has accepted the call or has
rejected it(Basically i m tryin to monitor outgoing calls as it is
made).This is so that i can get the call duration bet the 2 phones.I m
trying to use sdk 1.6 but finding no solution except for receiving
state of idle,off hook and ringing of phone.Could any1 plz post a
solution or give an idea as to if its possible or not?

Also could any1 tell as to does any sdk support
com.android.internal.telephony package.Its not thr in 1.6 but i
checked i found sum java docs but when tried using them it gives
error.Its urgent so plz do post as early as possible.

neil



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en