Re: [android-developers] Re: Problems with Custom Image View

2013-09-15 Thread Subin Sebastian
@Piren,
The xml for the row is as below. Please take a look.

http://schemas.android.com/apk/res/android";
android:id="@+id/rl_root"

android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp" >






















I will also send the bordered screenshot soon.


On Sun, Sep 15, 2013 at 11:53 AM, Piren  wrote:

> How did you define the xml for the row item?
> It would also be helpful if you turn on the developer option to show
> layout borders and provide another screen cap
>
>
> On Sunday, September 15, 2013 6:06:54 AM UTC+3, Napster wrote:
>
>> The paste is in here : 
>> http://paste.ubuntu.com/**6108587/
>> And here is a screenshot of the current output.
>>
>> [image: Inline image 1]
>>
>>
>> On Sun, Sep 15, 2013 at 8:30 AM, Subin Sebastian wrote:
>>
>>> Hello Group,
>>>
>>> I have created a custom ImageView to show icons in my list view items.
>>> The idea is to show, perfectly square icons with each list view items. The
>>> following is the code fragments I have.
>>>
>>> public class IconView extends ImageView {
>>>
>>> public IconView(Context context, AttributeSet attrs, int defStyle) {
>>> super(context, attrs, defStyle);
>>> }
>>>
>>> @Override
>>> protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
>>> super.onMeasure(widthMeasureSp**ec, heightMeasureSpec);
>>> int height = getMeasuredHeight();
>>> setMeasuredDimension(height, height);
>>> }}
>>>
>>>
>>> and the XML is,
>>>
>>> >> android:id="@+id/iv_order_**status"
>>> android:layout_width="wrap_**content"
>>> android:layout_height="fill_**parent"
>>> android:layout_marginRight="**10dp"
>>> android:background="#567567"
>>> android:src="@drawable/ic_**launcher" />
>>>
>>>
>>> The problem with this approach is that, the rest of the views in the
>>> list cell, goes out of display partially. I tried to invalidate() the
>>> "convertView" in my adapter's getView() method, but it does not seem to
>>> work. How to solve this problem?
>>>
>>> --
>>> Thanks & Regards
>>> --
>>> Subin Sebastian
>>> http://in.linkedin.com/in/**subinsebastien
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>> --
>> Subin Sebastian
>> www.nintriva.com
>> http://subinsebastien.tumblr.**com 
>> http://in.linkedin.com/in/**subinsebastien
>> http://plus.google.com/subin
>> http://facebook.com/**subinsebastien 
>>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Thanks & Regards
--
Subin Sebastian
www.nintriva.com
http://subinsebastien.tumblr.com
http://in.linkedin.com/in/subinsebastien
http://plus.google.com/subin 
http://facebook.com/subinsebastien

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Hand Green
Thank you a lot!
Just setting setRetainInstance(true) in DialogFragment is not enough. The
dialog just disappears after rotation.
I happen to find a thread:
http://stackoverflow.com/questions/8235080/fragments-dialogfragment-and-screen-rotation
In addition to setRetainInstance(true), we should override

@Override
public void onDestroyView() {
  if (getDialog() != null && getRetainInstance())
getDialog().setOnDismissListener(null);
  super.onDestroyView();
}

and it works!

However, it is very strange that "IllegalStateException: Can't retain
fragements that are nested in other fragments" does not occur.
ProgressDialog fragment is in fragmentA. It is nested.


2013/9/15 Piren 

> err, actually i've also missed something and read the stacktrace
> incorrectly. Only now i've noticed the NPE was actually in the framework
> code...
> If you didn't already, add SetRetainInstance to the DialogFragment as well
> (in its onCreate, not onCreateDialog).
> as a last resort you can always override onDismiss and avoid calling the
> base class (you should probably still call the Fragment.Dissmiss method and
> handle the BackStack on your own)
>
>
>
>
> On Sunday, September 15, 2013 3:25:41 PM UTC+3, Greenhand wrote:
>>
>> Yes. I am pretty sorry for my carelessness when extracting the related
>> code snippets.
>> new MyAsyncTask.execute() should be new MyAsyncTask(this).execute().
>>
>> As for the MyAsyncTask:
>>
>> public class MyAsyncTask extends AsyncTask{ //do network
>> operation
>>  private Fragment*A* fragment;
>>
>>  public MyAsyncTask(Fragment*A* fragmentA){
>>   fragment = fragmentA;
>>  }
>> If there is any mistake, please feel free to correct me.
>>
>>
>> Piren於 2013年9月15日星期日UTC+**8下午8時08分31秒寫道:
>>
>>> and did you use that constructor? because the code snippet shows you've
>>> used the default constructor
>>>
>>> On Sunday, September 15, 2013 1:52:22 PM UTC+3, Greenhand wrote:

 Thanks for pointing out the mistakes. The whole code is too long to
 post and maintain readability so I just put some snippet. The "MyAsyncTask
  having a constructor named GetTokenAsyncTask" is  a typo, the constructor
 should named MyAsyncTask.
 As for ProgressFragment, I use its toString() method to check using
 Log.d(). They are the same across rotation.



 2013/9/15 Piren 

> It's hard to follow your code since it seems some of it is incorrect
> (like  MyAsyncTask   having a constructor named GetTokenAsyncTask) and 
> some
> of it is missing...
> Either way you should verify you actually used that constructor (in
> the current code you don't, so the member "fragment" is null).Either case,
> you should also verify that the proper ProgressFragment is being set 
> during
> onAttach of FragmentA since i assume a new one will be created after
> rotation (though i'm not sure about that).
>
> Since this isn't that much code, you should probably just find a
> tutorial on how to do that (there's a lot of those online) and start from
> scratch (just so you wouldn't miss something)
>
> On Sunday, September 15, 2013 1:30:20 PM UTC+3, Greenhand wrote:
>>
>> I use appcompat library to host some fragments for tabs. In a
>> specific fragment A, I need to do network operation. In order not to 
>> block
>> the UI thread, I use an AsyncTask and do the network operation in
>> doInBackGround().
>>
>> To prevent messing around keep AsyncTask to survive rotation in the
>> fragment, I call setRetainInstance(true) in the fragment A oncreate().
>>
>> It works fine but I need to prompt user something when the network
>> operation is in progress. Therefore, I use DialogFragment. In the
>> DialogFragment onCreateView(), it instantiates a ProgressDialog and 
>> returns.
>>
>> To be concrete, the following is the code snippets of FragmentA,
>> MyDialogFragment and AsyncTask :
>> public class FragmentA extends Fragment{ //as tab for actionbar
>> (appcompat)
>>  private boolean isNetworkOperationCalled;
>>  private MyDialogFragment myDialogFragment;
>>  ...
>>  public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
>>   myDialogFragment = new MyDialogFragment();
>>   myDialogFragment.show(**getFra**gmentManager(), "mydialog");
>>  }
>>  public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
>>   myDialogFragment.dismiss();
>>  }
>>  public void onResume() {
>>   if(!**isNetworkOperationCalled**){
>>isNetworkOperationCalled=true;
>>new MyAsyncTask.execute();//do the network operation
>>   }
>>  }
>>  ...
>> }
>>
>>
>> public class MyDialogFragment extends DialogFragment{
>> //ProgressDialog for FragmentA
>>  ...
>>  public Dialog onCreateDialog(Bundle savedInstanceState) {
>>   ProgressDialog progressDialog = new ProgressDialog(getActivity(),**

Re: [android-developers] Re: How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Piren
err, actually i've also missed something and read the stacktrace 
incorrectly. Only now i've noticed the NPE was actually in the framework 
code...
If you didn't already, add SetRetainInstance to the DialogFragment as well 
(in its onCreate, not onCreateDialog).
as a last resort you can always override onDismiss and avoid calling the 
base class (you should probably still call the Fragment.Dissmiss method and 
handle the BackStack on your own)




On Sunday, September 15, 2013 3:25:41 PM UTC+3, Greenhand wrote:
>
> Yes. I am pretty sorry for my carelessness when extracting the related 
> code snippets.
> new MyAsyncTask.execute() should be new MyAsyncTask(this).execute(). 
>  
> As for the MyAsyncTask:
>  
> public class MyAsyncTask extends AsyncTask{ //do network 
> operation
>  private Fragment*A* fragment;
>
>  public MyAsyncTask(Fragment*A* fragmentA){
>   fragment = fragmentA;
>  }
> If there is any mistake, please feel free to correct me.
>  
>
> Piren於 2013年9月15日星期日UTC+8下午8時08分31秒寫道:
>
>> and did you use that constructor? because the code snippet shows you've 
>> used the default constructor
>>
>> On Sunday, September 15, 2013 1:52:22 PM UTC+3, Greenhand wrote:
>>>
>>> Thanks for pointing out the mistakes. The whole code is too long to post 
>>> and maintain readability so I just put some snippet. The "MyAsyncTask  
>>>  having a constructor named GetTokenAsyncTask" is  a typo, the constructor 
>>> should named MyAsyncTask.
>>> As for ProgressFragment, I use its toString() method to check using 
>>> Log.d(). They are the same across rotation.
>>>  
>>>
>>>
>>> 2013/9/15 Piren 
>>>
 It's hard to follow your code since it seems some of it is incorrect 
 (like  MyAsyncTask   having a constructor named GetTokenAsyncTask) and 
 some 
 of it is missing...
 Either way you should verify you actually used that constructor (in the 
 current code you don't, so the member "fragment" is null).Either case, you 
 should also verify that the proper ProgressFragment is being set during 
 onAttach of FragmentA since i assume a new one will be created after 
 rotation (though i'm not sure about that).

 Since this isn't that much code, you should probably just find a 
 tutorial on how to do that (there's a lot of those online) and start from 
 scratch (just so you wouldn't miss something)

 On Sunday, September 15, 2013 1:30:20 PM UTC+3, Greenhand wrote:
>
> I use appcompat library to host some fragments for tabs. In a specific 
> fragment A, I need to do network operation. In order not to block the UI 
> thread, I use an AsyncTask and do the network operation in 
> doInBackGround(). 
>
> To prevent messing around keep AsyncTask to survive rotation in the 
> fragment, I call setRetainInstance(true) in the fragment A oncreate().
>
> It works fine but I need to prompt user something when the network 
> operation is in progress. Therefore, I use DialogFragment. In the 
> DialogFragment onCreateView(), it instantiates a ProgressDialog and 
> returns.
>
> To be concrete, the following is the code snippets of FragmentA, 
> MyDialogFragment and AsyncTask :
> public class FragmentA extends Fragment{ //as tab for actionbar 
> (appcompat)
>  private boolean isNetworkOperationCalled;
>  private MyDialogFragment myDialogFragment;
>  ...
>  public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
>   myDialogFragment = new MyDialogFragment();
>   myDialogFragment.show(**getFragmentManager(), "mydialog");
>  }
>  public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
>   myDialogFragment.dismiss(); 
>  }
>  public void onResume() {
>   if(!**isNetworkOperationCalled){
>isNetworkOperationCalled=true;
>new MyAsyncTask.execute();//do the network operation
>   }
>  }
>  ...
> }
>
>
> public class MyDialogFragment extends DialogFragment{ //ProgressDialog 
> for FragmentA
>  ...
>  public Dialog onCreateDialog(Bundle savedInstanceState) {
>   ProgressDialog progressDialog = new ProgressDialog(getActivity(),**
> ProgressDialog.STYLE_SPINNER);
>   ... //set the dialog attributes
>   return progressDialog;
>  }
>  ...
> }
> public class MyAsyncTask extends AsyncTask{ //do 
> network operation
>  private Fragment fragment;
>
>  public GetTokenAsyncTask(Fragment fragmentA){
>   fragment = fragmentA;
>  }
>  protected void onPreExecute() {
>   fragment.showProgressDialog(**); //show progess dialog for users
>  }
>  protected String doInBackground(Void... arg0) {
>   ...
>  }
>  protected void onPostExecute() { //dismiss the dialog
>   fragment.**dismissProgressDialog();
>  }
> }
> In a nutshell, fragment A triggers AsyncTask and AsyncTask call 
> methods of FragmentA to show/dismiss dial

Re: [android-developers] Re: How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Greenhand
Yes. I am pretty sorry for my carelessness when extracting the related code 
snippets.
new MyAsyncTask.execute() should be new MyAsyncTask(this).execute(). 
 
As for the MyAsyncTask:
 
public class MyAsyncTask extends AsyncTask{ //do network 
operation
 private Fragment*A* fragment;

 public MyAsyncTask(Fragment*A* fragmentA){
  fragment = fragmentA;
 }
If there is any mistake, please feel free to correct me.
 

Piren於 2013年9月15日星期日UTC+8下午8時08分31秒寫道:

> and did you use that constructor? because the code snippet shows you've 
> used the default constructor
>
> On Sunday, September 15, 2013 1:52:22 PM UTC+3, Greenhand wrote:
>>
>> Thanks for pointing out the mistakes. The whole code is too long to post 
>> and maintain readability so I just put some snippet. The "MyAsyncTask  
>>  having a constructor named GetTokenAsyncTask" is  a typo, the constructor 
>> should named MyAsyncTask.
>> As for ProgressFragment, I use its toString() method to check using 
>> Log.d(). They are the same across rotation.
>>  
>>
>>
>> 2013/9/15 Piren 
>>
>>> It's hard to follow your code since it seems some of it is incorrect 
>>> (like  MyAsyncTask   having a constructor named GetTokenAsyncTask) and some 
>>> of it is missing...
>>> Either way you should verify you actually used that constructor (in the 
>>> current code you don't, so the member "fragment" is null).Either case, you 
>>> should also verify that the proper ProgressFragment is being set during 
>>> onAttach of FragmentA since i assume a new one will be created after 
>>> rotation (though i'm not sure about that).
>>>
>>> Since this isn't that much code, you should probably just find a 
>>> tutorial on how to do that (there's a lot of those online) and start from 
>>> scratch (just so you wouldn't miss something)
>>>
>>> On Sunday, September 15, 2013 1:30:20 PM UTC+3, Greenhand wrote:

 I use appcompat library to host some fragments for tabs. In a specific 
 fragment A, I need to do network operation. In order not to block the UI 
 thread, I use an AsyncTask and do the network operation in 
 doInBackGround(). 

 To prevent messing around keep AsyncTask to survive rotation in the 
 fragment, I call setRetainInstance(true) in the fragment A oncreate().

 It works fine but I need to prompt user something when the network 
 operation is in progress. Therefore, I use DialogFragment. In the 
 DialogFragment onCreateView(), it instantiates a ProgressDialog and 
 returns.

 To be concrete, the following is the code snippets of FragmentA, 
 MyDialogFragment and AsyncTask :
 public class FragmentA extends Fragment{ //as tab for actionbar 
 (appcompat)
  private boolean isNetworkOperationCalled;
  private MyDialogFragment myDialogFragment;
  ...
  public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
   myDialogFragment = new MyDialogFragment();
   myDialogFragment.show(**getFragmentManager(), "mydialog");
  }
  public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
   myDialogFragment.dismiss(); 
  }
  public void onResume() {
   if(!**isNetworkOperationCalled){
isNetworkOperationCalled=true;
new MyAsyncTask.execute();//do the network operation
   }
  }
  ...
 }


 public class MyDialogFragment extends DialogFragment{ //ProgressDialog 
 for FragmentA
  ...
  public Dialog onCreateDialog(Bundle savedInstanceState) {
   ProgressDialog progressDialog = new ProgressDialog(getActivity(),**
 ProgressDialog.STYLE_SPINNER);
   ... //set the dialog attributes
   return progressDialog;
  }
  ...
 }
 public class MyAsyncTask extends AsyncTask{ //do 
 network operation
  private Fragment fragment;

  public GetTokenAsyncTask(Fragment fragmentA){
   fragment = fragmentA;
  }
  protected void onPreExecute() {
   fragment.showProgressDialog(**); //show progess dialog for users
  }
  protected String doInBackground(Void... arg0) {
   ...
  }
  protected void onPostExecute() { //dismiss the dialog
   fragment.**dismissProgressDialog();
  }
 }
 In a nutshell, fragment A triggers AsyncTask and AsyncTask call methods 
 of FragmentA to show/dismiss dialog. Fragment A use MyDialogFragment to 
 show the progress dialog.

 The code (method) above works if there is no rotataion occurs while 
 doInBackground() is executing. Nevertheless, if the rotation happens 
 before 
 onPostExecute() is called, 
 the rotation is fine and the progress dialog is retained. Sadly, it 
 crashes when onPostExecute() finally be called when dismissing the dialog.

 E/AndroidRuntime(27493): FATAL EXCEPTION: main
 E/AndroidRuntime(27493): java.lang.NullPointerException
 E/AndroidRuntime(27493):  at android.support.v4.app.**DialogFragment.**
 dismissInternal(**DialogFragmen

Re: [android-developers] Re: How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Piren
and did you use that constructor? because the code snippet shows you've 
used the default constructor

On Sunday, September 15, 2013 1:52:22 PM UTC+3, Greenhand wrote:
>
> Thanks for pointing out the mistakes. The whole code is too long to post 
> and maintain readability so I just put some snippet. The "MyAsyncTask  
>  having a constructor named GetTokenAsyncTask" is  a typo, the constructor 
> should named MyAsyncTask.
> As for ProgressFragment, I use its toString() method to check using 
> Log.d(). They are the same across rotation.
>  
>
>
> 2013/9/15 Piren >
>
>> It's hard to follow your code since it seems some of it is incorrect 
>> (like  MyAsyncTask   having a constructor named GetTokenAsyncTask) and some 
>> of it is missing...
>> Either way you should verify you actually used that constructor (in the 
>> current code you don't, so the member "fragment" is null).Either case, you 
>> should also verify that the proper ProgressFragment is being set during 
>> onAttach of FragmentA since i assume a new one will be created after 
>> rotation (though i'm not sure about that).
>>
>> Since this isn't that much code, you should probably just find a tutorial 
>> on how to do that (there's a lot of those online) and start from scratch 
>> (just so you wouldn't miss something)
>>
>> On Sunday, September 15, 2013 1:30:20 PM UTC+3, Greenhand wrote:
>>>
>>> I use appcompat library to host some fragments for tabs. In a specific 
>>> fragment A, I need to do network operation. In order not to block the UI 
>>> thread, I use an AsyncTask and do the network operation in 
>>> doInBackGround(). 
>>>
>>> To prevent messing around keep AsyncTask to survive rotation in the 
>>> fragment, I call setRetainInstance(true) in the fragment A oncreate().
>>>
>>> It works fine but I need to prompt user something when the network 
>>> operation is in progress. Therefore, I use DialogFragment. In the 
>>> DialogFragment onCreateView(), it instantiates a ProgressDialog and returns.
>>>
>>> To be concrete, the following is the code snippets of FragmentA, 
>>> MyDialogFragment and AsyncTask :
>>> public class FragmentA extends Fragment{ //as tab for actionbar 
>>> (appcompat)
>>>  private boolean isNetworkOperationCalled;
>>>  private MyDialogFragment myDialogFragment;
>>>  ...
>>>  public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
>>>   myDialogFragment = new MyDialogFragment();
>>>   myDialogFragment.show(**getFragmentManager(), "mydialog");
>>>  }
>>>  public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
>>>   myDialogFragment.dismiss(); 
>>>  }
>>>  public void onResume() {
>>>   if(!**isNetworkOperationCalled){
>>>isNetworkOperationCalled=true;
>>>new MyAsyncTask.execute();//do the network operation
>>>   }
>>>  }
>>>  ...
>>> }
>>>
>>>
>>> public class MyDialogFragment extends DialogFragment{ //ProgressDialog 
>>> for FragmentA
>>>  ...
>>>  public Dialog onCreateDialog(Bundle savedInstanceState) {
>>>   ProgressDialog progressDialog = new ProgressDialog(getActivity(),**
>>> ProgressDialog.STYLE_SPINNER);
>>>   ... //set the dialog attributes
>>>   return progressDialog;
>>>  }
>>>  ...
>>> }
>>> public class MyAsyncTask extends AsyncTask{ //do network 
>>> operation
>>>  private Fragment fragment;
>>>
>>>  public GetTokenAsyncTask(Fragment fragmentA){
>>>   fragment = fragmentA;
>>>  }
>>>  protected void onPreExecute() {
>>>   fragment.showProgressDialog(**); //show progess dialog for users
>>>  }
>>>  protected String doInBackground(Void... arg0) {
>>>   ...
>>>  }
>>>  protected void onPostExecute() { //dismiss the dialog
>>>   fragment.**dismissProgressDialog();
>>>  }
>>> }
>>> In a nutshell, fragment A triggers AsyncTask and AsyncTask call methods 
>>> of FragmentA to show/dismiss dialog. Fragment A use MyDialogFragment to 
>>> show the progress dialog.
>>>
>>> The code (method) above works if there is no rotataion occurs while 
>>> doInBackground() is executing. Nevertheless, if the rotation happens before 
>>> onPostExecute() is called, 
>>> the rotation is fine and the progress dialog is retained. Sadly, it 
>>> crashes when onPostExecute() finally be called when dismissing the dialog.
>>>
>>> E/AndroidRuntime(27493): FATAL EXCEPTION: main
>>> E/AndroidRuntime(27493): java.lang.NullPointerException
>>> E/AndroidRuntime(27493):  at android.support.v4.app.**DialogFragment.**
>>> dismissInternal(**DialogFragment.java:184)
>>> E/AndroidRuntime(27493):  at android.support.v4.app.**
>>> DialogFragment.dismiss(**DialogFragment.java:155)
>>> E/AndroidRuntime(27493):  at com.example.FragmentA.**
>>> dismissProgressDialog(**FragmentA.java:105)
>>> E/AndroidRuntime(27493):  at com.example.FragmentA.access$**
>>> 1(FragmentA.java:103)
>>> E/AndroidRuntime(27493):  at com.example.FragmentA$**GetTokenAsyncTask.*
>>> *onPostExecute(FragmentA.java:**40)
>>> E/AndroidRuntime(27493):  at com.example.FragmentA$**GetTokenAsyncTask.*
>>> *onPostExecute(FragmentA.java:**1)
>>> E/AndroidRuntime(274

[android-developers] Re: No recovery.fstab found

2013-09-15 Thread RichardC
AOSP groups are here:
http://source.android.com/source/community/index.html

This group is for developing applications that run on the Android Platform

On Saturday, September 14, 2013 6:30:38 PM UTC+1, dino omanovic wrote:
>
> This is my first build from source. I got so far to this step:
>
>  make otapackage
> 
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=4.3
> TARGET_PRODUCT=full_haida
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_BUILD_APPS=
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv7-a-neon
> TARGET_CPU_VARIANT=krait
> HOST_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-3.11.0-1-ARCH-x86_64-with-glibc2.2.5
> HOST_BUILD_TYPE=release
> BUILD_ID=JSS15Q
> OUT_DIR=out
> 
> Checking build tools versions...
> hardware/ti/wlan/mac80211/wpa_supplicant_lib/Android.mk:15: 
> /android.config: Datei oder Verzeichnis nicht gefunden
> No private recovery resources for TARGET_DEVICE haida
> No recovery.fstab for TARGET_DEVICE haida
> make: *** Keine Regel, um »/android.config« zu erstellen.  Schluss.
>
> So, why I am getting this error? In device/ I have these folders according 
> to legacyxperia.github.io where I got all blobs and drivers: haida 
> mogami-common and msm7x30-common. In kernel/ I have msm7x30-3.4.x-nAa. In 
> .repo/local_manifest/local_manifest.xml. In vendor/semc I have all blobs. 
> How can I fix this?
> Thanks in advance.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Hand Green
Thanks for pointing out the mistakes. The whole code is too long to post
and maintain readability so I just put some snippet. The "MyAsyncTask
 having a constructor named GetTokenAsyncTask" is  a typo, the constructor
should named MyAsyncTask.
As for ProgressFragment, I use its toString() method to check using
Log.d(). They are the same across rotation.



2013/9/15 Piren 

> It's hard to follow your code since it seems some of it is incorrect
> (like  MyAsyncTask   having a constructor named GetTokenAsyncTask) and some
> of it is missing...
> Either way you should verify you actually used that constructor (in the
> current code you don't, so the member "fragment" is null).Either case, you
> should also verify that the proper ProgressFragment is being set during
> onAttach of FragmentA since i assume a new one will be created after
> rotation (though i'm not sure about that).
>
> Since this isn't that much code, you should probably just find a tutorial
> on how to do that (there's a lot of those online) and start from scratch
> (just so you wouldn't miss something)
>
> On Sunday, September 15, 2013 1:30:20 PM UTC+3, Greenhand wrote:
>>
>> I use appcompat library to host some fragments for tabs. In a specific
>> fragment A, I need to do network operation. In order not to block the UI
>> thread, I use an AsyncTask and do the network operation in
>> doInBackGround().
>>
>> To prevent messing around keep AsyncTask to survive rotation in the
>> fragment, I call setRetainInstance(true) in the fragment A oncreate().
>>
>> It works fine but I need to prompt user something when the network
>> operation is in progress. Therefore, I use DialogFragment. In the
>> DialogFragment onCreateView(), it instantiates a ProgressDialog and returns.
>>
>> To be concrete, the following is the code snippets of FragmentA,
>> MyDialogFragment and AsyncTask :
>> public class FragmentA extends Fragment{ //as tab for actionbar
>> (appcompat)
>>  private boolean isNetworkOperationCalled;
>>  private MyDialogFragment myDialogFragment;
>>  ...
>>  public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
>>   myDialogFragment = new MyDialogFragment();
>>   myDialogFragment.show(**getFragmentManager(), "mydialog");
>>  }
>>  public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
>>   myDialogFragment.dismiss();
>>  }
>>  public void onResume() {
>>   if(!**isNetworkOperationCalled){
>>isNetworkOperationCalled=true;
>>new MyAsyncTask.execute();//do the network operation
>>   }
>>  }
>>  ...
>> }
>>
>>
>> public class MyDialogFragment extends DialogFragment{ //ProgressDialog
>> for FragmentA
>>  ...
>>  public Dialog onCreateDialog(Bundle savedInstanceState) {
>>   ProgressDialog progressDialog = new ProgressDialog(getActivity(),**
>> ProgressDialog.STYLE_SPINNER);
>>   ... //set the dialog attributes
>>   return progressDialog;
>>  }
>>  ...
>> }
>> public class MyAsyncTask extends AsyncTask{ //do network
>> operation
>>  private Fragment fragment;
>>
>>  public GetTokenAsyncTask(Fragment fragmentA){
>>   fragment = fragmentA;
>>  }
>>  protected void onPreExecute() {
>>   fragment.showProgressDialog(**); //show progess dialog for users
>>  }
>>  protected String doInBackground(Void... arg0) {
>>   ...
>>  }
>>  protected void onPostExecute() { //dismiss the dialog
>>   fragment.**dismissProgressDialog();
>>  }
>> }
>> In a nutshell, fragment A triggers AsyncTask and AsyncTask call methods
>> of FragmentA to show/dismiss dialog. Fragment A use MyDialogFragment to
>> show the progress dialog.
>>
>> The code (method) above works if there is no rotataion occurs while
>> doInBackground() is executing. Nevertheless, if the rotation happens before
>> onPostExecute() is called,
>> the rotation is fine and the progress dialog is retained. Sadly, it
>> crashes when onPostExecute() finally be called when dismissing the dialog.
>>
>> E/AndroidRuntime(27493): FATAL EXCEPTION: main
>> E/AndroidRuntime(27493): java.lang.NullPointerException
>> E/AndroidRuntime(27493):  at android.support.v4.app.**DialogFragment.**
>> dismissInternal(**DialogFragment.java:184)
>> E/AndroidRuntime(27493):  at android.support.v4.app.**
>> DialogFragment.dismiss(**DialogFragment.java:155)
>> E/AndroidRuntime(27493):  at com.example.FragmentA.**
>> dismissProgressDialog(**FragmentA.java:105)
>> E/AndroidRuntime(27493):  at com.example.FragmentA.access$**
>> 1(FragmentA.java:103)
>> E/AndroidRuntime(27493):  at com.example.FragmentA$**GetTokenAsyncTask.**
>> onPostExecute(FragmentA.java:**40)
>> E/AndroidRuntime(27493):  at com.example.FragmentA$**GetTokenAsyncTask.**
>> onPostExecute(FragmentA.java:**1)
>> E/AndroidRuntime(27493):  at android.os.AsyncTask.finish(**
>> AsyncTask.java:631)
>> E/AndroidRuntime(27493):  at android.os.AsyncTask.access$**
>> 600(AsyncTask.java:177)
>> E/AndroidRuntime(27493):  at android.os.AsyncTask$**
>> InternalHandler.handleMessage(**AsyncTask.java:644)
>> E/AndroidRuntime(27493):  at android.os.Handler.**
>> dispa

[android-developers] Re: How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Piren
It's hard to follow your code since it seems some of it is incorrect 
(like  MyAsyncTask   having a constructor named GetTokenAsyncTask) and some 
of it is missing...
Either way you should verify you actually used that constructor (in the 
current code you don't, so the member "fragment" is null).Either case, you 
should also verify that the proper ProgressFragment is being set during 
onAttach of FragmentA since i assume a new one will be created after 
rotation (though i'm not sure about that).

Since this isn't that much code, you should probably just find a tutorial 
on how to do that (there's a lot of those online) and start from scratch 
(just so you wouldn't miss something)

On Sunday, September 15, 2013 1:30:20 PM UTC+3, Greenhand wrote:
>
> I use appcompat library to host some fragments for tabs. In a specific 
> fragment A, I need to do network operation. In order not to block the UI 
> thread, I use an AsyncTask and do the network operation in 
> doInBackGround(). 
>
> To prevent messing around keep AsyncTask to survive rotation in the 
> fragment, I call setRetainInstance(true) in the fragment A oncreate().
>
> It works fine but I need to prompt user something when the network 
> operation is in progress. Therefore, I use DialogFragment. In the 
> DialogFragment onCreateView(), it instantiates a ProgressDialog and returns.
>
> To be concrete, the following is the code snippets of FragmentA, 
> MyDialogFragment and AsyncTask :
> public class FragmentA extends Fragment{ //as tab for actionbar (appcompat)
>  private boolean isNetworkOperationCalled;
>  private MyDialogFragment myDialogFragment;
>  ...
>  public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
>   myDialogFragment = new MyDialogFragment();
>   myDialogFragment.show(getFragmentManager(), "mydialog");
>  }
>  public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
>   myDialogFragment.dismiss(); 
>  }
>  public void onResume() {
>   if(!isNetworkOperationCalled){
>isNetworkOperationCalled=true;
>new MyAsyncTask.execute();//do the network operation
>   }
>  }
>  ...
> }
>
>
> public class MyDialogFragment extends DialogFragment{ //ProgressDialog for 
> FragmentA
>  ...
>  public Dialog onCreateDialog(Bundle savedInstanceState) {
>   ProgressDialog progressDialog = new 
> ProgressDialog(getActivity(),ProgressDialog.STYLE_SPINNER);
>   ... //set the dialog attributes
>   return progressDialog;
>  }
>  ...
> }
> public class MyAsyncTask extends AsyncTask{ //do network 
> operation
>  private Fragment fragment;
>
>  public GetTokenAsyncTask(Fragment fragmentA){
>   fragment = fragmentA;
>  }
>  protected void onPreExecute() {
>   fragment.showProgressDialog(); //show progess dialog for users
>  }
>  protected String doInBackground(Void... arg0) {
>   ...
>  }
>  protected void onPostExecute() { //dismiss the dialog
>   fragment.dismissProgressDialog();
>  }
> }
> In a nutshell, fragment A triggers AsyncTask and AsyncTask call methods of 
> FragmentA to show/dismiss dialog. Fragment A use MyDialogFragment to show 
> the progress dialog.
>
> The code (method) above works if there is no rotataion occurs while 
> doInBackground() is executing. Nevertheless, if the rotation happens before 
> onPostExecute() is called, 
> the rotation is fine and the progress dialog is retained. Sadly, it 
> crashes when onPostExecute() finally be called when dismissing the dialog.
>
> E/AndroidRuntime(27493): FATAL EXCEPTION: main
> E/AndroidRuntime(27493): java.lang.NullPointerException
> E/AndroidRuntime(27493):  at 
> android.support.v4.app.DialogFragment.dismissInternal(DialogFragment.java:184)
> E/AndroidRuntime(27493):  at 
> android.support.v4.app.DialogFragment.dismiss(DialogFragment.java:155)
> E/AndroidRuntime(27493):  at 
> com.example.FragmentA.dismissProgressDialog(FragmentA.java:105)
> E/AndroidRuntime(27493):  at 
> com.example.FragmentA.access$1(FragmentA.java:103)
> E/AndroidRuntime(27493):  at 
> com.example.FragmentA$GetTokenAsyncTask.onPostExecute(FragmentA.java:40)
> E/AndroidRuntime(27493):  at 
> com.example.FragmentA$GetTokenAsyncTask.onPostExecute(FragmentA.java:1)
> E/AndroidRuntime(27493):  at 
> android.os.AsyncTask.finish(AsyncTask.java:631)
> E/AndroidRuntime(27493):  at 
> android.os.AsyncTask.access$600(AsyncTask.java:177)
> E/AndroidRuntime(27493):  at 
> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
> E/AndroidRuntime(27493):  at 
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime(27493):  at android.os.Looper.loop(Looper.java:137)
> E/AndroidRuntime(27493):  at 
> android.app.ActivityThread.main(ActivityThread.java:4875)
> E/AndroidRuntime(27493):  at java.lang.reflect.Method.invokeNative(Native 
> Method)
> E/AndroidRuntime(27493):  at 
> java.lang.reflect.Method.invoke(Method.java:511)
> E/AndroidRuntime(27493):  at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:804)
> E/AndroidRuntime(27493):  at 
> com.android.inte

[android-developers] How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Greenhand


I use appcompat library to host some fragments for tabs. In a specific 
fragment A, I need to do network operation. In order not to block the UI 
thread, I use an AsyncTask and do the network operation in 
doInBackGround(). 

To prevent messing around keep AsyncTask to survive rotation in the 
fragment, I call setRetainInstance(true) in the fragment A oncreate().

It works fine but I need to prompt user something when the network 
operation is in progress. Therefore, I use DialogFragment. In the 
DialogFragment onCreateView(), it instantiates a ProgressDialog and returns.

To be concrete, the following is the code snippets of FragmentA, 
MyDialogFragment and AsyncTask :
public class FragmentA extends Fragment{ //as tab for actionbar (appcompat)
 private boolean isNetworkOperationCalled;
 private MyDialogFragment myDialogFragment;
 ...
 public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
  myDialogFragment = new MyDialogFragment();
  myDialogFragment.show(getFragmentManager(), "mydialog");
 }
 public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
  myDialogFragment.dismiss(); 
 }
 public void onResume() {
  if(!isNetworkOperationCalled){
   isNetworkOperationCalled=true;
   new MyAsyncTask.execute();//do the network operation
  }
 }
 ...
}


public class MyDialogFragment extends DialogFragment{ //ProgressDialog for 
FragmentA
 ...
 public Dialog onCreateDialog(Bundle savedInstanceState) {
  ProgressDialog progressDialog = new 
ProgressDialog(getActivity(),ProgressDialog.STYLE_SPINNER);
  ... //set the dialog attributes
  return progressDialog;
 }
 ...
}
public class MyAsyncTask extends AsyncTask{ //do network 
operation
 private Fragment fragment;

 public GetTokenAsyncTask(Fragment fragmentA){
  fragment = fragmentA;
 }
 protected void onPreExecute() {
  fragment.showProgressDialog(); //show progess dialog for users
 }
 protected String doInBackground(Void... arg0) {
  ...
 }
 protected void onPostExecute() { //dismiss the dialog
  fragment.dismissProgressDialog();
 }
}
In a nutshell, fragment A triggers AsyncTask and AsyncTask call methods of 
FragmentA to show/dismiss dialog. Fragment A use MyDialogFragment to show 
the progress dialog.

The code (method) above works if there is no rotataion occurs while 
doInBackground() is executing. Nevertheless, if the rotation happens before 
onPostExecute() is called, 
the rotation is fine and the progress dialog is retained. Sadly, it crashes 
when onPostExecute() finally be called when dismissing the dialog.

E/AndroidRuntime(27493): FATAL EXCEPTION: main
E/AndroidRuntime(27493): java.lang.NullPointerException
E/AndroidRuntime(27493):  at 
android.support.v4.app.DialogFragment.dismissInternal(DialogFragment.java:184)
E/AndroidRuntime(27493):  at 
android.support.v4.app.DialogFragment.dismiss(DialogFragment.java:155)
E/AndroidRuntime(27493):  at 
com.example.FragmentA.dismissProgressDialog(FragmentA.java:105)
E/AndroidRuntime(27493):  at 
com.example.FragmentA.access$1(FragmentA.java:103)
E/AndroidRuntime(27493):  at 
com.example.FragmentA$GetTokenAsyncTask.onPostExecute(FragmentA.java:40)
E/AndroidRuntime(27493):  at 
com.example.FragmentA$GetTokenAsyncTask.onPostExecute(FragmentA.java:1)
E/AndroidRuntime(27493):  at android.os.AsyncTask.finish(AsyncTask.java:631)
E/AndroidRuntime(27493):  at 
android.os.AsyncTask.access$600(AsyncTask.java:177)
E/AndroidRuntime(27493):  at 
android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
E/AndroidRuntime(27493):  at 
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(27493):  at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(27493):  at 
android.app.ActivityThread.main(ActivityThread.java:4875)
E/AndroidRuntime(27493):  at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime(27493):  at 
java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(27493):  at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:804)
E/AndroidRuntime(27493):  at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:571)
E/AndroidRuntime(27493):  at dalvik.system.NativeStart.main(Native Method)

How can I solve the problem so that the dialog can dismiss correctly after 
rotation?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] How to dismiss nested dialogfragment correctly after rotation?

2013-09-15 Thread Greenhand


I use appcompat library and support library v4 to host some fragments for 
tabs. In a specific fragment A, I need to do network operation. In order 
not to block the UI thread, I execute an AsyncTask in fragment A and do the 
network operation in doInBackGround() of the AsyncTask. 

To prevent messing around keep AsyncTask to survive rotation in the 
fragment, I call setRetainInstance(true) in the fragment A oncreate().

It works fine but I need to prompt user something when the network 
operation is in progress. Therefore, I use DialogFragment. In the 
DialogFragment onCreateView(), it instantiates a ProgressDialog and returns.

To be concrete, the following is the FragmentA, MyDialogFragment and 
AsyncTask code snippets:
public class FragmentA extends Fragment{ //as tab for actionbar (appcompat)
 private boolean isNetworkOperationCalled;
 private MyDialogFragment myDialogFragment;
 ...
 public void showProgressDialog(){ //for MyAsyncTask#onPreExecute()
  myDialogFragment = new MyDialogFragment();
  myDialogFragment.show(getFragmentManager(), "mydialog");
 }
 public void showProgressDialog(){ //for MyAsyncTask#onPostExecute()
  myDialogFragment.dismiss(); 
 }
 public void onResume() {
  if(!isNetworkOperationCalled){
   isNetworkOperationCalled=true;
   new MyAsyncTask.execute();//do the network operation
  }
 }
 ...
}


public class MyDialogFragment extends DialogFragment{ //ProgressDialog for 
FragmentA
 ...
 public Dialog onCreateDialog(Bundle savedInstanceState) {
  ProgressDialog progressDialog = new 
ProgressDialog(getActivity(),ProgressDialog.STYLE_SPINNER);
  ... //set the dialog attributes
  return progressDialog;
 }
 ...
}
public class MyAsyncTask extends AsyncTask{ //do network 
operation for fragment A
 private Fragment fragment;
 public GetTokenAsyncTask(Fragment fragmentA){
  fragment = fragmentA;
 }
 protected void onPreExecute() {
  fragment.showProgressDialog(); //show progess dialog for users
 }
 protected String doInBackground(Void... arg0) {
  ...
 }
 protected void onPostExecute() { //dismiss the dialog
  fragment.dismissProgressDialog();
 }
}
 
In a nutshell, fragmentA triggers AsyncTask, AsyncTask calls methods of 
fragmentA to show/dismiss progress dialog (dialog fragment).
 

The code (method) above works if there is no rotataion occurs while 
doInBackground() is executing. Nevertheless, if the rotation happens before 
onPostExecute() is called, 
the rotation is fine and the progress dialog is retained. Sadly, it crashes 
when onPostExecute() finally be called to dismiss the dialog.

E/AndroidRuntime(27493): FATAL EXCEPTION: main
E/AndroidRuntime(27493): java.lang.NullPointerException
E/AndroidRuntime(27493):  at 
android.support.v4.app.DialogFragment.dismissInternal(DialogFragment.java:184)
E/AndroidRuntime(27493):  at 
android.support.v4.app.DialogFragment.dismiss(DialogFragment.java:155)
E/AndroidRuntime(27493):  at 
cyl.ccu.cia.FragmentA.dismissProgressDialog(FragmentA.java:205)
E/AndroidRuntime(27493):  at 
cyl.ccu.cia.FragmentA.access$1(FragmentA.java:203)
E/AndroidRuntime(27493):  at 
cyl.ccu.cia.FragmentA$GetTokenAsyncTask.onPostExecute(FragmentA.java:295)
E/AndroidRuntime(27493):  at 
cyl.ccu.cia.FragmentA$GetTokenAsyncTask.onPostExecute(FragmentA.java:1)
E/AndroidRuntime(27493):  at android.os.AsyncTask.finish(AsyncTask.java:631)
E/AndroidRuntime(27493):  at 
android.os.AsyncTask.access$600(AsyncTask.java:177)
E/AndroidRuntime(27493):  at 
android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
E/AndroidRuntime(27493):  at 
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(27493):  at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(27493):  at 
android.app.ActivityThread.main(ActivityThread.java:4875)
E/AndroidRuntime(27493):  at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime(27493):  at 
java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(27493):  at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:804)
E/AndroidRuntime(27493):  at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:571)
E/AndroidRuntime(27493):  at dalvik.system.NativeStart.main(Native Method)

How can I solve the problem so that the dialog can dismiss correctly after 
rotation?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] problems with data security or lose data

2013-09-15 Thread Miro
I would like to ask you about your three most important issues of data 
security or lose data on your Smartphone. For this purpose, has been 
created web site. http://en.mydatasecuritymonitor.reembedded.com and the status 
of the Fan 
Page.
You can post comments also on support.reembedded.com or fb or g+.

Regards
Miro
reembedded.com, Google+ Brand 
Page,
 
Facebook Fan 
Page
 

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.