use of com.huetoyou.chatexchange.ui.misc.HueUtils in project ChatExchange by HueToYou.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Fabric.with(this, new Crashlytics());
setContentView(R.layout.activity_main);
hueUtils = new HueUtils();
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mEditor = mSharedPrefs.edit();
mEditor.apply();
mHandler = new Handler();
// mEditor.putInt("tabIndex", 0).apply();
mUseDark = mSharedPrefs.getBoolean("isDarkMode", false);
mFragmentManager = getSupportFragmentManager();
mIntent = getIntent();
setup();
hueUtils.setActionBarColorDefault(this);
hueUtils.setAddChatFabColorDefault(this);
//ColorPickerDialog.newBuilder().setColor(color).show(activity);
}
use of com.huetoyou.chatexchange.ui.misc.HueUtils in project ChatExchange by HueToYou.
the class PreferencesActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(android.R.id.content, new MyPreferenceFragment()).commit();
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
hueUtils = new HueUtils();
hueUtils.setActionBarColorDefault(this);
}
use of com.huetoyou.chatexchange.ui.misc.HueUtils in project ChatExchange by HueToYou.
the class HelpActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_help);
HueUtils hueUtils = new HueUtils();
hueUtils.setActionBarColorDefault(this);
}
use of com.huetoyou.chatexchange.ui.misc.HueUtils in project ChatExchange by HueToYou.
the class AboutActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
HueUtils hueUtils = new HueUtils();
hueUtils.setActionBarColorDefault(this);
}
use of com.huetoyou.chatexchange.ui.misc.HueUtils in project ChatExchange by HueToYou.
the class ChatFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
view = inflater.inflate(R.layout.fragment_chat, container, false);
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
hueUtils = new HueUtils();
// configure the SlidingMenu
mSlidingMenu = new SlidingMenu(getActivity());
mSlidingMenu.setMode(SlidingMenu.RIGHT);
mSlidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
mSlidingMenu.setShadowWidthRes(R.dimen.shadow_width);
mSlidingMenu.setShadowDrawable(new ColorDrawable(getResources().getColor(R.color.transparentGrey)));
// mSlidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
// mSlidingMenu.setBehindOffset((int)(dpWidth + getResources().getDimension(R.dimen.user_tile_width)));
// mSlidingMenu.setLayoutParams(new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
mSlidingMenu.setBehindWidthRes(R.dimen.sliding_menu_width);
mSlidingMenu.setFadeDegree(0.35f);
mSlidingMenu.attachToActivity(getActivity(), SlidingMenu.SLIDING_CONTENT);
mSlidingMenu.setMenu(R.layout.users_slideout);
Bundle args = getArguments();
String chatUrl = args.getString("chatUrl", "ERROR");
mAppBarColor = args.getInt("AppBarColor", -1);
addChatButtons(chatUrl);
ParseUsers asyncTask = new ParseUsers();
CancelTask canceller = new CancelTask(asyncTask);
Handler handler = new Handler();
handler.postDelayed(canceller, 10000);
asyncTask.execute(chatUrl);
getActivity().setTitle(args.getString("chatTitle", "Error"));
//call addUser() here somehow....
return view;
}
Aggregations