Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Working PLEASE HELP! #146

Open
utsahk opened this issue May 30, 2018 · 0 comments
Open

Not Working PLEASE HELP! #146

utsahk opened this issue May 30, 2018 · 0 comments

Comments

@utsahk
Copy link

utsahk commented May 30, 2018

I am new to Android Coding, and I want to import this, but I do not understand how to do so. I am getting many errors and its not working, can someone give me a sample code of how to import or a video tutorial, as I followed all the steps and its not working. PLEASE Help!

Here is my main ERROR:
screen shot 2018-05-30 at 10 16 10 am

Here is my Code:

'import android.content.Intent;
import android.graphics.RectF;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.TypedValue;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.PopupMenu;
import android.widget.Toast;

import com.github.tibolte.agendacalendarview.AgendaCalendarView;
import com.github.tibolte.agendacalendarview.CalendarPickerController;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.models.DayItem;

import com.alamkanak.weekview.DateTimeInterpreter;
import com.alamkanak.weekview.MonthLoader;
import com.alamkanak.weekview.WeekView;
import com.alamkanak.weekview.WeekViewEvent;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import java.util.ArrayList;

import java.util.List;

public abstract class MainActivity extends AppCompatActivity implements WeekView.EventClickListener, MonthLoader.MonthChangeListener, WeekView.EventLongPressListener, WeekView.EmptyViewLongPressListener, android.support.v7.widget.PopupMenu.OnMenuItemClickListener {

private static final int TYPE_DAY_VIEW = 1;
private static final int TYPE_THREE_DAY_VIEW = 2;
private static final int TYPE_WEEK_VIEW = 3;
private int mWeekViewType = TYPE_THREE_DAY_VIEW;
private WeekView mWeekView;
private ImageButton buttonActivity;
AgendaCalendarView mAgendaCalendarView;

private static String eventsName = "Study 2Maths";

public static String getEventsName() {
    return eventsName;
}

public static void setEventsName(String eventsName) {
    MainActivity.eventsName = eventsName;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // minimum and maximum date of our calendar
    // 2 month behind, one year ahead, example: March 2015 <-> May 2015 <-> May 2016
    Calendar minDate = Calendar.getInstance();
    Calendar maxDate = Calendar.getInstance();

    minDate.add(Calendar.MONTH, -2);
    minDate.set(Calendar.DAY_OF_MONTH, 1);
    maxDate.add(Calendar.YEAR, 1);

    List<CalendarEvent> eventList = new ArrayList<>();
    mockList(eventList);

    mAgendaCalendarView.init(eventList, minDate, maxDate, Locale.getDefault(), this);
    mAgendaCalendarView.enableCalendarView(true);

}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant