Postingan

ActionBar subtitle

getActionBar().setSubtitle("Your Subtitle");

ActionBar Backhome

getActionBar().setDisplayHomeAsUpEnabled(true); /* */} @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { int itemId = item.getItemId(); switch (itemId) { case android.R.id.home: finish(); break; } return true;

ActionBar Color

//ActionBar Color ActionBar actionBar = getActionBar(); actionBar.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(Color.parseColor("#191919"))); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {     Window w = MainActivity.this.getWindow();     w.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);     w.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);     w.setStatusBarColor(Color.parseColor("#000000")); }

ActionBar hide

getActionBar().hide();

ActionBar menu

} @Override public boolean onCreateOptionsMenu(Menu menu){ menu.add("Code").setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); menu.add("MoreBlock").setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); return true; } @Override public boolean onOptionsItemSelected(final MenuItem item) { switch (item.getTitle().toString()) { case "Code": showMessage("code clicked"); return true; case "Moreblock": showMessage("moreblock clicked"); return true; default: return super.onOptionsItemSelected(item); }

ActionBar show

getActionBar().show();

ActionBar Background image

ActionBar ab = getActionBar(); ab.setBackgroundDrawable(getDrawable(R.drawable.image_id));

ActionBar back button

getActionBar().setDisplayHomeAsUpEnabled(true); /* */} @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { int itemId = item.getItemId(); switch (itemId) { case android.R.id.home: finish(); break; } return true;

ActionBar Block Capture

getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);

ActionBar Custom

final ActionBar actionBar = getActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); LayoutInflater inflater = (LayoutInflater) this .getSystemService(Context.LAYOUT_INFLATER_SERVICE); //add your own Layout R.layout.your View view = inflater.inflate(R.layout.myview, null); //find widget to be used in onClick ImageView img = (ImageView) view.findViewById(R.id.imageview1); //listener for widget img.setOnClickListener(new View.OnClickListener(){     public void onClick(View v){         // add your  code inside this onClick bracket     } }); actionBar.setCustomView(view); actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);

ActionBar Flag no Limit

i f (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {     w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); }

ActionBar Fullscreen

//full screen getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); //unfullscreen getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

ActionBar Hardware Accelerate

getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

ActionBar RGB title

String Int_title = String.format(Locale.US, "#%06X", (0xFFFFFF & Color.argb(120,50,90,10))); //or getActionBar().setTitle(Html.fromHtml("<font color=\\"" + Int_title + "\\">Gabriel</font>"));

ActionBar Screen on

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); //For Remove getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

ActionBar Seticon

getActionBar().setIcon(r.drawable.icon_name);  

ActionBar Shadow

getActionBar().setElevation(0);

ActionBar title Color

getActionBar().setTitle(Html.fromHtml("<font color='#78d68e'>Your Title</font>"));

Animation Blink with Alpha

ObjectAnimator anim = ObjectAnimator.ofFloat(text, "Alpha", 0, 1); anim.setRepeatMode(ObjectAnimator.REVERSE); anim.setRepeatCount(ObjectAnimator.INFINITE); anim.setDuration(700); anim.start();

Cara pembuatan Apps paling Populer

TextInputLayout in Sketchware

Create Stopwatch App in Android using Sketchware

How to enable download in webview in Sketchware apps?

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

Create Stopwatch App in Android using Sketchware

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

Code for implementing Notifications in Sketchware

Firebase Login/Register with email verification