欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android實(shí)現(xiàn)日歷控件示例代碼

 更新時(shí)間:2017年03月04日 15:18:11   作者:wzs0316xuan  
本篇文章主要介紹了Android實(shí)現(xiàn)日歷控件示例代碼,實(shí)例講解了Android日期與時(shí)間相關(guān)控件的相關(guān)使用技巧,具有一定參考價(jià)值,需要的朋友可以參考下

做的是一個酒店的項(xiàng)目,可以選擇入住和離開的日期。聲明為了省事在網(wǎng)上找的資料,自己修改的邏輯,希望對需要的朋友有幫助。喜歡的給個好評。謝謝啦!祝生活愉快!

先上圖

日歷的樣式,可以上下縱向滑動 

第一步,搭建布局xml

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <FrameLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content">

      <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/days_detail"
        android:gravity="center"
        android:padding="16dp"
        android:text="選擇住店離店日期"
        android:textColor="@color/white"
        android:textSize="18sp" />

      <ImageView
        android:id="@+id/back_to_up"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"
        android:src="@drawable/backto" />
    </FrameLayout>

    <FrameLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content">

      <View
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:background="@color/days_detail" />

      <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:layout_marginTop="20dp"
        android:padding="10dp"
        app:cardCornerRadius="10dp"
        app:cardElevation="16dp">

        <LinearLayout
          android:id="@+id/ll"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical" />
      </android.support.v7.widget.CardView>
    </FrameLayout>
  </LinearLayout>
</ScrollView>

第二部在編寫邏輯

 LinearLayout ll;
  MyCalendar c1;
  Date date;
  String nowday;
  long nd = 1000 * 24L * 60L * 60L;//一天的毫秒數(shù)
  SimpleDateFormat simpleDateFormat, sd1, sd2;
  SharedPreferences sp;
  SharedPreferences.Editor editor;
  private String inday, outday//日期
   sp_inday, sp_outday;//周幾
 Activity  extends BaseActivity implements MyCalendar.OnDaySelectListener {

繼承BaseActivity實(shí)現(xiàn)點(diǎn)擊日歷的監(jiān)聽回調(diào)

 private void init() {
    List<String> listDate = getDateList();
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
        ViewGroup.LayoutParams.WRAP_CONTENT);
    for (int i = 0; i < listDate.size(); i++) {
      c1 = new MyCalendar(this);
      c1.setLayoutParams(params);
      Date date = null;
      try {
        date = simpleDateFormat.parse(listDate.get(i));
      } catch (ParseException e) {
        e.printStackTrace();
      }
      if (!"".equals(sp_inday)) {
        c1.setInDay(sp_inday);
      }
      if (!"".equals(sp_outday)) {
        c1.setOutDay(sp_outday);
      }
      c1.setTheDay(date);
      c1.setOnDaySelectListener(this);
      ll.addView(c1);
    }
  }

  @Override
  public void onDaySelectListener(View view, String date) {
    //若日歷日期小于當(dāng)前日期,或日歷日期-當(dāng)前日期超過三個月,則不能點(diǎn)擊
    try {
      if (simpleDateFormat.parse(date).getTime() < simpleDateFormat.parse(nowday).getTime()) {
        return;
      }
      long dayxc = (simpleDateFormat.parse(date).getTime() - simpleDateFormat.parse(nowday).getTime()) / nd;
      if (dayxc > 90) {
        return;
      }
    } catch (ParseException e) {
      e.printStackTrace();
    }
    //若以前已經(jīng)選擇了日期,則在進(jìn)入日歷后會顯示以選擇的日期,該部分作用則是重新點(diǎn)擊日歷時(shí),清空以前選擇的數(shù)據(jù)(包括背景圖案)
    if (!"".equals(sp_inday)) {
      c1.viewIn.setBackgroundColor(Color.WHITE);
      ((TextView) c1.viewIn.findViewById(R.id.tv_calendar_day)).setTextColor(Color.BLACK);
      ((TextView) c1.viewIn.findViewById(R.id.tv_calendar)).setText("");
    }
    if (!"".equals(sp_outday)) {
      c1.viewOut.setBackgroundColor(Color.WHITE);
      ((TextView) c1.viewOut.findViewById(R.id.tv_calendar_day)).setTextColor(Color.BLACK);
      ((TextView) c1.viewOut.findViewById(R.id.tv_calendar)).setText("");
    }

    String dateDay = date.split("-")[2];
    if (Integer.parseInt(dateDay) < 10) {
      dateDay = date.split("-")[2].replace("0", "");
    }
    TextView textDayView = (TextView) view.findViewById(R.id.tv_calendar_day);
    TextView textView = (TextView) view.findViewById(R.id.tv_calendar);
    view.setBackgroundColor(Color.parseColor("#33B5E5"));
    textDayView.setTextColor(Color.WHITE);
    if (null == inday || inday.equals("")) {
      textDayView.setText(dateDay);
      textView.setText("入住");
      inday = date;
    } else {
      if (inday.equals(date)) {
        view.setBackgroundColor(Color.WHITE);
        textDayView.setText(dateDay);
        textDayView.setTextColor(Color.BLACK);
        textView.setText("");
        inday = "";
      } else {
        try {
          if (simpleDateFormat.parse(date).getTime() < simpleDateFormat.parse(inday).getTime()) {
            view.setBackgroundColor(Color.WHITE);
            textDayView.setTextColor(Color.BLACK);
            Toast.makeText(CalendarActivity.this, "離開日期不能小于入住日期", Toast.LENGTH_SHORT).show();
            return;
          }
        } catch (ParseException e) {
          e.printStackTrace();
        }
        textDayView.setText(dateDay);
        textView.setText("離開");
        outday = date;
        editor.putString("dateIn", inday);
        editor.putString("dateOut", outday);
        editor.commit();
        finish();
      }
    }
  }

  //根據(jù)當(dāng)前日期,向后數(shù)三個月(若當(dāng)前day不是1號,為滿足至少90天,則需要向后數(shù)4個月)
  @SuppressLint("SimpleDateFormat")
  public List<String> getDateList() {
    List<String> list = new ArrayList<String>();
    Date date = new Date();
    int nowMon = date.getMonth() + 1;
    String yyyy = sd1.format(date);
    String dd = sd2.format(date);
    if (nowMon == 9) {
      list.add(simpleDateFormat.format(date));
      list.add(yyyy + "-10-" + dd);
      list.add(yyyy + "-11-" + dd);
      if (!dd.equals("01")) {
        list.add(yyyy + "-12-" + dd);
      }
    } else if (nowMon == 10) {
      list.add(yyyy + "-10-" + dd);
      list.add(yyyy + "-11-" + dd);
      list.add(yyyy + "-12-" + dd);
      if (!dd.equals("01")) {
        list.add((Integer.parseInt(yyyy) + 1) + "-01-" + dd);
      }
    } else if (nowMon == 11) {
      list.add(yyyy + "-11-" + dd);
      list.add(yyyy + "-12-" + dd);
      list.add((Integer.parseInt(yyyy) + 1) + "-01-" + dd);
      if (!dd.equals("01")) {
        list.add((Integer.parseInt(yyyy) + 1) + "-02-" + dd);
      }
    } else if (nowMon == 12) {
      list.add(yyyy + "-12-" + dd);
      list.add((Integer.parseInt(yyyy) + 1) + "-01-" + dd);
      list.add((Integer.parseInt(yyyy) + 1) + "-02-" + dd);
      if (!dd.equals("01")) {
        list.add((Integer.parseInt(yyyy) + 1) + "-03-" + dd);
      }
    } else {
      list.add(yyyy + "-" + getMon(nowMon) + "-" + dd);
      list.add(yyyy + "-" + getMon((nowMon + 1)) + "-" + dd);
      list.add(yyyy + "-" + getMon((nowMon + 2)) + "-" + dd);
      if (!dd.equals("01")) {
        list.add(yyyy + "-" + getMon((nowMon + 3)) + "-" + dd);
      }
    }
    return list;
  }

  public String getMon(int mon) {
    String month = "";
    if (mon < 10) {
      month = "0" + mon;
    } else {
      month = "" + mon;
    }
    return month;
  }

第三部 編寫監(jiān)聽,自定義的控件

public class MyCalendar extends LinearLayout {

  private static Context context;

  private Date theInDay;
  private String inday = "", outday = "";
  public static View viewIn;
  public static View viewOut;
  public static String positionIn;
  public static String positionOut;

  public static final int WEEKDAYS = 7;

  public static String[] WEEK = {
      "周日",
      "周一",
      "周二",
      "周三",
      "周四",
      "周五",
      "周六"
  };

  static long nd = 1000 * 24L * 60L * 60L;//一天的毫秒數(shù)

  private List<String> gvList;//存放天

  private OnDaySelectListener callBack;//回調(diào)函數(shù)

  private static String nowday = new SimpleDateFormat("yyyy-MM-dd").format(new Date());

  private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMM");//日期格式化

  private static SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd");//日期格式化

  /**
   * 構(gòu)造函數(shù)
   *
   * @param context
   */
  public MyCalendar(Context context) {
    super(context);
    MyCalendar.context = context;
  }

  /**
   * 日期變量轉(zhuǎn)成對應(yīng)的星期字符串
   *
   * @param date
   * @return
   */
  public static String DateToWeek(Date date) {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(date);
    int dayIndex = calendar.get(Calendar.DAY_OF_WEEK);
    if (dayIndex < 1 || dayIndex > WEEKDAYS) {
      return null;
    }

    return WEEK[dayIndex - 1];
  }

  /**
   * 獲得天數(shù)差
   *
   * @param begin
   * @param end
   * @return
   */
  public static long getDayDiff(Date begin, Date end) {
    long day = 1;
    if (end.getTime() < begin.getTime()) {
      day = -1;
    } else if (end.getTime() == begin.getTime()) {
      day = 1;
    } else {
      day += (end.getTime() - begin.getTime()) / (24 * 60 * 60 * 1000);
    }
    return day;
  }

  /**
   * 將yyyy-MM-dd類型轉(zhuǎn)換成MM.dd
   *
   * @param time
   * @return
   * @throws ParseException
   */
  public static String format1(String time) throws ParseException {
    SimpleDateFormat from = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
    SimpleDateFormat to = new SimpleDateFormat("MM.dd", Locale.CHINA);
    return to.format(from.parse(time));
  }

  /**
   * 獲得指定日期的后一天
   *
   * @param specifiedDay
   * @return
   */
  public static String getSpecifiedDayAfter(String specifiedDay) {
    Calendar c = Calendar.getInstance();
    Date date = null;
    try {
      date = new SimpleDateFormat("yy-MM-dd").parse(specifiedDay);
    } catch (ParseException e) {
      e.printStackTrace();
    }
    c.setTime(date);
    int day = c.get(Calendar.DATE);
    c.set(Calendar.DATE, day + 1);

    String dayAfter = new SimpleDateFormat("yyyy-MM-dd")
        .format(c.getTime());
    return dayAfter;
  }

  /**
   * 構(gòu)造函數(shù)
   *
   * @param context
   */
  public MyCalendar(Context context, AttributeSet attrs) {
    super(context, attrs);
    MyCalendar.context = context;
  }

  public void setInDay(String inday) {
    this.inday = inday;
  }

  public void setOutDay(String outday) {
    this.outday = outday;
  }

  public void setTheDay(Date dateIn) {
    this.theInDay = dateIn;
    init();
  }

  /**
   * 初始化日期以及view等控件
   */
  private void init() {
    gvList = new ArrayList<String>();//存放天
    final Calendar cal = Calendar.getInstance();//獲取日歷實(shí)例
    cal.setTime(theInDay);//cal設(shè)置為當(dāng)天的
    cal.set(Calendar.DATE, 1);//cal設(shè)置當(dāng)前day為當(dāng)前月第一天
    int tempSum = countNeedHowMuchEmpety(cal);//獲取當(dāng)前月第一天為星期幾
    int dayNumInMonth = getDayNumInMonth(cal);//獲取當(dāng)前月有多少天
    setGvListData(tempSum, dayNumInMonth, cal.get(Calendar.YEAR) + "-" + getMonth((cal.get(Calendar.MONTH) + 1)));

    View view = LayoutInflater.from(context).inflate(R.layout.comm_calendar, this, true);//獲取布局,開始初始化
    TextView tv_year = (TextView) view.findViewById(R.id.tv_year);
    if (cal.get(Calendar.YEAR) > new Date().getYear()) {
      tv_year.setVisibility(View.VISIBLE);
      tv_year.setText(cal.get(Calendar.YEAR) + "年");
    }
    TextView tv_month = (TextView) view.findViewById(R.id.tv_month);
    tv_month.setText(String.valueOf(theInDay.getMonth() + 1));
    MyGridView gv = (MyGridView) view.findViewById(R.id.gv_calendar);
    calendarGridViewAdapter gridViewAdapter = new calendarGridViewAdapter(gvList, inday, outday);
    gv.setAdapter(gridViewAdapter);
    gv.setOnItemClickListener(new OnItemClickListener() {
      @Override
      public void onItemClick(AdapterView<?> adapterView, View arg1, int position, long arg3) {
        String choiceDay = (String) adapterView.getAdapter().getItem(position);
        String[] date = choiceDay.split(",");
        String day = date[1];
        if (!" ".equals(day)) {
          if (Integer.parseInt(day) < 10) {
            day = "0" + date[1];
          }
          choiceDay = date[0] + "-" + day;
          if (callBack != null) {//調(diào)用回調(diào)函數(shù)回調(diào)數(shù)據(jù)
            callBack.onDaySelectListener(arg1, choiceDay);
          }
        }
      }
    });
  }

  /**
   * 為gridview中添加需要展示的數(shù)據(jù)
   *
   * @param tempSum
   * @param dayNumInMonth
   */
  private void setGvListData(int tempSum, int dayNumInMonth, String YM) {
    gvList.clear();
    for (int i = 0; i < tempSum; i++) {
      gvList.add(" , ");
    }
    for (int j = 1; j <= dayNumInMonth; j++) {
      gvList.add(YM + "," + String.valueOf(j));
    }
  }

  private String getMonth(int month) {
    String mon = "";
    if (month < 10) {
      mon = "0" + month;
    } else {
      mon = "" + month;
    }
    return mon;
  }

  /**
   * 獲取當(dāng)前月的總共天數(shù)
   *
   * @param cal
   * @return cal.getActualMaximum(Calendar.DATE)
   */
  private int getDayNumInMonth(Calendar cal) {
    return cal.getActualMaximum(Calendar.DATE);
  }

  /**
   * 獲取當(dāng)前月第一天在第一個禮拜的第幾天,得出第一天是星期幾
   *
   * @param cal
   * @return firstDayInWeek
   */
  private int countNeedHowMuchEmpety(Calendar cal) {
    int firstDayInWeek = cal.get(Calendar.DAY_OF_WEEK) - 1;

    Log.e("MyCalendar", String.valueOf(firstDayInWeek));
    return firstDayInWeek;
  }


  /**
   * gridview中adapter的viewholder
   *
   * @author wx
   */
  static class GrideViewHolder {
    TextView tvDay, tv;
  }

  /**
   * gridview的adapter
   *
   * @author Administrator
   */
  static class calendarGridViewAdapter extends BaseAdapter {

    List<String> gvList;//存放天
    String inday, outday;

    public calendarGridViewAdapter(List<String> gvList, String inday, String outday) {
      super();
      this.gvList = gvList;
      this.inday = inday;
      this.outday = outday;
    }

    @Override
    public int getCount() {
      return gvList.size();
    }

    @Override
    public String getItem(int position) {
      return gvList.get(position);
    }

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

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      GrideViewHolder holder;
      if (convertView == null) {
        holder = new GrideViewHolder();
        convertView = inflate(context, R.layout.common_calendar_gridview_item, null);
        holder.tv = (TextView) convertView.findViewById(R.id.tv_calendar);
        holder.tvDay = (TextView) convertView.findViewById(R.id.tv_calendar_day);
        convertView.setTag(holder);
      } else {
        holder = (GrideViewHolder) convertView.getTag();
      }
      String[] date = getItem(position).split(",");
      holder.tvDay.setText(date[1]);
      if ((position + 1) % 7 == 0 || (position) % 7 == 0) {
        holder.tvDay.setTextColor(Color.parseColor("#339900"));
      }
      if (!date[1].equals(" ")) {
        String day = date[1];
        if (Integer.parseInt(date[1]) < 10) {
          day = "0" + date[1];
        }
        if ((date[0] + "-" + day).equals(nowday)) {
          holder.tvDay.setTextColor(Color.parseColor("#FF6600"));
          holder.tvDay.setTextSize(15);
          holder.tvDay.setText("今天");
        }
        if (!"".equals(inday) && (date[0] + "-" + day).equals(inday)) {
          convertView.setBackgroundColor(Color.parseColor("#33B5E5"));
          holder.tvDay.setTextColor(Color.WHITE);
          holder.tvDay.setText(date[1]);
          holder.tv.setText("入住");
          viewIn = convertView;
          positionIn = date[1];
        }
        if (!"".equals(outday) && (date[0] + "-" + day).equals(outday)) {
          convertView.setBackgroundColor(Color.parseColor("#33B5E5"));
          holder.tvDay.setTextColor(Color.WHITE);
          holder.tvDay.setText(date[1]);
          holder.tv.setText("離開");
          viewOut = convertView;
          positionOut = date[1];
        }
        try {
          //若日歷日期<當(dāng)前日期,則不能選擇
          if (dateFormat2.parse(date[0] + "-" + day).getTime() < dateFormat2.parse(nowday).getTime()) {
            holder.tvDay.setTextColor(Color.parseColor("#999999"));
          }
          //若日歷日期-當(dāng)前日期>90天,則不能選擇
          long dayxc = (dateFormat2.parse(date[0] + "-" + day).getTime() - dateFormat2.parse(nowday).getTime()) / nd;
          if (dayxc > 90) {
            holder.tvDay.setTextColor(Color.parseColor("#999999"));
          }
        } catch (ParseException e) {
          e.printStackTrace();
        }
      }
      return convertView;
    }
  }

  /**
   * 自定義監(jiān)聽接口
   *
   * @author Administrator
   */
  public interface OnDaySelectListener {
    void onDaySelectListener(View view, String date);
  }

  /**
   * 自定義監(jiān)聽接口設(shè)置對象
   *
   * @param o
   */
  public void setOnDaySelectListener(OnDaySelectListener o) {
    callBack = o;
  }
}

在界面顯示選擇的日期

看圖 

接下來就是為了顯示選擇的日期進(jìn)行邏輯判斷,包括字符串的轉(zhuǎn)換以及日期格式的轉(zhuǎn)換,日期的計(jì)算等。

simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    if ("".equals(home_into_date.getText().toString())
        && "".equals(home_out_date.getText().toString())) {
      inday = simpleDateFormat.format(new Date());
      try {
        //轉(zhuǎn)換時(shí)間格式
        String changeDate = MyCalendar.format1(inday);

        Date dateIn = simpleDateFormat.parse(inday);
        //將日期轉(zhuǎn)換成周
        String weekIn = MyCalendar.DateToWeek(dateIn);
        home_into_date.setText("" + changeDate + weekIn);
        String nextDay = MyCalendar.format1(MyCalendar.getSpecifiedDayAfter(inday));
        Date dateOut = simpleDateFormat.parse(MyCalendar.getSpecifiedDayAfter(inday));
        String weekOut = MyCalendar.DateToWeek(dateOut);
        home_out_date.setText("" + nextDay + weekOut);
        long days = MyCalendar.getDayDiff(dateIn, dateOut);
        home_total_days.setText("共" + (days - 1) + "晚");
      } catch (ParseException e) {
        e.printStackTrace();
      }
    } else {
    //這里使用sp傳的值
      inday = pro.getString("dateIn", "");
      outday = pro.getString("dateOut", "");
      try {
        String changeDate = MyCalendar.format1(inday);
        Date dateIn = simpleDateFormat.parse(inday);
        //將日期轉(zhuǎn)換成周
        String weekIn = MyCalendar.DateToWeek(dateIn);
        home_into_date.setText("" + changeDate + weekIn);
        String outDay = MyCalendar.format1(outday);
        Date dateOut = simpleDateFormat.parse(outday);
        String weekOut = MyCalendar.DateToWeek(dateOut);
        home_out_date.setText("" + outDay + weekOut);
        long days = MyCalendar.getDayDiff(dateIn, dateOut);
        home_total_days.setText("共" + (days - 1) + "晚");
      } catch (ParseException e) {
        e.printStackTrace();
      }

其中有幾個布局,給圖自己寫吧

comm_calendar

這里寫圖片描述 

common_calendar_gridview_item

<LinearLayout
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:gravity="center"
    android:orientation="vertical">

    <LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:gravity="center"
      android:orientation="vertical">

      <TextView
        android:id="@+id/tv_calendar_day"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center"
        android:textSize="15sp" />

      <TextView
        android:id="@+id/tv_calendar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center"
        android:textColor="#FFFFFF"
        android:textSize="15sp" />
    </LinearLayout>

    <View
      android:layout_width="match_parent"
      android:layout_height="0.5dp"
      android:background="#E4E4E4" />
  </LinearLayout>

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Android編程實(shí)現(xiàn)擦除Bitmap中某一塊的方法

    Android編程實(shí)現(xiàn)擦除Bitmap中某一塊的方法

    這篇文章主要介紹了Android編程實(shí)現(xiàn)擦除Bitmap中某一塊的方法,涉及Android操作Bitmap顏色像素值調(diào)整的相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下
    2015-11-11
  • Android中menu使用詳解

    Android中menu使用詳解

    本文通過實(shí)例代碼給大家分享android中menu的使用,感興趣的朋友一起看看吧
    2017-10-10
  • Flutter懸浮按鈕FloatingActionButton使用詳解

    Flutter懸浮按鈕FloatingActionButton使用詳解

    本文主要介紹了Flutter懸浮按鈕FloatingActionButton使用,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-07-07
  • Android實(shí)現(xiàn)爆炸式菜單按鈕彈出效果

    Android實(shí)現(xiàn)爆炸式菜單按鈕彈出效果

    這篇文章主要介紹了Android實(shí)現(xiàn)爆炸式菜單按鈕彈出效果,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-05-05
  • android多開器解析與檢測實(shí)現(xiàn)方法示例

    android多開器解析與檢測實(shí)現(xiàn)方法示例

    最近有業(yè)務(wù)上的要求,要求app在本地進(jìn)行諸如軟件多開、hook框架、模擬器等安全檢測,防止作弊行為,下面這篇文章主要給大家介紹了關(guān)于android多開器解析與檢測實(shí)現(xiàn)的相關(guān)資料,需要的朋友可以參考下
    2021-08-08
  • Flutter 仿微信支付界面

    Flutter 仿微信支付界面

    網(wǎng)傳微信支付頁面的第三方鏈接一個格子需要廣告費(fèi)1一個億,微信支付頁非常適合做功能導(dǎo)航,本篇使用 ListView和 GridView 模仿了微信支付的頁面,同時(shí)介紹了如何裝飾一個組件的背景和邊緣樣式。
    2021-05-05
  • Android編程實(shí)現(xiàn)短信收發(fā)及語音播報(bào)提示功能示例

    Android編程實(shí)現(xiàn)短信收發(fā)及語音播報(bào)提示功能示例

    這篇文章主要介紹了Android編程實(shí)現(xiàn)短信收發(fā)及語音播報(bào)提示功能,結(jié)合實(shí)例形式分析了Android實(shí)現(xiàn)短信的接收、發(fā)送以及相應(yīng)的語音播報(bào)提示功能相關(guān)操作技巧,需要的朋友可以參考下
    2017-08-08
  • Android中的二維碼生成與掃描功能

    Android中的二維碼生成與掃描功能

    二維碼在我們身邊真的非常普遍,今天小編給大家分享二維碼生成與掃描功能,依然使用目前比較流行的zxing方法,具體實(shí)現(xiàn)思路大家通過本文一起學(xué)習(xí)吧
    2017-01-01
  • Android?nonTransitiveRClass資源沖突問題淺析

    Android?nonTransitiveRClass資源沖突問題淺析

    這篇文章主要介紹了Android?nonTransitiveRClass資源沖突問題,別搞錯了,nonTransitiveRClass不能解決資源沖突,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧
    2022-12-12
  • Android使用RSA加密和解密的示例代碼

    Android使用RSA加密和解密的示例代碼

    本篇文章主要介紹了Android使用RSA加密和解密的示例代碼,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-10-10

最新評論