Search Results

Search found 4 results on 1 pages for 'miya'.

Page 1/1 | 1 

  • Django - urls.py - Filenames with a hash/pound (#) sign?

    - by miya
    I'm using django and realized that when the filename that the user wants to access (let's say a photo) has the pound sign, the entry in the url.py does not match. Any ideas? url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT}, it just says: "/home/user/project/static/upload/images/hello" does not exist when actually the name of the file is: hello#world.jpg Thanks, Nico

    Read the article

  • Exception in DatePickerDialog

    - by Miya
    Hi, i am trying to create a DatePickerDialog in the class 'dateDisplay.class'. I am calling this activity from 'main.class'. If I call the 'dateDisplay.class' using startActivity(), then the DatePickerDialog works fine. But actually I am using an ActivityGroup (for using tab in my application) and I am starting the 'dateDisplay.class' using the following code : Intent dateIntent=new Intent(context,dateDisplay.class); View v=getLocalActivityManager().startActivity("2",dateIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView(); setContentView(v); But an exception is caught, on calling the onCreateDialog() function. And the process is suddently stopped. It shows TargetInvocationException is occured. How can I correct the code? Following is my code: public Dialog onCreateDialog(int id,Bundle b) { Calendar c=Calendar.getInstance(); int day=c.get(Calendar.DAY_OF_MONTH); int month=c.get(Calendar.MONTH); int year=c.get(Calendar.YEAR); Dialog d = null; if(id==DATE_DIALOG_ID) { return new DatePickerDialog(this,dateChangeListener,year,month,day); } else { return null; } } Please help me.. Thank you..

    Read the article

  • Android :WindowManager$BadTockenException on Spinner Click

    - by Miya
    Hi, I have a spinner in my home.class. When I click on the spinner, the process is stopped showing exception that WindowManager$BadTockenException is caught. I am calling this home.class from main.class which extends ActivityGroup. If I am simply run only the home.class, the spinner is showing all items. But the problem is only with calling home.class from main.class. The following are my code. Please tell me why this is happened. main.class public class main extends ActivityGroup { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent=new Intent(this,home.class); View view=getLocalActivityManager().startActivity("1", intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView(); setContentView(view); } } home.class String[] country={"Please selects","US","INDIA","UK"}; Spinner s2 = (Spinner) findViewById(R.id.spinnerCountry); ArrayAdapter<CharSequence> adapterCountry=new ArrayAdapter(this,android.R.layout.simple_spinner_item,country); adapterCountry.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); s2.setAdapter(adapterCountry); s2.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected( AdapterView<?> parent, View view, int position, long id) { countryName=country[position]; } public void onNothingSelected(AdapterView<?> parent) { countryName=country[0]; } }); Stack Thread [<1 main] (Suspended (exception WindowManager$BadTokenException)) AlertDialog(Dialog).show() line: 245 AlertDialog$Builder.show() line: 802 Spinner.performClick() line: 260 View$PerformClick.run() line: 9080 ViewRoot(Handler).handleCallback(Message) line: 587 ViewRoot(Handler).dispatchMessage(Message) line: 92 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3647 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 507 ZygoteInit$MethodAndArgsCaller.run() line: 839 ZygoteInit.main(String[]) line: 597 NativeStart.main(String[]) line: not available [native method] Thank You....

    Read the article

  • Android : How to start an activity in a tab?

    - by Miya
    Hi, I am using tabs in my application. I have 3 tabs : home, services, contact us. In the 'home tab', there is 'login button' and my requirement is when I click the login button, it should display the view for 'login' in the same tab itself. That means it should start another activity (login.class) and display corresponding view (login.xml). And the tabs should be displayed at the top as before. But when I click the login button, it should start login activity, but the tabs are disappeared. How can I start an activity in the same tab itself? Please help me. Thank you...

    Read the article

1