use of com.mta.tehreer.graphics.Typeface in project Tehreer-Android by mta452.
the class OpenTypeShapingActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_opentype_shaping);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
Spinner typefaceSpinner = findViewById(R.id.spinner_typeface);
typefaceSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
mTypeface = (Typeface) adapterView.getAdapter().getItem(i);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
typefaceSpinner.setAdapter(new TypefaceAdapter(this));
typefaceSpinner.setSelection(0);
mTypeSizeField = findViewById(R.id.field_type_size);
mScriptTagField = findViewById(R.id.field_script_tag);
mLanguageTagField = findViewById(R.id.field_language_tag);
mTextField = findViewById(R.id.field_text);
}
use of com.mta.tehreer.graphics.Typeface in project Tehreer-Android by mta452.
the class TypefaceInfoActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_typeface_info);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
Spinner typefaceSpinner = findViewById(R.id.spinner_typeface);
typefaceSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
loadTypeface((Typeface) adapterView.getAdapter().getItem(i));
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
typefaceSpinner.setAdapter(new TypefaceAdapter(this));
typefaceSpinner.setSelection(0);
}
Aggregations