مدیریت کاربران مشترک
بروز خطا
امتیازات دریافتی
DatePicker
DatePicker برای تاریخ شمسی به صورت کنترل سفارشی به زبان جاوا برای اندروید
برای استفاده از این کنترل باید ابتدا کتابخانه support-v4 رو به پروژه اضافه کنین چون از ViewPager استفاده شده. با تشکر از کسانی که اسنیپ های مربوط به تاریخ شمسی رو گذاشته بودند و همچنین آموزش های سایت خانه اندروید و آقای کاشی زاده
اسنیپ
ActivityStartup.javaDatePicker.javadate_picker.xmlinflate_drop_down.xmlinflate_month_item.xml+
public class ActivityStartup extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Dialog d = new Dialog(this);
DatePicker datePicker = new DatePicker(this, new DatePicker.OnDateSetedListener() {
@Override
public void OnDateSeted(int year, int month, String monthTitle, int day, String dayOfWeek) {
Toast.makeText(G.context, dayOfWeek + " " + day + " " + monthTitle + " " + year, Toast.LENGTH_LONG).show();
d.dismiss();
}
});
d.setContentView(datePicker);
d.setTitle("تاریخ موردنظر");
d.show();
}
}
public class DatePicker extends LinearLayout {
private int currentYear = 1398;
private int currentMonth = 3;
private AutoCompleteTextView txtMonthViewer;
private AutoCompleteTextView txtYearViewer;
private static final int YEAR_START = 1380;
private static final int YEAR_END = 1414;
private String currentDate;
private HashMap<Integer, String> monthsMap;
private int currentDay;
private View monthNumbersView;
public int monthIndex;
public int monthDayCount;
public int monthFirstDayIndex;
private int day_cal, month_cal, year_cal;
private int gY, gM, gD;
private int leap, march;
private LayoutInflater layoutInflater;
private String packageName;
private Resources resources;
private OnDateSetedListener listener;
public DatePicker(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
initialize(context);
}
public DatePicker(Context context, AttributeSet attrs) {
super(context, attrs);
initialize(context);
}
public DatePicker(Context context) {
super(context);
initialize(context);
}
public DatePicker(Context context, OnDateSetedListener listener) {
super(context);
this.listener = listener;
initialize(context);
}
private void initialize(Context context) {
layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
packageName = context.getPackageName();
resources = context.getResources();
monthsMap = new HashMap<Integer, String>();
monthsMap.put(1, "فروردین");
monthsMap.put(2, "اردیبهشت");
monthsMap.put(3, "خرداد");
monthsMap.put(4, "تیر");
monthsMap.put(5, "مرداد");
monthsMap.put(6, "شهریور");
monthsMap.put(7, "مهر");
monthsMap.put(8, "آبان");
monthsMap.put(9, "آذر");
monthsMap.put(10, "دی");
monthsMap.put(11, "بهمن");
monthsMap.put(12, "اسفند");
View root = layoutInflater.inflate(R.layout.date_picker, this, true);
final ViewPager viewPager = (ViewPager) root.findViewById(R.id.viewPager);
txtMonthViewer = (AutoCompleteTextView) root.findViewById(R.id.txtMonthViewer);
txtYearViewer = (AutoCompleteTextView) root.findViewById(R.id.txtYearViewer);
ImageView imgMonthDown = (ImageView) root.findViewById(R.id.imgMonthDown);
ImageView imgMonthUp = (ImageView) root.findViewById(R.id.imgMonthUp);
ImageView imgYearDown = (ImageView) root.findViewById(R.id.imgYearDown);
ImageView imgYearUp = (ImageView) root.findViewById(R.id.imgYearUp);
txtMonthViewer.setText(monthsMap.get(currentMonth));
txtYearViewer.setText("" + currentYear);
final ArrayList<String> monthsArrayForAdapter = new ArrayList<String>();
monthsArrayForAdapter.add("فروردین");
monthsArrayForAdapter.add("اردیبهشت");
monthsArrayForAdapter.add("خرداد");
monthsArrayForAdapter.add("تیر");
monthsArrayForAdapter.add("مرداد");
monthsArrayForAdapter.add("شهریور");
monthsArrayForAdapter.add("مهر");
monthsArrayForAdapter.add("آبان");
monthsArrayForAdapter.add("آذر");
monthsArrayForAdapter.add("دی");
monthsArrayForAdapter.add("بهمن");
monthsArrayForAdapter.add("اسفند");
ArrayAdapter<String> monthsAdapter = new ArrayAdapter<String>(context, R.layout.linflate_drop_down, monthsArrayForAdapter);
txtMonthViewer.setAdapter(monthsAdapter);
txtMonthViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
txtMonthViewer.showDropDown();
}
});
ArrayList<String> yearsArrayForAdapter = new ArrayList<String>();
for (int i = YEAR_START; i <= YEAR_END; i++) {
yearsArrayForAdapter.add("" + i);
}
ArrayAdapter<String> yearsAdapter = new ArrayAdapter<String>(context, R.layout.linflate_drop_down, yearsArrayForAdapter);
txtYearViewer.setAdapter(yearsAdapter);
txtYearViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
txtYearViewer.showDropDown();
}
});
txtMonthViewer.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
currentMonth = monthsArrayForAdapter.indexOf(adapterView.getItemAtPosition(position).toString()) + 1;
viewPager.setCurrentItem(((currentYear - YEAR_START) * 12) + currentMonth - 1, true);
}
});
txtYearViewer.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
currentYear = Integer.parseInt(adapterView.getItemAtPosition(position).toString());
viewPager.setCurrentItem(((currentYear - YEAR_START) * 12) + currentMonth - 1, true);
}
});
MonthPagerAdapter adapter = new MonthPagerAdapter();
viewPager.setAdapter(adapter);
viewPager.setCurrentItem(((currentYear - YEAR_START) * 12) + currentMonth - 1);
viewPager.setOnPageChangeListener(new OnPageChangeListener() {
private int lastPosition = -2;
private int newPosition = -2;
private boolean scrollStarted, checkDirection;
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
if (checkDirection) {
lastPosition = position;
newPosition = -1;
checkDirection = false;
}
}
@Override
public void onPageSelected(int position) {
if (newPosition == -1) {
newPosition = position;
if (newPosition > lastPosition) {
if (currentMonth != 12) {
currentMonth++;
} else {
if (currentYear < YEAR_END) {
currentMonth = 1;
currentYear++;
}
}
} else {
if (currentMonth != 1) {
currentMonth--;
} else {
if (currentYear > YEAR_START) {
currentMonth = 12;
currentYear--;
}
}
}
setBannerTitles();
}
}
@Override
public void onPageScrollStateChanged(int state) {
if ( !scrollStarted && state == ViewPager.SCROLL_STATE_DRAGGING) {
scrollStarted = true;
checkDirection = true;
} else {
scrollStarted = false;
}
}
});
imgMonthDown.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
if (currentMonth != 1) {
currentMonth--;
} else {
if (currentYear > YEAR_START) {
currentMonth = 12;
currentYear--;
}
}
setBannerTitles();
viewPager.setCurrentItem(viewPager.getCurrentItem() - 1, true);
}
});
imgMonthUp.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
if (currentMonth != 12) {
currentMonth++;
} else {
if (currentYear < YEAR_END) {
currentMonth = 1;
currentYear++;
}
}
setBannerTitles();
viewPager.setCurrentItem(viewPager.getCurrentItem() + 1, true);
}
});
imgYearUp.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
int lastYear = Integer.parseInt(txtYearViewer.getText().toString());
if (lastYear < YEAR_END) {
currentYear = lastYear + 1;
setBannerTitles();
viewPager.setCurrentItem(viewPager.getCurrentItem() + 12, true);
}
}
});
imgYearDown.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
int lastYear = Integer.parseInt(txtYearViewer.getText().toString());
if (lastYear > YEAR_START) {
currentYear = lastYear - 1;
setBannerTitles();
viewPager.setCurrentItem(viewPager.getCurrentItem() - 12, true);
}
}
});
}
private void setBannerTitles() {
ArrayAdapter<String> txtMonthViewerAdapter = (ArrayAdapter<String>) txtMonthViewer.getAdapter();
txtMonthViewer.setAdapter(null);
txtMonthViewer.setText(monthsMap.get(currentMonth));
txtMonthViewer.setAdapter(txtMonthViewerAdapter);
ArrayAdapter<String> txtYearViewerAdapter = (ArrayAdapter<String>) txtYearViewer.getAdapter();
txtYearViewer.setAdapter(null);
txtYearViewer.setText("" + currentYear);
txtYearViewer.setAdapter(txtYearViewerAdapter);
}
private class MonthPagerAdapter extends PagerAdapter {
@Override
public int getCount() {
return (YEAR_END - YEAR_START + 1) * 12;
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view.equals(object);
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
int year = YEAR_START + position / 12;
final int monthIndex = position % 12;
int monthDayCount = 31;
if (monthIndex > 5) {
if (monthIndex == 11) {
boolean isKabise = false;
int[] numbers = { 1, 5, 9, 13, 18, 22, 26, 30 };
for (int num: numbers) {
if (year % 33 == num) {
isKabise = true;
}
}
if (isKabise) {
monthDayCount = 30;
} else {
monthDayCount = 29;
}
} else {
monthDayCount = 30;
}
}
PersianToGregorian(year, monthIndex + 1, 1);
Calendar calendar = new GregorianCalendar();
calendar.set(year_cal, month_cal - 1, day_cal);
int startDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int day = 0;
switch (startDayOfWeek) {
case 7: {
day = 1;
break;
}
case 1: {
day = 2;
break;
}
case 2: {
day = 3;
break;
}
case 3: {
day = 4;
break;
}
case 4: {
day = 5;
break;
}
case 5: {
day = 6;
break;
}
case 6: {
day = 7;
}
}
ArrayList<Integer> visibleDays = new ArrayList<Integer>();
ArrayList<Integer> invisibleDays = new ArrayList<Integer>();
monthNumbersView = layoutInflater.inflate(R.layout.inflate_month_item, null);
monthNumbersView.setTag(monthIndex + 1);
for (int i = 1; i <= monthDayCount; i++) {
visibleDays.add(day);
int id = resources.getIdentifier("btn" + day, "id", packageName);
Button btnDay = (Button) monthNumbersView.findViewById(id);
btnDay.setText("" + i);
btnDay.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
currentDay = Integer.parseInt("" + ((Button) v).getText());
PersianToGregorian(currentYear, currentMonth, currentDay);
Calendar calendar = new GregorianCalendar();
calendar.set(year_cal, month_cal - 1, day_cal);
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
String dayTitle = "شنبه";
switch (dayOfWeek) {
case 7: {
dayTitle = "شنبه";
break;
}
case 1: {
dayTitle = "یکشنبه";
break;
}
case 2: {
dayTitle = "دوشنبه";
break;
}
case 3: {
dayTitle = "سه شنبه";
break;
}
case 4: {
dayTitle = "چهارشنبه";
break;
}
case 5: {
dayTitle = "پنج شنبه";
break;
}
case 6: {
dayTitle = "جمعه";
}
}
if (listener != null) {
listener.OnDateSeted(currentYear, currentMonth, monthsMap.get(currentMonth), currentDay, dayTitle);
}
}
});
day++;
}
for (int i = 1; i < 38; i++) {
if ( !visibleDays.contains(new Integer(i))) {
invisibleDays.add(new Integer(i));
}
}
visibleChanger(monthNumbersView, visibleDays, invisibleDays);
container.addView(monthNumbersView);
return monthNumbersView;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
}
public static interface OnDateSetedListener {
public void OnDateSeted(int year, int month, String monthTitle, int day, String dayOfWeekTitle);
}
private void visibleChanger(final View month, final ArrayList<Integer> visibleDays, final ArrayList<Integer> invisibleDays) {
for (int i = 0; i < invisibleDays.size(); i++) {
int id = resources.getIdentifier("btn" + invisibleDays.get(i), "id", packageName);
((Button) month.findViewById(id)).setVisibility(View.INVISIBLE);
}
for (int i = 0; i < visibleDays.size(); i++) {
int id = resources.getIdentifier("btn" + visibleDays.get(i), "id", packageName);
((Button) month.findViewById(id)).setVisibility(View.VISIBLE);
}
}
private void PersianToGregorian(int year, int month, int day) {
int jd = Jal2JD(year, month, day);
JD2JG(jd, 0);
this.year_cal = gY;
this.month_cal = gM;
this.day_cal = gD;
}
private int Jal2JD(int jY, int jM, int jD) {
JalCal(jY);
int jd = JG2JD(gY, 3, march, 1) + (jM - 1) * 31 - jM / 7 * (jM - 7)
+ jD - 1;
return jd;
}
private void JD2JG(int JD, int J1G0) {
int i, j;
j = 4 * JD + 139361631;
if (J1G0 == 0) {
j = j + (4 * JD + 183187720) / 146097 * 3 / 4 * 4 - 3908;
}
i = (j % 1461) / 4 * 5 + 308;
gD = (i % 153) / 5 + 1;
gM = ((i / 153) % 12) + 1;
gY = j / 1461 - 100100 + (8 - gM) / 6;
}
private void JalCal(int jY) {
march = 0;
leap = 0;
int[] breaks = { -61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210,
1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178 };
gY = jY + 621;
int leapJ = -14;
int jp = breaks[0];
int jump = 0;
for (int j = 1; j <= 19; j++) {
int jm = breaks[j];
jump = jm - jp;
if (jY < jm) {
int N = jY - jp;
leapJ = leapJ + N / 33 * 8 + (N % 33 + 3) / 4;
if ((jump % 33) == 4 && (jump - N) == 4)
leapJ = leapJ + 1;
int leapG = (gY / 4) - (gY / 100 + 1) * 3 / 4 - 150;
march = 20 + leapJ - leapG;
if ((jump - N) < 6)
N = N - jump + (jump + 4) / 33 * 33;
leap = ((((N + 1) % 33) - 1) % 4);
if (leap == -1)
leap = 4;
break;
}
leapJ = leapJ + jump / 33 * 8 + (jump % 33) / 4;
jp = jm;
}
}
private int JG2JD(int year, int month, int day, int J1G0) {
int jd = (1461 * (year + 4800 + (month - 14) / 12)) / 4
+ (367 * (month - 2 - 12 * ((month - 14) / 12))) / 12
- (3 * ((year + 4900 + (month - 14) / 12) / 100)) / 4 + day
- 32075;
if (J1G0 == 0)
jd = jd - (year + 100100 + (month - 8) / 6) / 100 * 3 / 4 + 752;
return jd;
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imgYearDown"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
android:src="@android:drawable/arrow_down_float" />
<AutoCompleteTextView
android:id="@+id/txtYearViewer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="1"
android:ems="10"
android:focusable="false"
android:text="AutoCompleteTextView" >
<requestFocus />
</AutoCompleteTextView>
<ImageView
android:id="@+id/imgYearUp"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
android:src="@android:drawable/arrow_up_float" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imgMonthDown"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
android:src="@android:drawable/arrow_down_float" />
<AutoCompleteTextView
android:id="@+id/txtMonthViewer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="1"
android:ems="10"
android:focusable="false"
android:text="AutoCompleteTextView" />
<ImageView
android:id="@+id/imgMonthUp"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
android:src="@android:drawable/arrow_up_float" />
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="wrap_content"
android:layout_height="350dp" >
</android.support.v4.view.ViewPager>
</LinearLayout>
<!-- Copyright (C) 2006 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="5dip"
android:paddingLeft="6dip"
android:textSize="14dip"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#000000" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center_horizontal"
android:orientation="vertical"
android:padding="8dp" >
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="ج"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="پ"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="چ"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="س"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="د"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="ی"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="ش"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearMonthNumberContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/linear1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btn7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn6"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btn14"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn13"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn12"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn11"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn10"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn9"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn8"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btn21"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn20"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn19"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn18"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn17"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn15"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btn28"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn27"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn26"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn25"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn24"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn23"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn22"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btn35"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn34"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn33"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn32"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn31"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn30"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn29"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/Button37"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="21"
android:textSize="12dp"
android:visibility="invisible" />
<Button
android:id="@+id/Button35"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="21"
android:textSize="12dp"
android:visibility="invisible" />
<Button
android:id="@+id/Button38"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="21"
android:textSize="12dp"
android:visibility="invisible" />
<Button
android:id="@+id/Button41"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="21"
android:textSize="12dp"
android:visibility="invisible" />
<Button
android:id="@+id/Button39"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:text="21"
android:textSize="12dp"
android:visibility="invisible" />
<Button
android:id="@+id/btn37"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
<Button
android:id="@+id/btn36"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
android:gravity="center"
android:onClick="onDayClicked"
android:text="21"
android:textSize="12dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
length : 0
words : 0
lines : 0
حقوق مادی و معنوی تمامی آثار و محتویات عرضه شده در این وب سایت، متعلق به شرکت «فوژان رسانه ایده هوشمند» و پدیدآورندگان آثار بوده و حسب مورد دارای مجوز از مراجع ذی صلاح می باشد.
کپی برداری از مطالب این سایت حتی با ذکر منبع جایز نیست.
ویرایش
پیام