Friday, November 27, 2015

Android - How change the background color of the Action Bar

It is easy to change the background color of the Action Bar without modify style xml.
You can change the background color by below code.
 // Change the background color into red.
 getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xFFFF0000));

Example : 
[Before to change color]



[After to change color]

[Full Source]
import android.graphics.drawable.ColorDrawable;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
public class ActionBarTestActivity extends ActionBarActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_action_bar_test);
        // Change the background color into red.
        getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xFFFF0000));
    }
}


Thursday, November 26, 2015

Creating Swipe Views of Android App with Tabs

1. Create a New Android Project.

2. Input the Application Name & Company Domain and click the Next button.


3. Select the Minimum SDK and click the Next button.



4. Select the Tabbed Activity and click the Next button.


5. Select the Action Bar Tabs(with ViewPager) on the Navigation Style and click the Finish button.



6. If below errors occurs while building Android Project, you have to change appcompat version 23.1.1 into 22.1.1.
  (If your project SDK version is over 23, you can build new project without errors.)



Tuesday, June 23, 2015

How to restart a frozen Galaxy S6



When your Galaxy S6 hangs, you press "Turn down volume button" and "Power button" for 7 sec.
So Galaxy S6 is restarted.

Remove the briefing screen from Galaxy S6

The briefing screen is default setting on Galaxy S6.
Below image is the briefing screen.

How to remove the briefing screen form Galaxy S6.

1. Long touch on the home scree.

2. Move to the left end of home screen.

3. Uncheck the briefing box.




Add/Remove Home screen of Galaxy S6

1. Add Home screen page
(1) Long touch Home screen without app's icons.

(2) Move to the right of Home screen page

(3) Touch "+" icon. So Your Galaxy S6 is added Home screen page.


2. Remove Home screen page
(1) Long touch Home screen without app's icons.

(2) Long touch Home screen page.
 (3) Put Home screen page on the Remove icon.