15,908,173 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Varsha Bhatia (Top 26 by date)
Varsha Bhatia
12-Apr-13 8:52am
View
If i am using in main.xml
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ListView
android:id="@+id/lvResult"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
Its works perfact but i add multiple layout it creates a problem
Varsha Bhatia
5-Mar-13 4:45am
View
ok but i want a solution only if you have then help
Varsha Bhatia
5-Mar-13 4:41am
View
sir slove that but the problem is when i click the starttime first and after close time, the database is store only closetime value in both the field and when i choose close button first and the choos the start button ,in database it stores the start button value in both the field...wwhat is the solution of this?
Varsha Bhatia
5-Mar-13 2:04am
View
ok sir
Varsha Bhatia
5-Mar-13 1:57am
View
ok sir..
Varsha Bhatia
5-Mar-13 1:41am
View
sir here i write the complete code for the endtime likewise i used for start time..same but the name was different..
Varsha Bhatia
5-Mar-13 1:40am
View
it calls the populateEndTime.....
private void populateEndTime() {
Log.i("populate","start-time-end");
String time = null;
if (mListCursor1 != null && mListCursor1.getCount() > 0) {
timeId = mListCursor1.getLong(mListCursor1
.getColumnIndex(DbAdapter.COL_ID1));
long d = mListCursor1.getLong(mListCursor1
.getColumnIndex(DbAdapter.COL_CLOSE_TIME));
if (d > 0) {
mTimeClose = TimeDataFormate.getCalendarFromFormattedLong(d);
time = TimeDisplayFormat.getFormattedTime(mTimeClose);
}
}
if (time != null) {
close_time.setText(time);
}
Log.i("populate","end-time-end");
}
Varsha Bhatia
5-Mar-13 1:39am
View
calls the mTimeEndSetListener...
private TimePickerDialog.OnTimeSetListener mTimeEndSetListener = new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
Log.i("EndListener","endlistenerstart");
Calendar c = Calendar.getInstance();
c.set(Calendar.HOUR_OF_DAY, hourOfDay);
c.set(Calendar.MINUTE, minute);
mDbHelper1.updateTimeRecord(timeId, c);
mListCursor1.requery();
mListCursor1.moveToFirst();
populateEndTime();
}
};
Varsha Bhatia
5-Mar-13 1:36am
View
it calls showEndTimePicker..like this.
private void showEndTimePicker() {
Log.i("endtimepicker","start");
TimePickerDialog tdialog2;
if (mTimeClose == null) {
final Calendar c = Calendar.getInstance();
tdialog2 = new TimePickerDialog(this, mTimeEndSetListener,
c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE), true);
} else {
tdialog2 = new TimePickerDialog(this, mTimeEndSetListener,
mTimeClose.get(Calendar.HOUR_OF_DAY),
mTimeClose.get(Calendar.MINUTE), true);
}
tdialog2.show();
Log.i("endtimepicker","end");
}
Varsha Bhatia
5-Mar-13 1:35am
View
In mainActivity i am using this code..
btnCloseTime.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showEndTimePicker();
}
});
Varsha Bhatia
5-Mar-13 1:33am
View
sir i am using this class for formating the time
public class TimeDataFormate
{
private TimeDataFormate(){}
public static final String TIME_FORMAT = "HHmmss";
private static final SimpleDateFormat timeFormat = new SimpleDateFormat(TIME_FORMAT);
public static long formatDateAsLong(Calendar cal){
return Long.parseLong(timeFormat.format(cal.getTime()));
}
public static Calendar getCalendarFromFormattedLong(long l){
try {
Calendar c = Calendar.getInstance();
c.setTime(timeFormat.parse(String.valueOf(l)));
return c;
} catch (ParseException e) {
return null;
}
}
public static long getNowFormattedLong(){
return TimeDataFormate.formatDateAsLong(Calendar.getInstance());
}
}
Varsha Bhatia
5-Mar-13 1:32am
View
sir i can insert the record properly but my question is that when i insert it, it display the same time in both the fields STARTTIME & CLOSETIME.Both have same values which is closetime. In form it display properly but in database it display the same time.
Varsha Bhatia
5-Mar-13 1:24am
View
// This is only used for TIME table which define the start and close time
public Cursor fetchTimeList() {
Cursor cursor = mDb.query(TABLE_TIME, new String[] { COL_ID1,
COL_START_TIME, COL_CLOSE_TIME }, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
Varsha Bhatia
5-Mar-13 1:22am
View
no sir i paste a code here
public long updateTimeRecord(long id, Calendar calendar) {
ContentValues values = new ContentValues();
// Here is where we apply the Data DateFormat:
values.put(COL_START_TIME, TimeDataFormate.formatDateAsLong(calendar));
values.put(COL_CLOSE_TIME, TimeDataFormate.formatDateAsLong(calendar));
return mDb.update(TABLE_TIME, values, COL_ID1 + "=" + id, null);
}
Varsha Bhatia
5-Mar-13 1:16am
View
sir sqlite database m using..sir minor problem which i solve but still i have a prob which is start time and end time both are same in database..
Varsha Bhatia
4-Jan-13 0:50am
View
i know that but it defines me the error like no place found that's why i share my problem here only. and if you don't know the answer then it's OK no problem. By the way thanks...thanks a lot..for giving me this type of suggestion.
Varsha Bhatia
4-Jan-13 0:43am
View
May i send you my application's apk file for better understand regarding my question?
Varsha Bhatia
4-Jan-13 0:39am
View
ya,i already use that but first time i open my application at that time it defines like no place found because at that time in emulator by default latitude and longitude is available. after that i select my device and i replace the latitude and longitude with my current location's latitude and longitude.Now what should i do?
Varsha Bhatia
4-Jan-13 0:32am
View
How can i set my latitude and longitude dynamically in my application? Up till now i set my latitude and longitude in the emulator by default but i want to set it dynamically.Like i am in Gujarat then its latitude and longitude are different then the Maharashtra. So when ever i am in Gujarat it sets by default Gujarat's latitude and longitude and when ever i am in Maharashtra at that time it sets by default Maharashtra's latitude and longitude. Means how to get the current positions latitude and longitude? What is the solution of this? Please guide me. thank you.
Varsha Bhatia
3-Jan-13 2:24am
View
No sorry i am not able to solve my code with these solutions please send me another demo.Thank you
Varsha Bhatia
3-Jan-13 2:19am
View
ok sorry i am new to using this and there is so many lines of code so i am not able to post it here.ok i again try to do as you sugest me ok thank you once again.
Varsha Bhatia
3-Jan-13 2:16am
View
I am using this code on my button click and call the class myroute.java. but it is very long and bad code and also very bad for generate the route. so now please helps me to solve my query regarding the find the route from current position to destination. Thank you.
Varsha Bhatia
3-Jan-13 1:47am
View
Hello, i watch that video and implemented in my working project but it gives me the error.Now what should i do now? I want a source code or demo code which is implemented directly in my project. Please give me a suggestion. Thank you again.
Varsha Bhatia
28-Dec-12 23:36pm
View
@Abhishek Pant: Thank you for your guidance. Thank you so much.I will try this in my application.
Varsha Bhatia
24-Dec-12 0:59am
View
as Member 96138585 said that nearest cafe i want same about the hotels. i already have the multiple hotels name with their address,phone no, latitude, longitude etc. so i want that whenever i select the hotel its path define in Google map from current position. So please give me any demo example you have or source code you have please send me. Thanks in advance.
Varsha Bhatia
24-Dec-12 0:52am
View
Thanks but in that video i only get the latitude and longitude nothing else.I said that i already have a latitude and longitude but now i want a navigation from one place to another place on Google map. Please guide me as soon as possible thanks in advance.
Show More