Search in sources :

Example 56 with ActionBar

use of androidx.appcompat.app.ActionBar in project Tehreer-Android by mta452.

the class BidiAlgorithmActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_bidi_algorithm);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    mBidiEditText = findViewById(R.id.bidi_edit_text);
    mBidiEditText.setSelection(mBidiEditText.getText().length());
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 57 with ActionBar

use of androidx.appcompat.app.ActionBar in project Tehreer-Android by mta452.

the class BidiInfoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_bidi_info);
    Intent intent = getIntent();
    mBidiText = String.valueOf(intent.getCharSequenceExtra(BIDI_TEXT));
    mDensity = getResources().getDisplayMetrics().scaledDensity;
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    SpannableStringBuilder builder = new SpannableStringBuilder();
    writeBidiText(builder);
    TextView bidiTextView = findViewById(R.id.text_view_bidi);
    bidiTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
    bidiTextView.setText(builder);
}
Also used : Intent(android.content.Intent) TextView(android.widget.TextView) ActionBar(androidx.appcompat.app.ActionBar) SpannableStringBuilder(android.text.SpannableStringBuilder)

Example 58 with ActionBar

use of androidx.appcompat.app.ActionBar in project Tehreer-Android by mta452.

the class OpenSourceLicensesActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_open_source_licenses);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    WebView licensesView = findViewById(R.id.web_view_licenses);
    licensesView.loadUrl("file:///android_asset/OpenSourceLicenses.html");
}
Also used : WebView(android.webkit.WebView) ActionBar(androidx.appcompat.app.ActionBar)

Example 59 with ActionBar

use of androidx.appcompat.app.ActionBar in project Tehreer-Android by mta452.

the class LabelWidgetActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_label_widget);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    String htmlString = getResources().getString(R.string.article_detail);
    Spanned articleSpanned = Html.fromHtml(htmlString);
    LinkableLabel articleLabel = findViewById(R.id.label_article);
    articleLabel.setSpanned(articleSpanned);
}
Also used : Spanned(android.text.Spanned) ActionBar(androidx.appcompat.app.ActionBar)

Example 60 with ActionBar

use of androidx.appcompat.app.ActionBar in project Tehreer-Android by mta452.

the class TextViewWidgetActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_text_view_widget);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    final TTextView textView = findViewById(R.id.text_view);
    textView.setTypeface(TypefaceManager.getTypeface(R.id.typeface_noorehuda));
    textView.setGravity(Gravity.CENTER_HORIZONTAL);
    textView.setSpanned(parseSurah());
    textView.setLineHeightMultiplier(0.80f);
}
Also used : TTextView(com.mta.tehreer.widget.TTextView) ActionBar(androidx.appcompat.app.ActionBar)

Aggregations

ActionBar (androidx.appcompat.app.ActionBar)139 View (android.view.View)30 Toolbar (androidx.appcompat.widget.Toolbar)29 AppCompatActivity (androidx.appcompat.app.AppCompatActivity)26 TextView (android.widget.TextView)18 Intent (android.content.Intent)11 Bundle (android.os.Bundle)11 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)8 SuppressLint (android.annotation.SuppressLint)7 AdapterView (android.widget.AdapterView)7 ImageView (android.widget.ImageView)7 Uri (android.net.Uri)6 DefaultItemDecoration (com.yanzhenjie.recyclerview.widget.DefaultItemDecoration)6 SharedPreferences (android.content.SharedPreferences)5 ListView (android.widget.ListView)5 Spinner (android.widget.Spinner)5 Typeface (com.mta.tehreer.graphics.Typeface)5 File (java.io.File)5 MenuItem (android.view.MenuItem)4 Button (android.widget.Button)4