This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme"> | |
<activity android:name=".MainActivity"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Button button=(Button)findViewById(R.id.button); | |
Button button2=(Button)findViewById(R.id.button2); | |
button.setBackgroundColor(getResources().getColor(R.color.grey_100)); | |
button2.setBackgroundColor(getResources().getColor(R.color.grey_100)); | |
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) button.getLayoutParams(); | |
params.leftMargin=7; | |
params.rightMargin=7; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ActivityName extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
// remove title | |
requestWindowFeature(Window.FEATURE_NO_TITLE); | |
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, | |
WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can change the name that is shown in the title bar in the file ".idea/.name". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add dependency | |
compile 'uk.co.chrisjenx:calligraphy:2.2.0' | |
------------------------------------------------ | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() | |
.setDefaultFontPath("fonts/irsensnumeral.ttf") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Splash extends Activity { | |
/** Duration of wait **/ | |
private final int SPLASH_DISPLAY_LENGTH = 1000; | |
/** Called when the activity is first created. */ | |
@Override | |
public void onCreate(Bundle icicle) { | |
super.onCreate(icicle); | |
requestWindowFeature(Window.FEATURE_NO_TITLE); |
OlderNewer