Search in sources :

Example 51 with AppCompatActivity

use of android.support.v7.app.AppCompatActivity in project Remindy by abicelis.

the class TextAttachmentViewHolder method handleTextEdit.

private void handleTextEdit() {
    FragmentManager fm = ((AppCompatActivity) mActivity).getSupportFragmentManager();
    EditTextAttachmentDialogFragment dialog = EditTextAttachmentDialogFragment.newInstance(mText.getText().toString());
    dialog.setListener(this);
    dialog.show(fm, "EditTextAttachmentDialogFragment");
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) AppCompatActivity(android.support.v7.app.AppCompatActivity) EditTextAttachmentDialogFragment(ve.com.abicelis.remindy.app.dialogs.EditTextAttachmentDialogFragment)

Example 52 with AppCompatActivity

use of android.support.v7.app.AppCompatActivity in project Remindy by abicelis.

the class ListItemAttachmentViewHolder method handleListItemEdit.

private void handleListItemEdit(boolean isANewItem) {
    FragmentManager fm = ((AppCompatActivity) mActivity).getSupportFragmentManager();
    EditListItemAttachmentDialogFragment dialog = EditListItemAttachmentDialogFragment.newInstance(isANewItem, mText.getText().toString());
    dialog.setListener(this);
    dialog.show(fm, "EditLinkAttachmentDialogFragment");
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) AppCompatActivity(android.support.v7.app.AppCompatActivity) EditListItemAttachmentDialogFragment(ve.com.abicelis.remindy.app.dialogs.EditListItemAttachmentDialogFragment)

Example 53 with AppCompatActivity

use of android.support.v7.app.AppCompatActivity in project ChatExchange by HueToYou.

the class HueUtils method setActionBarColorDefault.

public void setActionBarColorDefault(AppCompatActivity activity) {
    if (mSharedPreferences == null) {
        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(activity);
    }
    if (activity != null) {
        ActionBar actionBar = activity.getSupportActionBar();
        if (actionBar != null) {
            int initialColor = mSharedPreferences.getInt("default_color", 0xFF000000);
            actionBar.setBackgroundDrawable(new ColorDrawable(initialColor));
            //Change status bar color too
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                Window window = activity.getWindow();
                // clear FLAG_TRANSLUCENT_STATUS flag:
                window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
                // add FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS flag to the window
                window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
                window.setStatusBarColor(manipulateColor(initialColor, 0.7f));
            }
        }
    }
}
Also used : Window(android.view.Window) ColorDrawable(android.graphics.drawable.ColorDrawable) ActionBar(android.support.v7.app.ActionBar)

Example 54 with AppCompatActivity

use of android.support.v7.app.AppCompatActivity in project weex-example by KalicyZhou.

the class ScreenUtil method getSmartBarHeight.

private static int getSmartBarHeight(AppCompatActivity activity) {
    ActionBar actionbar = activity.getSupportActionBar();
    if (actionbar != null)
        try {
            Class c = Class.forName("com.android.internal.R$dimen");
            Object obj = c.newInstance();
            Field field = c.getField("mz_action_button_min_height");
            int height = Integer.parseInt(field.get(obj).toString());
            return activity.getResources().getDimensionPixelSize(height);
        } catch (Exception e) {
            e.printStackTrace();
            actionbar.getHeight();
        }
    return 0;
}
Also used : Field(java.lang.reflect.Field) ActionBar(android.support.v7.app.ActionBar)

Example 55 with AppCompatActivity

use of android.support.v7.app.AppCompatActivity in project J2ME-Loader by nikita36078.

the class Form method set.

public void set(final int index, final Item item) {
    items.set(index, item).setOwnerForm(null);
    if (item.hasOwnerForm()) {
        throw new IllegalStateException();
    }
    item.setOwnerForm(this);
    if (layout != null) {
        AppCompatActivity a = getParentActivity();
        if (a != null) {
            a.runOnUiThread(() -> {
                layout.removeViewAt(index);
                layout.addView(item.getItemView(), index);
            });
        }
    }
}
Also used : AppCompatActivity(android.support.v7.app.AppCompatActivity)

Aggregations

AppCompatActivity (android.support.v7.app.AppCompatActivity)99 View (android.view.View)43 ActionBar (android.support.v7.app.ActionBar)36 TextView (android.widget.TextView)28 RecyclerView (android.support.v7.widget.RecyclerView)21 ImageView (android.widget.ImageView)17 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)16 Toolbar (android.support.v7.widget.Toolbar)14 BindView (butterknife.BindView)11 Fragment (android.support.v4.app.Fragment)8 PopupMenu (android.support.v7.widget.PopupMenu)8 Transition (android.transition.Transition)7 MenuItem (android.view.MenuItem)7 Intent (android.content.Intent)6 FragmentTransaction (android.support.v4.app.FragmentTransaction)6 TargetApi (android.annotation.TargetApi)5 Activity (android.app.Activity)4 ColorDrawable (android.graphics.drawable.ColorDrawable)4 Bundle (android.os.Bundle)4 FragmentManager (android.support.v4.app.FragmentManager)4