@Override
 protected View initView(LayoutInflater inflater) {
   view = inflater.inflate(R.layout.b1_server_comment_fragment, null);
   ButterKnife.inject(this, view);
   footView = View.inflate(getActivity(), R.layout.footview_loading, null);
   return view;
 }
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   View view = inflater.inflate(R.layout.fragment_auto_load, container, false);
   ButterKnife.inject(this, view);
   return view;
 }
  @SuppressWarnings("deprecation")
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_scroll, container, false);
    ButterKnife.inject(this, rootView);

    initRollInformation(rootView);

    setOnclickListener();

    WindowManager wm = getActivity().getWindowManager();
    width = wm.getDefaultDisplay().getWidth();
    //        int leftMargin = width / 3;
    //        int caculateW = width - leftMargin;
    int dpW = ScreenUtil.dp2px(getActivity(), 100);

    int _width = (width - dpW) / mRow;

    // If we do this we need to uncomment the container on the xml layout
    createListBuddiesLayoutDinamically(rootView);
    // mImagesLeft.addAll(Arrays.asList(ImagesUrls.imageUrls_left));
    // mImagesRight.addAll(Arrays.asList(ImagesUrls.imageUrls_right));
    initData(_width);
    //		mListBuddies.setOnItemClickListener(this);
    return rootView;
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_phetch);

    ButterKnife.inject(this);
  }
Beispiel #5
0
  @Override
  public void onCreate(final Bundle savedInstanceState) {
    // don't call the super implementation with the layout argument, as that would set the wrong
    // theme
    super.onCreate(savedInstanceState);

    // Disable the up navigation for this activity
    getSupportActionBar().setDisplayHomeAsUpEnabled(false);

    setContentView(R.layout.main_activity);
    ButterKnife.inject(this);

    if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
      // If we had been open already, start from the last used activity.
      finish();
      return;
    }

    setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); // type to search

    version = Version.getVersionCode(this);
    Log.i(
        "Starting " + getPackageName() + ' ' + version + " a.k.a " + Version.getVersionName(this));

    init();

    checkShowChangelog();
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_image_process);
    ButterKnife.inject(this);
    EffectUtil.clear();
    initView();
    initEvent();
    initStickerToolBar();

    ImageUtils.asyncLoadImage(
        this,
        getIntent().getData(),
        new ImageUtils.LoadImageCallback() {
          @Override
          public void callback(Bitmap result) {
            currentBitmap = result;
            mGPUImageView.setImage(currentBitmap);
          }
        });

    ImageUtils.asyncLoadSmallImage(
        this,
        getIntent().getData(),
        new ImageUtils.LoadImageCallback() {
          @Override
          public void callback(Bitmap result) {
            smallImageBackgroud = result;
          }
        });
  }
 /**
  * Provide default implementation to return a simple list view. Subclasses can override to replace
  * with their own layout. If doing so, the returned view hierarchy <em>must</em> have a ListView
  * whose id is {@link android.R.id#list android.R.id.list} and can optionally have a sibling view
  * id {@link android.R.id#empty android.R.id.empty} that is to be shown when the list is empty.
  *
  * <p>If you are overriding this method with your own custom content, consider including the
  * standard layout {@link android.R.layout#list_content} in your layout file, so that you continue
  * to retain all of the standard behavior of ListFragment. In particular, this is currently the
  * only way to have the built-in indeterminant progress state be shown.
  */
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   View v = inflater.inflate(R.layout.fragment_recycler_view, container, false);
   ButterKnife.inject(this, v);
   return v;
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    if (DEBUG) {
      MinicRPCLog.d(TAG, "onCreateView");
    }

    View view = View.inflate(getActivity(), R.layout.fragment_smsbless, null);
    ButterKnife.inject(this, view);

    // init fragments
    mFragments[0] = new FA();
    mFragments[1] = new FB();
    mFragments[2] = new FC();
    mFragments[3] = new FD();

    // init
    mTitle = getActivity().getResources().getStringArray(R.array.sms_bless);

    if (DEBUG) {
      MinicRPCLog.d(TAG, "%s, %s, %s, %s", mTitle);
    }

    mAdapter = new MyAdapter(getChildFragmentManager());
    mPager.setAdapter(mAdapter);
    mIndicator.setViewPager(mPager);
    mIndicator.setCurrentItem(0);
    return view;
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_profile, container, false);
    ButterKnife.inject(this, view);

    if (!ParseUser.getCurrentUser().isNew()) {
      isEdit = true;
    }

    if (isEdit) {
      inputName.setVisibility(View.GONE);
      inputSurname.setVisibility(View.GONE);
      layoutSex.setVisibility(View.GONE);
      layoutBloodType.setVisibility(View.GONE);
      layoutRh.setVisibility(View.GONE);

      showProgress();
      User.getInstance()
          .getUserData(
              new GetCallback<ParseObject>() {
                @Override
                public void done(final ParseObject parseObject, ParseException e) {
                  inputAddress.setText(parseObject.getString(User.ADDRESS));
                  inputAdditional.setText(parseObject.getString(User.ADDITIONAL));
                  hideProgress();
                }
              });
    }

    profilePresenter = new ProfilePresenterImpl(this);

    return view;
  }
  // region Lifecycle Methods
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_quick_return_twitter);
    ButterKnife.inject(this);

    mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager());

    // Set up the ViewPager with the sections adapter.
    mViewPager.setAdapter(mSectionsPagerAdapter);

    mTabs.setAllCaps(false);
    mTabs.setShouldExpand(true);
    mTabs.setTextSize(QuickReturnUtils.dp2px(this, 16));
    mTabs.setTabBackground(R.drawable.selector_bg_tab);
    mTabs.setIndicatorColorResource(R.color.steel_blue);
    mTabs.setIndicatorHeight(QuickReturnUtils.dp2px(this, 5));
    mTabs.setOnPageChangeListener(mTabsOnPageChangeListener);
    mTabs.setViewPager(mViewPager);

    // Set first tab selected
    mTabsLinearLayout = ((LinearLayout) mTabs.getChildAt(0));

    for (int i = 0; i < mTabsLinearLayout.getChildCount(); i++) {
      TextView tv = (TextView) mTabsLinearLayout.getChildAt(i);

      if (i == 0) {
        tv.setTextColor(getResources().getColor(R.color.steel_blue));
        tv.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/Roboto-Medium.ttf"));
      } else {
        tv.setTextColor(getResources().getColor(R.color.steel_blue));
        tv.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/Roboto-Light.ttf"));
      }
    }
  }
 @DebugLog
 @Override
 protected void onFinishInflate() {
   super.onFinishInflate();
   ButterKnife.inject(this, getRootView());
   mInflated = true;
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_image_process);
    ButterKnife.inject(this);
    EffectUtil.clear();
    initView();
    initEvent();

    ImageUtils.asyncLoadImage(
        this,
        getIntent().getData(),
        result -> {
          currentBitmap = result;
          imageView.setImageBitmap(currentBitmap);
        });

    Bundle bundle = getIntent().getExtras();
    if (bundle != null) {
      feedItem = (FeedItem) bundle.getSerializable("lables");
      for (TagItem tagItem : feedItem.getTagList()) {
        addLable(tagItem);
      }
    }
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    if (getActivity().getActionBar() != null)
      getActivity().getActionBar().setDisplayHomeAsUpEnabled(true);
    rootView = inflater.inflate(R.layout.fragment_client, container, false);
    setHasOptionsMenu(true);
    context = getActivity().getApplicationContext();
    ButterKnife.inject(this, rootView);

    swipeRefreshLayout.setColorScheme(
        R.color.blue_light, R.color.green_light, R.color.orange_light, R.color.red_light);
    swipeRefreshLayout.setOnRefreshListener(
        new SwipeRefreshLayout.OnRefreshListener() {
          @Override
          public void onRefresh() {
            // Do Nothing For Now
            swipeRefreshLayout.setRefreshing(false);
          }
        });

    fetchClientList();

    return rootView;
  }
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    ButterKnife.inject(this, view);

    mRecyclerView.setLayoutManager(new LinearLayoutManager(view.getContext()));

    mAdapter = new ApplicationAdapter(new ArrayList<>(), R.layout.applications_list_item);
    mRecyclerView.setAdapter(mAdapter);

    mSwipeRefreshLayout.setColorSchemeColors(getResources().getColor(R.color.myPrimaryColor));
    mSwipeRefreshLayout.setProgressViewOffset(
        false,
        0,
        (int)
            TypedValue.applyDimension(
                TypedValue.COMPLEX_UNIT_DIP, 24, getResources().getDisplayMetrics()));

    // Progress
    mSwipeRefreshLayout.setEnabled(false);
    mSwipeRefreshLayout.setRefreshing(true);
    mRecyclerView.setVisibility(View.GONE);

    List<AppInfo> apps = ApplicationsList.getInstance().getList();

    loadList(apps);
  }
Beispiel #15
0
 @Override
 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
   super.onViewCreated(view, savedInstanceState);
   ButterKnife.inject(this, view);
   listView.setEmptyView(emptyView);
   listView.setAdapter(adapter);
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    ButterKnife.inject(this);

    // Config Strict Mode
    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
    StrictMode.setThreadPolicy(policy);

    sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);

    checkLogin();

    _loginButton.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View v) {
            login();
          }
        });

    _signupLink.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View v) {
            // Start the Signup activity
            Intent intent = new Intent(getApplicationContext(), SignupActivity.class);
            startActivityForResult(intent, REQUEST_SIGNUP);
          }
        });
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ViewGroup root =
        (ViewGroup) inflater.inflate(R.layout.fragment_default_view_pager, container, false);
    ButterKnife.inject(this, root);

    Bundle tvArgs = new Bundle(), radioArgs = new Bundle();
    if (getArguments() != null) {
      tvArgs.putAll(getArguments());
      radioArgs.putAll(getArguments());
    }
    tvArgs.putInt(PVR_LIST_TYPE_KEY, LIST_TV_CHANNELS);
    radioArgs.putInt(PVR_LIST_TYPE_KEY, LIST_RADIO_CHANNELS);

    tabsAdapter =
        new TabsAdapter(getActivity(), getChildFragmentManager())
            .addTab(PVRChannelsListFragment.class, tvArgs, R.string.tv_channels, 1)
            .addTab(PVRChannelsListFragment.class, radioArgs, R.string.radio_channels, 2)
            .addTab(PVRRecordingsListFragment.class, getArguments(), R.string.recordings, 3);

    viewPager.setAdapter(tabsAdapter);
    pagerTabStrip.setViewPager(viewPager);

    return root;
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_detail);
    ButterKnife.inject(this);

    postponeEnterTransition();
    mPager
        .getViewTreeObserver()
        .addOnPreDrawListener(
            new ViewTreeObserver.OnPreDrawListener() {
              public boolean onPreDraw() {
                mPager.getViewTreeObserver().removeOnPreDrawListener(this);
                startPostponedEnterTransition();
                return true;
              }
            });

    List<String> list = new ArrayList<String>();
    list.add("http://a1.zassets.com/images/z/3/0/2/7/2/8/3027286-p-MULTIVIEW.jpg");
    list.add("http://a1.zassets.com/images/z/2/7/2/7/3/3/2727332-p-MULTIVIEW.jpg");
    list.add("http://a3.zassets.com/images/z/2/7/3/4/1/0/2734106-p-MULTIVIEW.jpg");
    list.add("http://a3.zassets.com/images/z/2/8/1/4/5/4/2814541-p-MULTIVIEW.jpg");

    PhotoAdapter adapter = new PhotoAdapter(this, list);
    mPager.setAdapter(adapter);
  }
  @Override
  public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
    super.onCreate(savedInstanceState, persistentState);
    setContentView(R.layout.activity_add_coupon);

    isGreaterThanKITKAT();

    ButterKnife.inject(this);

    presenter = new AddCouponPresenter(this, this);

    binding.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            if (StringUtils.isBlank(coupon_number.getText().toString())) {
              ToastUtil.showMessage(AddCouponActivity.this, "ÇëÊäÈëÓÅ»ÝȯºÅ");
              return;
            }
            if (StringUtils.isBlank(coupon_password.getText().toString())) {
              ToastUtil.showMessage(AddCouponActivity.this, "ÇëÊäÈëÓÅ»ÝȯÃÜÂë");
              return;
            }
            presenter.binding(
                coupon_number.getText().toString(), coupon_password.getText().toString());
          }
        });
  }
 public View onCreateView(
     LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle) {
   paramLayoutInflater = paramLayoutInflater.inflate(2130903134, null);
   ButterKnife.inject(this, paramLayoutInflater);
   setHasOptionsMenu(true);
   return paramLayoutInflater;
 }
 @Override
 protected void onFinishInflate() {
   super.onFinishInflate();
   ButterKnife.inject(this);
   String pickedview = settings.getString(NOW_PLAYING_VIEW, NOW_PLAYING_VIEW_ARTWORK);
   switch (pickedview) {
     case NOW_PLAYING_VIEW_VIS_CIRCLE:
     case NOW_PLAYING_VIEW_VIS_CIRCLE_BAR:
     case NOW_PLAYING_VIEW_VIS_LINES:
       visualizerView =
           ViewUtils.inflate(getContext(), R.layout.now_playing_visualization, placeholder, false);
       placeholder.addView(visualizerView);
       initVisualizer(pickedview);
       break;
     case NOW_PLAYING_VIEW_ARTWORK:
     default:
       artwork = ViewUtils.inflate(getContext(), R.layout.now_playing_artwork, placeholder, false);
       placeholder.addView(artwork);
       initArtwork();
       break;
   }
   if (!VersionUtils.hasLollipop()) {
     seekBar
         .getThumb()
         .mutate()
         .setColorFilter(ThemeUtils.getColorAccent(getContext()), PorterDuff.Mode.SRC_IN);
   }
   PlaybackDrawableTint.repeatDrawable36(repeat);
   PlaybackDrawableTint.shuffleDrawable36(shuffle);
   if (!isInEditMode()) presenter.takeView(this);
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (fullScreen()) {
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getWindow()
          .setFlags(
              WindowManager.LayoutParams.FLAG_FULLSCREEN,
              WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
    setContentView(resLayoutId());

    ButterKnife.inject(this);

    if (!fullScreen()) {
      ActionBar mActionBar = getSupportActionBar();
      if (mActionBar != null) {
        mActionBar.setDisplayShowTitleEnabled(displayTitle());
        mActionBar.setDisplayHomeAsUpEnabled(displayHomeUp());
        mActionBar.setHomeButtonEnabled(homeButton());
      }
    }

    provideOnCreate(savedInstanceState);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_pick_up);
    ButterKnife.inject(this);

    Button btnSend = (Button) this.findViewById(R.id.button);
    btnSend.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            // チェックされたラジオボタンのテキストを取得
            RadioGroup rgPlace = (RadioGroup) findViewById(R.id.rg_place);
            int checkedId = rgPlace.getCheckedRadioButtonId();
            String strPlace = ((RadioButton) findViewById(checkedId)).getText().toString();
            // 件名を取得
            EditText edit01 = (EditText) findViewById(R.id.editText);
            String title = edit01.getText().toString();

            Resources res = getResources();
            Uri uri = Uri.parse("mailto:" + res.getString(R.string.mail_to));

            Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
            intent.putExtra(Intent.EXTRA_SUBJECT, title);
            intent.putExtra(Intent.EXTRA_TEXT, strPlace + "に迎えにきて");
            startActivity(intent);
          }
        });
  }
  public void show() {
    ButterKnife.inject(this, mDialog);

    mLevelPreviousButton.setOnClickListener(
        v -> {
          mChosenLevel = mChosenLevel - 1;
          updateDialog();
        });

    mLevelNextButton.setOnClickListener(
        v -> {
          mChosenLevel = mChosenLevel + 1;
          updateDialog();
        });

    mLevelConfirmButton.setOnClickListener(
        v -> {
          Exercise chosenExercise = mExercise.getSection().getExercises().get(mChosenLevel);

          RoutineStream.getInstance().setLevel(chosenExercise, mChosenLevel);

          mDialog.dismiss();
        });

    mLevelProgressBar.setWheelSize(12);
    mLevelProgressBar.setProgressColor(Color.parseColor("#009688")); // 00453E
    mLevelProgressBar.setProgressBackgroundColor(Color.parseColor("#00453E"));

    updateDialog();

    mDialog.show();
  }
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    ButterKnife.inject(this, view);
    mLayoutManager = new LinearLayoutManager(getActivity());
    mRecyclerView.setLayoutManager(mLayoutManager);
    /** 上拉加载更多,加载beforeDailyStories */
    mRecyclerView.setOnLoadMoreListener(
        new LoadMoreRecyclerView.OnLoadMoreListener() {
          @Override
          public void onLoadMore() {
            loadMore();
          }

          @Override
          public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            LogUtils.d(TAG, dy + "");
            changeActionBarTitle(dy);
          }
        });
    mSwipeRefreshLayout.setColorSchemeResources(
        android.R.color.holo_blue_dark,
        android.R.color.holo_blue_light,
        android.R.color.holo_green_light,
        android.R.color.holo_green_light);
    /** 下拉刷新,加载latestDailyStories */
    mSwipeRefreshLayout.setOnRefreshListener(
        new SwipeRefreshLayout.OnRefreshListener() {
          @Override
          public void onRefresh() {
            refresh();
          }
        });
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.inject(this);

    mapView.addLayer(
        new ArcGISTiledMapServiceLayer(
            "http://cache1.arcgisonline.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer"));

    layer = new GraphicsLayer();
    mapView.addLayer(layer);

    mapView.getLocationDisplayManager().start();
    mapView.getLocationDisplayManager().setLocationListener(this);

    try {
      client =
          new MqttAndroidClient(
              this, "tcp://broker.mqttdashboard.com:1883", "Likaci/MqttMap/" + id);
      client.setCallback(this);
      MqttConnectOptions options = new MqttConnectOptions();
      options.setKeepAliveInterval(10);
      options.setConnectionTimeout(1000);
      options.setCleanSession(false);
      client.connect(options, null, this);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 @Override
 protected void onFinishInflate() {
   super.onFinishInflate();
   ButterKnife.inject(this);
   setText(mText);
   setLeftIcon(mLeftIcon);
 }
 @Override
 public View onCreateView(
     LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
   View layout = inflater.inflate(R.layout.fragment_rxbus_bottom, container, false);
   ButterKnife.inject(this, layout);
   return layout;
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_reminder_view);
    ButterKnife.inject(this);

    activityContext = this;

    initValues();
    initViews();

    mMapEngine = MapEngine.getInstance(this);
    mMapEngine.init(
        new OnEngineInitListener() {

          @Override
          public void onEngineInitializationCompleted(Error error) {
            Log.i(TAG, "onEngineInitializationCompleted");
            Log.i(TAG, "error : " + error);

            if (error == Error.NONE) {
              placesList = new ArrayList<Place>();
              mLocationACTV.addTextChangedListener(mTextWatcher);
              mLocationACTV.setOnItemClickListener(new PlaceAdapterItemClickedListener());
            }
          }
        });
  }
Beispiel #30
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.inject(this);
    mProgressBar.setVisibility(View.INVISIBLE);
    final double latitude = 37.8267;
    final double longitude = -122.423;

    // Create a GoogleApiClient instance
    mGoogleApiClient =
        new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(LocationServices.API)
            .build();
    mGoogleApiClient.connect();

    mRefreshImageView.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            getForecast(mLatitude, mLongitude);
          }
        });

    // getForecast(latitude, longitude);

    Log.d(TAG, "Main UI code is running!");
  }