GithubHelp home page GithubHelp logo

Comments (8)

mdali92 avatar mdali92 commented on July 30, 2024

Go to dua_detail_item_card.xml and do the following edit :

Basically for txtDuaReference, remove the top padding property and change bottom padding to 5dp, like this :

It should look better now.

screenshot_2015-01-11-11-03-22

from hisnulmuslim.

khalid-hussain avatar khalid-hussain commented on July 30, 2024

Actually I wanted the opposite. I want both the 'translation' and 'reference' to have 10dp padding on the top and bottom.

from hisnulmuslim.

mdali92 avatar mdali92 commented on July 30, 2024

Alright, here is the fix. There is a small trick. Your English translation is using the class TextViewEx and not the standard TextView. This is giving issues when you are adding padding above and below the english text. However, the reference text uses the standard TextView and padding is not an issue there. Therefore, the trick is to add 10dp margin to the divider grid above and below the English text... like this :

           <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginLeft="1dp"
            android:layout_marginRight="1dp"
            android:layout_marginBottom="10dp"
            android:background="@color/card_divider_gray" />

        <classes.TextViewEx
            android:id="@+id/txtDuaTranslation"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center_vertical"
            android:text="English Text"
            android:textSize="14sp" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginLeft="1dp"
            android:layout_marginRight="1dp"
            android:layout_marginTop="10dp"
            android:background="@color/card_divider_gray" />

        <TextView
            android:id="@+id/txtDuaReference"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingBottom="10dp"
            android:paddingTop="10dp"
            android:text="Dua Reference"
            android:textSize="14sp" />

Now the result looks like this :

screenshot_2015-01-11-15-55-03

from hisnulmuslim.

khalid-hussain avatar khalid-hussain commented on July 30, 2024

Following your solution, this is what has been achieved:

I still don't understand why there is this extra spacing. I have a feeling that to creating an efficient solution involves editing TextViewEx.

JazakAllahu khayran for the effort.

from hisnulmuslim.

mdali92 avatar mdali92 commented on July 30, 2024

That's the 10dp padding. I thought you said you wanted 10dp padding at the top and bottom of translation and references?

from hisnulmuslim.

khalid-hussain avatar khalid-hussain commented on July 30, 2024

I've used the same padding settings for both the regular textView and the textView ex. The 10dp for the 'translation' is seen as the pink bars. In the image to the right, there is some extra spacing between the textView ex and the spacing/padding for the divider View. We need to find out where it is coming from and remove it.

from hisnulmuslim.

khalid-hussain avatar khalid-hussain commented on July 30, 2024

This has been fixed due to commit bc9f510

Preview:

from hisnulmuslim.

khalid-hussain avatar khalid-hussain commented on July 30, 2024

Due to the update of the Text-Justify library to 2.0.4, this is back.

from hisnulmuslim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.